|
FEAT 3
Finite Element Analysis Toolbox
|
RAII scope guard for an NVTX profiling range. More...
#include <cuda_util.hpp>
Public Member Functions | |
| ScopedNvtxRange (const char *name) | |
opens a range name on the calling thread's default stack More... | |
| ScopedNvtxRange (const ScopedNvtxRange &)=delete | |
| scope guards must not be copied or moved | |
| ScopedNvtxRange (NvtxRangeStack &stack, const char *name) | |
opens a range name on the given stack More... | |
| ~ScopedNvtxRange () | |
| closes the range More... | |
| ScopedNvtxRange & | operator= (const ScopedNvtxRange &)=delete |
Private Attributes | |
| NvtxRangeStack & | _stack |
| the stack this range was pushed onto More... | |
RAII scope guard for an NVTX profiling range.
Built on top of NvtxRangeStack: opens a range on construction and closes it on destruction, so wrapping a scope in a range is a single line. Uses the calling thread's default stack unless an explicit stack is supplied.
All operations are no-ops unless FEAT_HAVE_CUDA is defined.
Definition at line 251 of file cuda_util.hpp.
|
inlineexplicit |
opens a range name on the calling thread's default stack
Definition at line 259 of file cuda_util.hpp.
References _stack, and FEAT::Util::NvtxRangeStack::push().
|
inline |
opens a range name on the given stack
Definition at line 266 of file cuda_util.hpp.
References _stack, and FEAT::Util::NvtxRangeStack::push().
|
inline |
closes the range
Definition at line 277 of file cuda_util.hpp.
References _stack, and FEAT::Util::NvtxRangeStack::pop().
|
private |
the stack this range was pushed onto
Definition at line 255 of file cuda_util.hpp.
Referenced by ScopedNvtxRange(), and ~ScopedNvtxRange().