NVIDIA DeepStream SDK API Reference

8.0 Release
check.hpp File Reference

Go to the source code of this file.

Namespaces

 ds3d
 

Macros

#define DS3D_NVUNUSED2(a, b)
 
#define DS3D_NVUNUSED(a)   { (void)(a); }
 
#define DS3D_INFER_ASSERT(expr)
 
#define checkRuntime(call)   ds3d::check_runtime(call, #call, __LINE__, __FILE__)
 
#define checkKernel(...)
 
#define dprintf(...)
 
#define checkCudaErrors(cudaErrorCode)
 
#define Assertf(cond, fmt, ...)
 
#define Asserts(cond, s)
 
#define Assert(cond)
 

Functions

static bool ds3d::check_runtime (cudaError_t e, const char *call, int line, const char *file)
 

Macro Definition Documentation

◆ Assert

#define Assert (   cond)
Value:
do { \
if (!(cond)) { \
fprintf(stderr, "Assert failed 💀. %s in file %s:%d\n", #cond, __FILE__, __LINE__); \
abort(); \
} \
} while (false)

Definition at line 78 of file check.hpp.

◆ Assertf

#define Assertf (   cond,
  fmt,
  ... 
)
Value:
do { \
if (!(cond)) { \
fprintf(stderr, "Assert failed 💀. %s in file %s:%d, message: " fmt "\n", #cond, __FILE__, __LINE__, __VA_ARGS__); \
abort(); \
} \
} while (false)

Definition at line 62 of file check.hpp.

◆ Asserts

#define Asserts (   cond,
 
)
Value:
do { \
if (!(cond)) { \
fprintf(stderr, "Assert failed 💀. %s in file %s:%d, message: " s "\n", #cond, __FILE__, __LINE__); \
abort(); \
} \
} while (false)

Definition at line 70 of file check.hpp.

◆ checkCudaErrors

#define checkCudaErrors (   cudaErrorCode)
Value:
{ \
cudaError_t status = cudaErrorCode; \
if (status != 0) { \
std::cout << "Cuda failure: " << cudaGetErrorString(status) << " at line " << __LINE__ \
<< " in file " << __FILE__ << " error status: " << status << std::endl; \
abort(); \
} \
}

Definition at line 52 of file check.hpp.

◆ checkKernel

#define checkKernel (   ...)
Value:
do { \
__VA_ARGS__; \
ds3d::check_runtime(cudaPeekAtLastError(), #__VA_ARGS__, __LINE__, __FILE__); \
} while (false)

Definition at line 45 of file check.hpp.

◆ checkRuntime

#define checkRuntime (   call)    ds3d::check_runtime(call, #call, __LINE__, __FILE__)

Definition at line 43 of file check.hpp.

◆ dprintf

#define dprintf (   ...)

Definition at line 50 of file check.hpp.

◆ DS3D_INFER_ASSERT

#define DS3D_INFER_ASSERT (   expr)
Value:
do { \
if (!(expr)) { \
fprintf(stderr, "%s:%d ASSERT(%s) \n", __FILE__, __LINE__, #expr); \
std::abort(); \
} \
} while (0)

Definition at line 34 of file check.hpp.

◆ DS3D_NVUNUSED

#define DS3D_NVUNUSED (   a)    { (void)(a); }

Definition at line 30 of file check.hpp.

◆ DS3D_NVUNUSED2

#define DS3D_NVUNUSED2 (   a,
 
)
Value:
{ \
(void)(a); \
(void)(b); \
}

Definition at line 25 of file check.hpp.

check_runtime
static bool check_runtime(cudaError_t e, const char *call, int line, const char *file)
Definition: memory.hpp:27