FFmpeg
Macros | Typedefs | Functions
cuda_check.h File Reference
#include "compat/cuda/dynlink_loader.h"
#include "error.h"

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 59 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 65 of file cuda_check.h.

Typedef Documentation

◆ cuda_check_GetErrorName

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

Definition at line 26 of file cuda_check.h.

◆ cuda_check_GetErrorString

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

Definition at line 27 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 32 of file cuda_check.h.