MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / check

Function check

cpp/0_Introduction/simpleDrvRuntime/simpleDrvRuntime.cpp:69–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67bool findModulePath(const char *, string &, char **, ostringstream &);
68
69static void check(CUresult result, char const *const func, const char *const file, int const line)
70{
71 if (result) {
72 fprintf(stderr, "CUDA error at %s:%d code=%d \"%s\" \n", file, line, static_cast<unsigned int>(result), func);
73 exit(EXIT_FAILURE);
74 }
75}
76
77#define checkCudaDrvErrors(val) check((val), #val, __FILE__, __LINE__)
78

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected