35 Profile() MUDA_NOEXCEPT : need_pop(
false)
37 checkCudaErrors(cudaProfilerStart());
39 Profile(
const std::string& name) MUDA_NOEXCEPT : need_pop(
true)
41 nvtxEventAttributes_t eventAttrib = {0};
42 eventAttrib.version = NVTX_VERSION;
43 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
44 eventAttrib.colorType = NVTX_COLOR_ARGB;
45 eventAttrib.color = 255;
46 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
47 eventAttrib.message.ascii = name.c_str();
48 nvtxRangePushEx(&eventAttrib);
50 checkCudaErrors(cudaProfilerStart());
54 checkCudaErrors(cudaProfilerStop());
63 RangeName(
const std::string& name) MUDA_NOEXCEPT
65 nvtxEventAttributes_t eventAttrib = {0};
66 eventAttrib.version = NVTX_VERSION;
67 eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
68 eventAttrib.colorType = NVTX_COLOR_ARGB;
69 eventAttrib.color = 255;
70 eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
71 eventAttrib.message.ascii = name.c_str();
72 nvtxRangePushEx(&eventAttrib);