[docs]defrange_push(msg):""" Pushes a range onto a stack of nested range span. Returns zero-based depth of the range that is started. Arguments: msg (string): ASCII message to associate with range """if_libnvToolsExt()isNone:raiseRuntimeError('Unable to load nvToolsExt library')returnlib.nvtxRangePushA(ctypes.c_char_p(msg.encode("ascii")))
[docs]defrange_pop():""" Pops a range off of a stack of nested range spans. Returns the zero-based depth of the range that is ended. """if_libnvToolsExt()isNone:raiseRuntimeError('Unable to load nvToolsExt library')returnlib.nvtxRangePop()
[docs]defmark(msg):""" Describe an instantaneous event that occurred at some point. Arguments: msg (string): ASCII message to associate with the event. """if_libnvToolsExt()isNone:raiseRuntimeError('Unable to load nvToolsExt library')returnlib.nvtxMarkA(ctypes.c_char_p(msg.encode("ascii")))