FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
cmdutils_opencl.c File Reference
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavutil/log.h"
#include "libavutil/opencl.h"
#include "cmdutils.h"

Go to the source code of this file.

Data Structures

struct  OpenCLDeviceBenchmark
 

Macros

#define OCLCHECK(method,...)
 
#define CREATEBUF(out, flags, size)
 
#define OPENCL_NB_ITER   5
 

Functions

static void fill_rand_int (int *data, int n)
 
static int64_t run_opencl_bench (AVOpenCLExternalEnv *ext_opencl_env)
 
static int compare_ocl_device_desc (const void *a, const void *b)
 
int opt_opencl_bench (void *optctx, const char *opt, const char *arg)
 
int opt_opencl (void *optctx, const char *opt, const char *arg)
 

Variables

const char * ocl_bench_source
 

Macro Definition Documentation

#define OCLCHECK (   method,
  ... 
)
Value:
do { \
status = method(__VA_ARGS__); \
if (status != CL_SUCCESS) { \
av_log(NULL, AV_LOG_ERROR, # method " error '%s'\n", \
av_opencl_errstr(status)); \
goto end; \
} \
} while (0)

Definition at line 94 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

#define CREATEBUF (   out,
  flags,
  size 
)
Value:
do { \
out = clCreateBuffer(ext_opencl_env->context, flags, size, NULL, &status); \
if (status != CL_SUCCESS) { \
av_log(NULL, AV_LOG_ERROR, "Could not create OpenCL buffer\n"); \
goto end; \
} \
} while (0)

Definition at line 105 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

#define OPENCL_NB_ITER   5

Definition at line 123 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

Function Documentation

static void fill_rand_int ( int *  data,
int  n 
)
static

Definition at line 115 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().

static int64_t run_opencl_bench ( AVOpenCLExternalEnv ext_opencl_env)
static

Definition at line 124 of file cmdutils_opencl.c.

Referenced by opt_opencl_bench().

static int compare_ocl_device_desc ( const void a,
const void b 
)
static

Definition at line 206 of file cmdutils_opencl.c.

Referenced by opt_opencl_bench().

int opt_opencl_bench ( void optctx,
const char *  opt,
const char *  arg 
)

Definition at line 211 of file cmdutils_opencl.c.

int opt_opencl ( void optctx,
const char *  opt,
const char *  arg 
)

Definition at line 258 of file cmdutils_opencl.c.

Variable Documentation

const char* ocl_bench_source

Definition at line 34 of file cmdutils_opencl.c.

Referenced by run_opencl_bench().