public class NvtxRange extends Object implements AutoCloseable
try (NvtxRange a = new NvtxRange("a", NvtxColor.RED)) {
...
try (NvtxRange b = new NvtxRange("b", NvtxColor.BLUE)) {
...
}
...
}
Instances should be associated with a single thread to avoid pushing an NVTX range in
one thread and then trying to pop the range in a different thread.public NvtxRange(String name, int colorBits)
public void close()
close in interface AutoCloseableCopyright © 2021. All rights reserved.