Package ai.rapids.cudf
Class NvtxUniqueRange
java.lang.Object
ai.rapids.cudf.NvtxUniqueRange
- All Implemented Interfaces:
AutoCloseable
This class supports start/end NVTX profiling ranges.
Start/end:
The constructor instantiates a new NVTX range and keeps a unique handle that comes back
from the NVTX api (nvtxRangeId). The handle is used to later close such a range. This type
of range does not have the same order-of-operation requirements that the push/pop ranges have:
the `NvtxUniqueRange` instance can be passed to other scopes, and even to other threads
for the eventual call to close.
It can be used in the same try-with-resources way as push/pop, or interleaved with other
ranges, like so:
NvtxUniqueRange a = new NvtxUniqueRange("a", NvtxColor.RED); NvtxUniqueRange b = new NvtxUniqueRange("b", NvtxColor.BLUE); a.close(); b.close();
-
Constructor Summary
ConstructorsConstructorDescriptionNvtxUniqueRange
(String name, int colorBits) NvtxUniqueRange
(String name, NvtxColor color) -
Method Summary
-
Constructor Details
-
NvtxUniqueRange
-
NvtxUniqueRange
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-