FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
cuda_runtime.h File Reference

Go to the source code of this file.

Data Structures

struct  dim3
 

Macros

#define __global__   __attribute__((global))
 
#define __device__   __attribute__((device))
 
#define __device_builtin__   __attribute__((device_builtin))
 
#define __align__(N)   __attribute__((aligned(N)))
 
#define __inline__   __inline__ __attribute__((always_inline))
 
#define max(a, b)   ((a) > (b) ? (a) : (b))
 
#define min(a, b)   ((a) < (b) ? (a) : (b))
 
#define abs(x)   ((x) < 0 ? -(x) : (x))
 
#define atomicAdd(a, b)   (__atomic_fetch_add(a, b, __ATOMIC_SEQ_CST))
 
#define GETCOMP(reg, comp)
 
#define GET(name, reg)
 
#define blockIdx   (getBlockIdx())
 
#define blockDim   (getBlockDim())
 
#define threadIdx   (getThreadIdx())
 
#define make_uchar2(a, b)   ((uchar2){.x = a, .y = b})
 
#define make_ushort2(a, b)   ((ushort2){.x = a, .y = b})
 
#define make_uchar4(a, b, c, d)   ((uchar4){.x = a, .y = b, .z = c, .w = d})
 
#define make_ushort4(a, b, c, d)   ((ushort4){.x = a, .y = b, .z = c, .w = d})
 
#define TEX2D(type, ret)   static inline __device__ void conv(type* out, unsigned a, unsigned b, unsigned c, unsigned d) {*out = (ret);}
 

Typedefs

typedef __device_builtin__ unsigned long long cudaTextureObject_t
 

Functions

struct __device_builtin__ __align__ (2) uchar2
 
struct __device_builtin__ __align__ (4) ushort2
 
struct __device_builtin__ __align__ (8) int2
 
struct __device_builtin__ __align__ (16) int4
 
template<class T >
static __device__ T tex2D (cudaTextureObject_t texObject, float x, float y)
 

Variables

 uchar2
 
 ushort2
 
 int2
 
 uchar4
 
 ushort4
 
 int4
 

Macro Definition Documentation

◆ __global__

#define __global__   __attribute__((global))

Definition at line 27 of file cuda_runtime.h.

◆ __device__

#define __device__   __attribute__((device))

Definition at line 28 of file cuda_runtime.h.

◆ __device_builtin__

#define __device_builtin__   __attribute__((device_builtin))

Definition at line 29 of file cuda_runtime.h.

◆ __align__

#define __align__ (   N)    __attribute__((aligned(N)))

Definition at line 30 of file cuda_runtime.h.

◆ __inline__

#define __inline__   __inline__ __attribute__((always_inline))

Definition at line 31 of file cuda_runtime.h.

◆ max

#define max (   a,
  b 
)    ((a) > (b) ? (a) : (b))

Definition at line 33 of file cuda_runtime.h.

◆ min

#define min (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 34 of file cuda_runtime.h.

◆ abs

#define abs (   x)    ((x) < 0 ? -(x) : (x))
Examples
encode_audio.c.

Definition at line 35 of file cuda_runtime.h.

◆ atomicAdd

#define atomicAdd (   a,
  b 
)    (__atomic_fetch_add(a, b, __ATOMIC_SEQ_CST))

Definition at line 37 of file cuda_runtime.h.

◆ GETCOMP

#define GETCOMP (   reg,
  comp 
)
Value:
asm("mov.u32 %0, %%" #reg "." #comp ";" : "=r"(tmp)); \
ret.comp = tmp;

Definition at line 80 of file cuda_runtime.h.

◆ GET

#define GET (   name,
  reg 
)
Value:
static inline __device__ uint3 name() {\
uint3 ret; \
unsigned tmp; \
GETCOMP(reg, x) \
GETCOMP(reg, y) \
GETCOMP(reg, z) \
return ret; \
}

Definition at line 84 of file cuda_runtime.h.

◆ blockIdx

#define blockIdx   (getBlockIdx())

Definition at line 98 of file cuda_runtime.h.

◆ blockDim

#define blockDim   (getBlockDim())

Definition at line 99 of file cuda_runtime.h.

◆ threadIdx

#define threadIdx   (getThreadIdx())

Definition at line 100 of file cuda_runtime.h.

◆ make_uchar2

#define make_uchar2 (   a,
  b 
)    ((uchar2){.x = a, .y = b})

Definition at line 103 of file cuda_runtime.h.

◆ make_ushort2

#define make_ushort2 (   a,
  b 
)    ((ushort2){.x = a, .y = b})

Definition at line 104 of file cuda_runtime.h.

◆ make_uchar4

#define make_uchar4 (   a,
  b,
  c,
 
)    ((uchar4){.x = a, .y = b, .z = c, .w = d})

Definition at line 105 of file cuda_runtime.h.

◆ make_ushort4

#define make_ushort4 (   a,
  b,
  c,
 
)    ((ushort4){.x = a, .y = b, .z = c, .w = d})

Definition at line 106 of file cuda_runtime.h.

◆ TEX2D

#define TEX2D (   type,
  ret 
)    static inline __device__ void conv(type* out, unsigned a, unsigned b, unsigned c, unsigned d) {*out = (ret);}

Definition at line 109 of file cuda_runtime.h.

Typedef Documentation

◆ cudaTextureObject_t

typedef __device_builtin__ unsigned long long cudaTextureObject_t

Definition at line 40 of file cuda_runtime.h.

Function Documentation

◆ __align__() [1/4]

struct __device_builtin__ __align__ ( )

Definition at line 42 of file cuda_runtime.h.

◆ __align__() [2/4]

struct __device_builtin__ __align__ ( )

Definition at line 47 of file cuda_runtime.h.

◆ __align__() [3/4]

struct __device_builtin__ __align__ ( )

Definition at line 59 of file cuda_runtime.h.

◆ __align__() [4/4]

struct __device_builtin__ __align__ ( 16  )

Definition at line 74 of file cuda_runtime.h.

◆ tex2D()

template<class T >
static __device__ T tex2D ( cudaTextureObject_t  texObject,
float  x,
float  y 
)
inlinestatic

Definition at line 120 of file cuda_runtime.h.

Variable Documentation

◆ uchar2

uchar2

Definition at line 45 of file cuda_runtime.h.

◆ ushort2

ushort2

Definition at line 50 of file cuda_runtime.h.

◆ int2

int2

Definition at line 62 of file cuda_runtime.h.

◆ uchar4

uchar4

Definition at line 67 of file cuda_runtime.h.

◆ ushort4

ushort4

Definition at line 72 of file cuda_runtime.h.

◆ int4

int4

Definition at line 77 of file cuda_runtime.h.

comp
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
Definition: eamad.c:83
tmp
static uint8_t tmp[11]
Definition: aes_ctr.c:26
name
const char * name
Definition: avisynth_c.h:867
__device__
#define __device__
Definition: cuda_runtime.h:28
ret
ret
Definition: filter_design.txt:187
uint3
Definition: cuda_runtime.h:52