NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp File Reference

Go to the source code of this file.

Macros

#define CUDA_CHECK(condition)   gpuAssert(condition, __FILE__, __LINE__);
 
#define CUBLAS_CHECK(condition)   gpuAssert_cublas(condition, __FILE__, __LINE__);
 
#define CUFFT_CHECK(condition)   gpuAssert_cufft(condition, __FILE__, __LINE__);
 
#define VPI_CHECK(STMT)   gpuAssert_vpi((STMT), __FILE__, __LINE__); \
 

Functions

static const char * _cufftGetErrorEnum (cufftResult error)
 Return the symbolic name of a cuFFT status. More...
 
static const char * _cublasGetErrorEnum (cublasStatus_t error)
 Return the symbolic name of a cuBLAS status. More...
 
void gpuAssert (CUresult code, const char *file, int line, bool abort=true)
 Report a CUDA driver error and optionally throw an exception. More...
 
void gpuAssert (cudaError_t code, const char *file, int line, bool abort=true)
 Report a CUDA runtime error and optionally throw an exception. More...
 
void gpuAssert_cublas (cublasStatus_t code, const char *file, int line, bool abort=true)
 Report a cuBLAS error and optionally throw an exception. More...
 
void gpuAssert_cufft (cufftResult code, const char *file, int line, bool abort=true)
 Report a cuFFT error and optionally throw an exception. More...
 
void gpuAssert_vpi (VPIStatus code, const char *file, int line, bool abort=true)
 Report a VPI error and optionally throw an exception. More...
 

Macro Definition Documentation

◆ CUBLAS_CHECK

#define CUBLAS_CHECK (   condition)    gpuAssert_cublas(condition, __FILE__, __LINE__);

◆ CUDA_CHECK

#define CUDA_CHECK (   condition)    gpuAssert(condition, __FILE__, __LINE__);

◆ CUFFT_CHECK

#define CUFFT_CHECK (   condition)    gpuAssert_cufft(condition, __FILE__, __LINE__);

◆ VPI_CHECK

#define VPI_CHECK (   STMT)    gpuAssert_vpi((STMT), __FILE__, __LINE__); \

Function Documentation

◆ _cublasGetErrorEnum()

static const char* _cublasGetErrorEnum ( cublasStatus_t  error)
static

Return the symbolic name of a cuBLAS status.

Parameters
[in]errorcuBLAS status value.

Definition at line 96 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.

Referenced by gpuAssert_cublas().

◆ _cufftGetErrorEnum()

static const char* _cufftGetErrorEnum ( cufftResult  error)
static

Return the symbolic name of a cuFFT status.

Parameters
[in]errorcuFFT status value.

Definition at line 41 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.

Referenced by gpuAssert_cufft().

◆ gpuAssert() [1/2]

void gpuAssert ( cudaError_t  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

Report a CUDA runtime error and optionally throw an exception.

Parameters
[in]codeCUDA runtime status to check.
[in]fileSource filename associated with the check.
[in]lineSource line associated with the check.
[in]abortEnables throwing an exception after reporting an error.

Definition at line 160 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.

◆ gpuAssert() [2/2]

void gpuAssert ( CUresult  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

Report a CUDA driver error and optionally throw an exception.

Parameters
[in]codeCUDA driver status to check.
[in]fileSource filename associated with the check.
[in]lineSource line associated with the check.
[in]abortEnables throwing an exception after reporting an error.

Definition at line 142 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.

◆ gpuAssert_cublas()

void gpuAssert_cublas ( cublasStatus_t  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

Report a cuBLAS error and optionally throw an exception.

Parameters
[in]codecuBLAS status to check.
[in]fileSource filename associated with the check.
[in]lineSource line associated with the check.
[in]abortEnables throwing an exception after reporting an error.

Definition at line 176 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.

References _cublasGetErrorEnum().

◆ gpuAssert_cufft()

void gpuAssert_cufft ( cufftResult  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

Report a cuFFT error and optionally throw an exception.

Parameters
[in]codecuFFT status to check.
[in]fileSource filename associated with the check.
[in]lineSource line associated with the check.
[in]abortEnables throwing an exception after reporting an error.

Definition at line 192 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.

References _cufftGetErrorEnum().

◆ gpuAssert_vpi()

void gpuAssert_vpi ( VPIStatus  code,
const char *  file,
int  line,
bool  abort = true 
)
inline

Report a VPI error and optionally throw an exception.

Parameters
[in]codeVPI status to check.
[in]fileSource filename associated with the check.
[in]lineSource line associated with the check.
[in]abortEnables throwing an exception after reporting an error.

Definition at line 209 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/utility/cuda_common.hpp.