OmniSciDB  471d68cefb
 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)

Definition at line 82 of file nvtx_helpers.cpp.

Referenced by import_export::QueryExporterGDAL::beginExport(), com.omnisci.jdbc.KeyLoader::getDetails_pkcs12(), nvtx_helpers::omnisci_range_push(), logger::JsonEncoder::operator()(), logger::operator<<(), anonymous_namespace{DBHandler.cpp}::path_has_valid_filename(), File_Namespace::removeFile(), and logger::Logger::stream().

82  {
83  return boost::filesystem::path(path).filename().string();
84 }

+ Here is the caller graph for this function:

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

Definition at line 62 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().

62  {
63  auto category_index = static_cast<uint32_t>(c);
64  CHECK_LT(category_index, NUM_CATEGORIES);
65  auto const& info = g_category_infos[category_index];
66  nvtxEventAttributes_t event_attrib = {};
67  event_attrib.version = NVTX_VERSION;
68  event_attrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE;
69  event_attrib.messageType = NVTX_MESSAGE_TYPE_ASCII;
70  event_attrib.message.ascii = name;
71  if (info.color != 0) {
72  event_attrib.colorType = NVTX_COLOR_ARGB;
73  event_attrib.color = info.color;
74  }
75 #if SET_OMNISCI_EVENT_CATEGORY
76  event_attrib.category = info.category;
77 #endif
78  return event_attrib;
79 }
string name
Definition: setup.in.py:72
static std::array< CategoryInfo, NUM_CATEGORIES > g_category_infos
#define CHECK_LT(x, y)
Definition: Logger.h:219
#define NUM_CATEGORIES

+ Here is the caller graph for this function: