cf4ocl (C Framework for OpenCL)
v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
|
Definition of a wrapper type and related functions for a OpenCL kernel arguments. More...
Go to the source code of this file.
Macros | |
#define | ccl_arg_full(value, size) ccl_arg_new(value, size) |
Defines a kernel argument with more control. More... | |
#define | ccl_arg_local(count, type) ccl_arg_new(NULL, count * sizeof(type)) |
Defines a local kernel argument, which allocates local memory within the kernel with the specified size. More... | |
#define | ccl_arg_priv(value, type) ccl_arg_new(&value, sizeof(type)) |
Define a private kernel argument. More... | |
Typedefs | |
typedef CCLWrapper | CCLArg |
The CCLArg type is an alias for CCLWrapper type. More... | |
Functions | |
CCLArg * | ccl_arg_new (void *value, size_t size) |
Create a new kernel argument. More... | |
Variables | |
const CCLArg * | ccl_arg_skip |
Use this constant to skip kernel arguments in the ccl_kernel_set_args(), ccl_kernel_set_args_v(), ccl_kernel_set_args_and_enqueue_ndrange() and ccl_kernel_set_args_and_enqueue_ndrange_v() functions. | |
Definition of a wrapper type and related functions for a OpenCL kernel arguments.
Definition in file ccl_kernel_arg.h.
typedef CCLWrapper CCLArg |
The CCLArg type is an alias for CCLWrapper type.
The value and size of local/private arguments is kept inside CCLWrapper instances and manipulated by the ccl_arg_*() functions. This allows client code to pass real wrappers, e.g. CCLBuffer, or local/private parameters as kernel arguments in a transparent fashion.
Definition at line 44 of file ccl_kernel_arg.h.
CCLArg* ccl_arg_new | ( | void * | value, |
size_t | size | ||
) |
Create a new kernel argument.
Arguments created with this function can local, private or NULL. Client code shouldn't directly use this function, but use instead ccl_arg_priv(), ccl_arg_local() or ccl_arg_full().
[in] | value | Argument value. |
[in] | size | Argument size. |
Definition at line 76 of file ccl_kernel_arg.c.