FFmpeg
Macros | Typedefs | Functions
cuda_check.h File Reference

Go to the source code of this file.

Macros

#define FF_CUDA_CHECK(avclass, x)   ff_cuda_check(avclass, cuGetErrorName, cuGetErrorString, (x), #x)
 Convenience wrapper for ff_cuda_check when directly linking libcuda. More...
 
#define FF_CUDA_CHECK_DL(avclass, cudl, x)   ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)
 Convenience wrapper for ff_cuda_check when dynamically loading cuda symbols. More...
 

Typedefs

typedef CUresult CUDAAPI cuda_check_GetErrorName(CUresult error, const char **pstr)
 
typedef CUresult CUDAAPI cuda_check_GetErrorString(CUresult error, const char **pstr)
 

Functions

static int ff_cuda_check (void *avctx, void *cuGetErrorName_fn, void *cuGetErrorString_fn, CUresult err, const char *func)
 Wrap a CUDA function call and print error information if it fails. More...
 

Macro Definition Documentation

◆ FF_CUDA_CHECK

#define FF_CUDA_CHECK (   avclass,
 
)    ff_cuda_check(avclass, cuGetErrorName, cuGetErrorString, (x), #x)

Convenience wrapper for ff_cuda_check when directly linking libcuda.

Definition at line 56 of file cuda_check.h.

◆ FF_CUDA_CHECK_DL

#define FF_CUDA_CHECK_DL (   avclass,
  cudl,
 
)    ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x)

Convenience wrapper for ff_cuda_check when dynamically loading cuda symbols.

Definition at line 62 of file cuda_check.h.

Typedef Documentation

◆ cuda_check_GetErrorName

typedef CUresult CUDAAPI cuda_check_GetErrorName(CUresult error, const char **pstr)

Definition at line 23 of file cuda_check.h.

◆ cuda_check_GetErrorString

typedef CUresult CUDAAPI cuda_check_GetErrorString(CUresult error, const char **pstr)

Definition at line 24 of file cuda_check.h.

Function Documentation

◆ ff_cuda_check()

static int ff_cuda_check ( void *  avctx,
void *  cuGetErrorName_fn,
void *  cuGetErrorString_fn,
CUresult  err,
const char *  func 
)
inlinestatic

Wrap a CUDA function call and print error information if it fails.

Definition at line 29 of file cuda_check.h.