MCPcopy Create free account
hub / github.com/NVIDIA/DALI / CurrentExecutableDir

Function CurrentExecutableDir

dali/test/dali_test_utils.cc:38–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace test {
37
38std::string CurrentExecutableDir() {
39 char result[PATH_MAX + 1] = {}; // readlink doesn't place a NULL terminator at the end of path
40 ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
41 if (count != -1) {
42 return dirname(result);
43 }
44 return {};
45}
46
47const std::string& DefaultGlobalLibPath() {
48 static const std::string path = [&]() -> std::string {

Callers 3

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected