cf4ocl (C Framework for OpenCL)  v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ccl_kernel_arg.h File Reference

(527786e)

Definition of a wrapper type and related functions for a OpenCL kernel arguments. More...

Include dependency graph for ccl_kernel_arg.h:
This graph shows which files directly or indirectly include this file:

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

CCLArgccl_arg_new (void *value, size_t size)
 Create a new kernel argument. More...
 

Variables

const CCLArgccl_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.
 

Detailed Description

Definition of a wrapper type and related functions for a OpenCL kernel arguments.

Author
Nuno Fachada
Date
2016

Definition in file ccl_kernel_arg.h.

Typedef Documentation

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.

Function Documentation

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().

Parameters
[in]valueArgument value.
[in]sizeArgument size.
Returns
A new kernel argument.

Definition at line 76 of file ccl_kernel_arg.c.