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. Push/pop ranges show a stacking behavior in tools such as Nsight, where newly pushed ranges are correlated and enclosed by the prior pushed range (in the example above, "b" is enclosed by "a").
public NvtxRange(String name, int colorBits)
public void close()
close
in interface AutoCloseable
Copyright © 2024. All rights reserved.