Uploads generic array data to a GPU Buffer as an unsigned char array.
If the array data contained in the objects is of type kUintArrayData or kIntArrayData the array will be converted to type unsigned char and uploaded to the GPU. This can be used if the integers are going to be used as booleans or enums.
Parameters
[in]
array
the CPU array to be uploaded
[in]
buffer
the GPU buffer to which the data should be uploaded
[out]
arrayLength
when non-null this will be set to the length of the array that is being uploaded
Used to set the buffer as the argument value for a specific argument of a kernel.
If the specified errorCode is not CL_SUCCES this function will do nothing. It will simply return the error code. Otherwise it will set the argument on the kernel and return the new errorCode.
Parameters
[in]
kernel
A valid kernel object.
[in]
argIndex
The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
[in]
buffer
The data that should be used as the argument value for the argument specified by argIndex
[in,out]
errorCode
the previous error code which will be set to the new result if the previous code was CL_SUCCES
[in]
useBuffer
when true the specified buffer is set as the argument, otherwise a nullptr is set.
Returns
returns CL_SUCCESS if the argument was successfully set. Otherwise, it returns an OpenCL error code.
Used to set the buffer as the argument value for a specific argument of a kernel.
If the specified errorCode is not CL_SUCCES this function will do nothing. It will simply return the error code. Otherwise it will set the argument on the kernel and return the new errorCode.
Parameters
[in]
kernel
A valid kernel object.
[in]
argIndex
The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
[in]
buffer
The data that should be used as the argument value for the argument specified by argIndex
[in,out]
errorCode
the previous error code which will be set to the new result if the previous code was CL_SUCCES
[in]
useBuffer
when true the specified buffer is set as the argument, otherwise a nullptr is set.
Returns
returns CL_SUCCESS if the argument was successfully set. Otherwise, it returns an OpenCL error code.
cl_int setKernelArg
(
cl_kernel
kernel,
cl_uint
argIndex,
size_t
argSize,
const void *
argValue,
cl_int &
errorCode
)
static
Used to set the argument value for a specific argument of a kernel.
If the specified errorCode is not CL_SUCCES this function will do nothing. It will simply return the error code. Otherwise it will set the argument on the kernel and return the new errorCode.
This is a relatively low level function that interfaces directly with clSetKernelArg
Parameters
[in]
kernel
A valid kernel object.
[in]
argIndex
The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
[in]
argSize
Specifies the size of the argument value
[in]
argValue
A pointer to data that should be used as the argument value for argument specified by argIndex
[in,out]
errorCode
the previous error code which will be set to the new result if the previous code was CL_SUCCES
Returns
returns CL_SUCCESS if the argument was successfully set. Otherwise, it returns an OpenCL error code.
static cl_int setKernelArg
(
cl_kernel
kernel,
cl_uint
argIndex,
T
value,
cl_int &
errorCode
)
inlinestatic
Used to set the argument value for a specific argument of a kernel.
If the specified errorCode is not CL_SUCCES this function will do nothing. It will simply return the error code. Otherwise it will set the argument on the kernel and return the new errorCode.
Parameters
[in]
kernel
A valid kernel object.
[in]
argIndex
The argument index. Arguments to the kernel are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by a kernel.
[in]
value
The data that should be used as the argument value for the argument specified by argIndex
[in,out]
errorCode
the previous error code which will be set to the new result if the previous code was CL_SUCCES
Returns
CL_SUCCESS returns CL_SUCCESS if the function is executed successfully. Otherwise, it returns an OpenCL error code.
const char * className
(
)
static
Returns the name of this class.
Returns
The name of this class.
The documentation for this class was generated from the following files: