OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nvtx_helpers::anonymous_namespace{nvtx_helpers.cpp} Namespace Reference

Functions

nvtxEventAttributes_t make_omnisci_event (Category c, const char *name)
 
std::string filename (char const *path)
 

Function Documentation

std::string nvtx_helpers::anonymous_namespace{nvtx_helpers.cpp}::filename ( char const *  path)
nvtxEventAttributes_t nvtx_helpers::anonymous_namespace{nvtx_helpers.cpp}::make_omnisci_event ( Category  c,
const char *  name 
)
inline

Definition at line 78 of file nvtx_helpers.cpp.

References CHECK_LT, nvtx_helpers::g_category_infos, setup::name, and NUM_CATEGORIES.

Referenced by nvtx_helpers::omnisci_range_push(), nvtx_helpers::omnisci_range_start(), and nvtx_helpers::omnisci_set_mark().

78  {
79  auto category_index = static_cast<uint32_t>(c);
80  CHECK_LT(category_index, NUM_CATEGORIES);
81  auto const& info = g_category_infos[category_index];
82  nvtxEventAttributes_t event_attrib = {};
83  event_attrib.version = NVTX_VERSION;
84  event_attrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
85  event_attrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
86  event_attrib.message.ascii = name;
87  if (info.color != 0) {
88  event_attrib.colorType = NVTX_COLOR_ARGB;
89  event_attrib.color = info.color;
90  }
91 #if SET_OMNISCI_EVENT_CATEGORY
92  event_attrib.category = info.category;
93 #endif
94  return event_attrib;
95 }
static std::array< CategoryInfo, NUM_CATEGORIES > g_category_infos
#define CHECK_LT(x, y)
Definition: Logger.h:303
#define NUM_CATEGORIES
string name
Definition: setup.in.py:72

+ Here is the caller graph for this function: