Eulerian Smoke Simulation on the GPU
|
A class for managing an OpenCL context and all its relevant functions. More...
#include <ComputeEngine.h>
Public Types | |
enum | DeviceType { DEVICE_TYPE_CPU = CL_DEVICE_TYPE_CPU, DEVICE_TYPE_GPU = CL_DEVICE_TYPE_GPU, DEVICE_TYPE_DEFAULT = CL_DEVICE_TYPE_DEFAULT, DEVICE_TYPE_ALL = CL_DEVICE_TYPE_ALL } |
Public Member Functions | |
ComputeEngine () | |
Constructor. | |
~ComputeEngine () | |
Destructor. | |
bool | connect (DeviceType _deviceType=DEVICE_TYPE_ALL, unsigned int _count=1, bool _useOpenGLContext=false) |
Connects to the platform devices and initializes the engine. | |
bool | disconnect () |
Disconnects the platform devices from the engine. | |
bool | createProgram (const char *_programName, const char *_fileName) |
Creates a program object. | |
bool | createKernel (const char *_programName, const char *_kernelName) |
Creates a compute kernel. | |
bool | setKernelArg (const char *_kernelName, cl_uint _index, void *_argsValue, size_t _argsSize) |
Sets a kernel argument for any arbitary variable. | |
bool | setKernelArg (const char *_kernelName, cl_uint _index, const char *_memObjName) |
Sets a kernel memory object argument. | |
bool | setKernelArgs (const char *_kernelName,...) |
Sets multiple kernel arguments. | |
bool | executeKernel (const char *_kernelName, cl_uint _deviceId, size_t *_globalDim, size_t *_localDim, cl_uint _dimCount) |
Executes a kernel. | |
cl_kernel | getKernelObject (const char *_kernelName) |
Accessor for a kernel's handle. | |
cl_mem | getMemObject (const char *_memObjName) |
Accesor for a memory object's handle. | |
bool | createBuffer (const char *_memObjName, cl_mem_flags _memFlags, size_t _bytes, void *_data) |
Creates a buffer object. | |
bool | readBuffer (const char *_memObjName, cl_uint _deviceIndex, cl_uint _start, size_t _bytes, void *_data) |
Reads a buffer's data. | |
bool | writeBuffer (const char *_memObjName, cl_uint _deviceIndex, cl_uint _start, size_t _bytes, void *_data) |
Writes data to a buffer. | |
bool | createImage2D (const char *_memObjName, cl_mem_flags _memFlags, cl_channel_order _channelOrder, cl_channel_type _channelType, cl_uint _width, cl_uint _height, cl_uint _rowPitch=0, void *_data=NULL) |
Creates a 2D image object. | |
bool | createImage3D (const char *_memObjName, cl_mem_flags _memFlags, cl_channel_order _channelOrder, cl_channel_type _channelType, cl_uint _width, cl_uint _height, cl_uint _depth, cl_uint _rowPitch=0, cl_uint _slicePitch=0, void *_data=NULL) |
Creates a 3D image object. | |
bool | readImage (const char *_memObjName, cl_uint _deviceIndex, cl_uint _x, cl_uint _y, cl_uint _z, cl_uint _width, cl_uint _height, cl_uint _depth, cl_uint _rowPitch, cl_uint _slicePitch, void *_data) |
Reads from an image object. | |
bool | writeImage (const char *_memObjName, cl_uint _deviceIndex, cl_uint _x, cl_uint _y, cl_uint _z, cl_uint _width, cl_uint _height, cl_uint _depth, cl_uint _rowPitch, cl_uint _slicePitch, void *_data) |
Writes to an image object. | |
bool | copyBufferToBuffer (const char *_sourceBufferName, const char *_destinationBufferName, cl_uint _deviceIndex, size_t _sourceOffset, size_t _destinationOffset, size_t _bytes) |
Copies a buffer to another buffer (using buffer names). | |
bool | copyBufferToBuffer (cl_mem _sourceBuffer, cl_mem _destinationBuffer, cl_uint _deviceIndex, size_t _sourceOffset, size_t _destinationOffset, size_t _bytes) |
Copies a buffer to another buffer (using buffer handles). | |
bool | copyBufferToImage (const char *_bufferName, const char *_imageName, cl_uint _deviceIndex, size_t _bufferOffset, cl_uint _x, cl_uint _y, cl_uint _z, cl_uint _width, cl_uint _height, cl_uint _depth) |
Copies a buffer object to an image (using memory object names) | |
bool | copyBufferToImage (cl_mem _buffer, cl_mem _image, cl_uint _deviceIndex, size_t _bufferOffset, cl_uint _x, cl_uint _y, cl_uint _z, cl_uint _width, cl_uint _height, cl_uint _depth) |
Copies a buffer object to an image (using memory object handles) | |
bool | copyImageToBuffer (const char *_bufferName, const char *_imageName, cl_uint _deviceIndex, cl_uint _x, cl_uint _y, cl_uint _z, cl_uint _width, cl_uint _height, cl_uint _depth, size_t _bufferOffset) |
Copies an image to a buffer object (using memory object names). | |
bool | copyImageToBuffer (cl_mem _buffer, cl_mem _image, cl_uint _deviceIndex, cl_uint _x, cl_uint _y, cl_uint _z, cl_uint _width, cl_uint _height, cl_uint _depth, size_t _bufferOffset) |
Copies an image to a buffer object (using memory object handles). | |
bool | createGLBufferReference (const char *_memObjName, cl_mem_flags _memFlags, cl_uint _bufferId) |
Creates an OpenGL buffer reference object. | |
bool | createGLTexture2DReference (const char *_memObjName, cl_mem_flags _memFlags, GLenum _target, GLint _mipLevel, GLuint _textureId) |
Creates an OpenGL 2D texture reference object. | |
bool | createGLTexture3DReference (const char *_memObjName, cl_mem_flags _memFlags, GLenum _target, GLint _mipLevel, GLuint _textureId) |
Creates an OpenGL 3D texture reference object. | |
bool | createGLRenderBufferReference (const char *_memObjName, cl_mem_flags _memFlags, GLuint _rboId) |
Creates an OpenGL render buffer reference object. | |
bool | acquireGLObject (const char *_memObjName, cl_uint _deviceIndex=0) |
Acquire an OpenGL reference object, to use in OpenCL operations. | |
bool | releaseGLObject (const char *_memObjName, cl_uint _deviceIndex=0) |
Releases an OpenGL reference object from any OpenCL operations. | |
bool | swapMemObjects (const char *_memObjNameA, const char *_memObjNameB) |
Swaps two memory objects. | |
bool | createImageSampler (const char *_samplerName, cl_bool _normalizedCoords, cl_addressing_mode _addressingMode, cl_filter_mode _filterMode) |
Creates an image sampler. | |
cl_sampler | getSampler (const char *_samplerName) |
Accessor for an image sampler's handle. | |
bool | flush (cl_uint _deviceIndex=0) |
Issues all previously queued OpenCL commands in a command-queue to the device associated with the command-queue. | |
bool | finish (cl_uint _deviceIndex=0) |
Blocks all operations unitll all previously queued OpenCL commands in the specified command-queue have completed. | |
bool | barrier (cl_uint _deviceIndex=0) |
Creates a synchronization point for pending operations. | |
cl_uint | getContextDeviceCount () |
Accessor for the number of context devices. | |
cl_uint | getEstimatedWorkGroupSize (const char *_kernelName, cl_uint _deviceIndex=0) |
Estimates an optimal work-group size for a given kernel. | |
void | getCLExtensions () |
Prints the available OpenCL extensions. |
A class for managing an OpenCL context and all its relevant functions.
bool ComputeEngine::acquireGLObject | ( | const char * | _memObjName, |
cl_uint | _deviceIndex = 0 |
||
) |
Acquire an OpenGL reference object, to use in OpenCL operations.
[in] | _memObjName | the reference object's name |
[in] | _deviceIndex | the device in which the acquire command will be queued |
bool ComputeEngine::barrier | ( | cl_uint | _deviceIndex = 0 | ) |
Creates a synchronization point for pending operations.
[in] | _deviceIndex | the device in which the command will be queued |
bool ComputeEngine::connect | ( | DeviceType | _deviceType = DEVICE_TYPE_ALL , |
unsigned int | _count = 1 , |
||
bool | _useOpenGLContext = false |
||
) |
Connects to the platform devices and initializes the engine.
[in] | _deviceType | the device type to create the OpenCL context |
[in] | _count | the number of devices to use |
[in] | _useOpenGLContext | a flag to set whether to use an OpenGL context or not |
bool ComputeEngine::copyBufferToBuffer | ( | const char * | _sourceBufferName, |
const char * | _destinationBufferName, | ||
cl_uint | _deviceIndex, | ||
size_t | _sourceOffset, | ||
size_t | _destinationOffset, | ||
size_t | _bytes | ||
) |
Copies a buffer to another buffer (using buffer names).
[in] | _sourceBufferName | the source buffer's name |
[in] | _destinationBufferName | the destination's buffer's name |
[in] | _deviceIndex | the device in which the copy command will be queued |
[in] | _sourceOffset | byte offset to the source buffer |
[in] | _destinationOffset | byte offset to the destination buffer |
[in] | _bytes | the data size in bytes to copy |
bool ComputeEngine::copyBufferToBuffer | ( | cl_mem | _sourceBuffer, |
cl_mem | _destinationBuffer, | ||
cl_uint | _deviceIndex, | ||
size_t | _sourceOffset, | ||
size_t | _destinationOffset, | ||
size_t | _bytes | ||
) |
Copies a buffer to another buffer (using buffer handles).
[in] | _sourceBuffer | the source buffer |
[in] | _destinationBuffer | the destination buffer |
[in] | _deviceIndex | the device in which the copy command will be queued |
[in] | _sourceOffset | byte offset to the source buffer |
[in] | _destinationOffset | byte offset to the destination buffer |
[in] | _bytes | the data size in bytes to copy |
bool ComputeEngine::copyBufferToImage | ( | const char * | _bufferName, |
const char * | _imageName, | ||
cl_uint | _deviceIndex, | ||
size_t | _bufferOffset, | ||
cl_uint | _x, | ||
cl_uint | _y, | ||
cl_uint | _z, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth | ||
) |
Copies a buffer object to an image (using memory object names)
[in] | _bufferName | the buffer's name |
[in] | _imageName | the image's name |
[in] | _deviceIndex | the device in which the copy command will be queued |
[in] | _bufferOffset | byte offset to the source buffer |
[in] | _x | the X offset in pixels where to begin copying data to the image |
[in] | _y | the Y offset in pixels where to begin copying data to the image |
[in] | _z | the Z offset in pixels where to begin copying data to the image |
[in] | _width | the width in pixels of the 2D or 3D rectangle to copy |
[in] | _height | the height in pixels of the 2D or 3D rectangle to copy |
[in] | _depth | the depth in pixels of the 2D or 3D rectangle to copy |
bool ComputeEngine::copyBufferToImage | ( | cl_mem | _buffer, |
cl_mem | _image, | ||
cl_uint | _deviceIndex, | ||
size_t | _bufferOffset, | ||
cl_uint | _x, | ||
cl_uint | _y, | ||
cl_uint | _z, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth | ||
) |
Copies a buffer object to an image (using memory object handles)
[in] | _buffer | the buffer to copy from |
[in] | _image | the image to copy to |
[in] | _deviceIndex | the device in which the copy command will be queued |
[in] | _bufferOffset | byte offset to the source buffer |
[in] | _x | the X offset in pixels where to begin copying data to the image |
[in] | _y | the Y offset in pixels where to begin copying data to the image |
[in] | _z | the Z offset in pixels where to begin copying data to the image |
[in] | _width | the width in pixels of the 2D or 3D rectangle to copy |
[in] | _height | the height in pixels of the 2D or 3D rectangle to copy |
[in] | _depth | the depth in pixels of the 2D or 3D rectangle to copy |
bool ComputeEngine::copyImageToBuffer | ( | const char * | _bufferName, |
const char * | _imageName, | ||
cl_uint | _deviceIndex, | ||
cl_uint | _x, | ||
cl_uint | _y, | ||
cl_uint | _z, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth, | ||
size_t | _bufferOffset | ||
) |
Copies an image to a buffer object (using memory object names).
[in] | _bufferName | the buffer's name |
[in] | _imageName | the image's name |
[in] | _deviceIndex | the device in which the copy command will be queued |
[in] | _x | the X offset in pixels in the image from where to copy |
[in] | _y | the Y offset in pixels in the image from where to copy |
[in] | _z | the Z offset in pixels in the image from where to copy |
[in] | _width | the width in pixels of the 2D or 3D rectangle to copy |
[in] | _height | the height in pixels of the 2D or 3D rectangle to copy |
[in] | _depth | the depth in pixels of the 2D or 3D rectangle to copy |
[in] | _bufferOffset | byte offset to the destination buffer |
bool ComputeEngine::copyImageToBuffer | ( | cl_mem | _buffer, |
cl_mem | _image, | ||
cl_uint | _deviceIndex, | ||
cl_uint | _x, | ||
cl_uint | _y, | ||
cl_uint | _z, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth, | ||
size_t | _bufferOffset | ||
) |
Copies an image to a buffer object (using memory object handles).
[in] | _buffer | the buffer to copy to |
[in] | _image | the image to copy from |
[in] | _deviceIndex | the device in which the copy command will be queued |
[in] | _x | the X offset in pixels in the image from where to copy |
[in] | _y | the Y offset in pixels in the image from where to copy |
[in] | _z | the Z offset in pixels in the image from where to copy |
[in] | _width | the width in pixels of the 2D or 3D rectangle to copy |
[in] | _height | the height in pixels of the 2D or 3D rectangle to copy |
[in] | _depth | the depth in pixels of the 2D or 3D rectangle to copy |
[in] | _bufferOffset | byte offset to the destination buffer |
bool ComputeEngine::createBuffer | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
size_t | _bytes, | ||
void * | _data | ||
) |
Creates a buffer object.
[in] | _memObjName | the buffer's name |
[in] | _memFlags | the memory flags to set |
[in] | _bytes | the buffer's size in bytes |
[in] | _data | the buffer's data |
bool ComputeEngine::createGLBufferReference | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
cl_uint | _bufferId | ||
) |
Creates an OpenGL buffer reference object.
[in] | _memObjName | the buffer's name |
[in] | _memFlags | the memory flags to set |
[in] | _bufferId | the OpenGL buffer's ID handle |
bool ComputeEngine::createGLRenderBufferReference | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
GLuint | _rboId | ||
) |
Creates an OpenGL render buffer reference object.
[in] | _memObjName | the buffer's name |
[in] | _memFlags | the memory flags to set |
[in] | _rboId | the OpenGL render buffer's ID handle |
bool ComputeEngine::createGLTexture2DReference | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
GLenum | _target, | ||
GLint | _mipLevel, | ||
GLuint | _textureId | ||
) |
Creates an OpenGL 2D texture reference object.
[in] | _memObjName | the 2D texture's name |
[in] | _memFlags | the memory flags to set |
[in] | _target | the OpenGL texture target |
[in] | _mipLevel | the texture's mipmap level |
[in] | _textureId | the OpenGL 2D texture's ID handle |
bool ComputeEngine::createGLTexture3DReference | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
GLenum | _target, | ||
GLint | _mipLevel, | ||
GLuint | _textureId | ||
) |
Creates an OpenGL 3D texture reference object.
[in] | _memObjName | the 3D texture's name |
[in] | _memFlags | the memory flags to set |
[in] | _target | the OpenGL texture target |
[in] | _mipLevel | the texture's mipmap level |
[in] | _textureId | the OpenGL 3D texture's ID handle |
bool ComputeEngine::createImage2D | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
cl_channel_order | _channelOrder, | ||
cl_channel_type | _channelType, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _rowPitch = 0 , |
||
void * | _data = NULL |
||
) |
Creates a 2D image object.
[in] | _memObjName | the image's name |
[in] | _memFlags | the memory flags to set |
[in] | _channelOrder | the number of channels and the channel layout |
[in] | _channelType | the size of the channel data type |
[in] | _width | the image width |
[in] | _height | the image height |
[in] | _rowPitch | the scan-line pitch in bytes |
[in] | _data | a pointer to the image data |
bool ComputeEngine::createImage3D | ( | const char * | _memObjName, |
cl_mem_flags | _memFlags, | ||
cl_channel_order | _channelOrder, | ||
cl_channel_type | _channelType, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth, | ||
cl_uint | _rowPitch = 0 , |
||
cl_uint | _slicePitch = 0 , |
||
void * | _data = NULL |
||
) |
Creates a 3D image object.
[in] | _memObjName | the image's name |
[in] | _memFlags | the memory flags to set |
[in] | _channelOrder | the number of channels and the channel layout |
[in] | _channelType | the size of the channel data type |
[in] | _width | the image width |
[in] | _height | the image height |
[in] | _depth | the image depth |
[in] | _rowPitch | the scan-line pitch in bytes |
[in] | _slicePitch | the size in bytes of each 2D slice in the 3D image |
[in] | _data | a pointer to the image data |
bool ComputeEngine::createImageSampler | ( | const char * | _samplerName, |
cl_bool | _normalizedCoords, | ||
cl_addressing_mode | _addressingMode, | ||
cl_filter_mode | _filterMode | ||
) |
Creates an image sampler.
[in] | _samplerName | the sampler's name |
[in] | _normalizedCoords | determines if the image coordinates specified are normalized or not |
[in] | _addressingMode | specifies how out-of-range image coordinates are handled when reading from an image |
[in] | _filterMode | the type of filter that must be applied when reading an image |
bool ComputeEngine::createKernel | ( | const char * | _programName, |
const char * | _kernelName | ||
) |
Creates a compute kernel.
[in] | _programName | the name of the program that uses the kernel |
[in] | _kernelName | the name of the kernel |
bool ComputeEngine::createProgram | ( | const char * | _programName, |
const char * | _fileName | ||
) |
Creates a program object.
[in] | _programName | the name of the program |
[in] | _fileName | the file name of the program's code |
bool ComputeEngine::executeKernel | ( | const char * | _kernelName, |
cl_uint | _deviceId, | ||
size_t * | _globalDim, | ||
size_t * | _localDim, | ||
cl_uint | _dimCount | ||
) |
Executes a kernel.
[in] | _kernelName | the name of the kernel |
[in] | _deviceId | the device to execute the kernel to |
[in] | _globalDim | the kernel's global dimension |
[in] | _localDim | the kernel's local dimension |
[in] | _dimCount | the number of dimensions |
bool ComputeEngine::finish | ( | cl_uint | _deviceIndex = 0 | ) |
Blocks all operations unitll all previously queued OpenCL commands in the specified command-queue have completed.
[in] | _deviceIndex | the device in which the command will be queued |
bool ComputeEngine::flush | ( | cl_uint | _deviceIndex = 0 | ) |
Issues all previously queued OpenCL commands in a command-queue to the device associated with the command-queue.
[in] | _deviceIndex | the device in which the command will be queued |
cl_uint ComputeEngine::getEstimatedWorkGroupSize | ( | const char * | _kernelName, |
cl_uint | _deviceIndex = 0 |
||
) |
Estimates an optimal work-group size for a given kernel.
[in] | _kernelName | the name of the kernel to estimate |
[in] | _deviceIndex | the device in which the command will be queued |
cl_kernel ComputeEngine::getKernelObject | ( | const char * | _kernelName | ) |
Accessor for a kernel's handle.
[in] | _kernelName | the name of the kernel |
cl_mem ComputeEngine::getMemObject | ( | const char * | _memObjName | ) |
Accesor for a memory object's handle.
[in] | _memObjName | the name of the memory object |
cl_sampler ComputeEngine::getSampler | ( | const char * | _samplerName | ) |
Accessor for an image sampler's handle.
[in] | _samplerName | the name of the sampler |
bool ComputeEngine::readBuffer | ( | const char * | _memObjName, |
cl_uint | _deviceIndex, | ||
cl_uint | _start, | ||
size_t | _bytes, | ||
void * | _data | ||
) |
Reads a buffer's data.
[in] | _memObjName | the buffer's name |
[in] | _deviceIndex | the device in which the read command will be queued |
[in] | _start | the offset in bytes in the buffer object to read from |
[in] | _bytes | the size in bytes of data being read |
[in] | _data | a pointer in host memory where data is to be read into |
bool ComputeEngine::readImage | ( | const char * | _memObjName, |
cl_uint | _deviceIndex, | ||
cl_uint | _x, | ||
cl_uint | _y, | ||
cl_uint | _z, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth, | ||
cl_uint | _rowPitch, | ||
cl_uint | _slicePitch, | ||
void * | _data | ||
) |
Reads from an image object.
[in] | _memObjName | the image's name |
[in] | _deviceIndex | the device in which the read command will be queued |
[in] | _x | the X offset in pixels in the image from where to read |
[in] | _y | the Y offset in pixels in the image from where to read |
[in] | _z | the Z offset in pixels in the image from where to read |
[in] | _width | the width in pixels of the 2D or 3D rectangle being read |
[in] | _height | the height in pixels of the 2D or 3D rectangle being read |
[in] | _depth | the depth in pixels of the 2D or 3D rectangle being read |
[in] | _rowPitch | the length of each row in bytes |
[in] | _slicePitch | the size in bytes of the 2D slice of the 3D region |
[in] | _data | the pointer to a buffer in host memory where image data is to be read from |
bool ComputeEngine::releaseGLObject | ( | const char * | _memObjName, |
cl_uint | _deviceIndex = 0 |
||
) |
Releases an OpenGL reference object from any OpenCL operations.
[in] | _memObjName | the reference object's name |
[in] | _deviceIndex | the device in which the release command will be queued |
bool ComputeEngine::setKernelArg | ( | const char * | _kernelName, |
cl_uint | _index, | ||
const char * | _memObjName | ||
) |
Sets a kernel memory object argument.
[in] | _kernelName | the name of the kernel |
[in] | _index | the argument's index |
[in] | _memObjName | the memory object to set as the argument's value |
bool ComputeEngine::setKernelArg | ( | const char * | _kernelName, |
cl_uint | _index, | ||
void * | _argsValue, | ||
size_t | _argsSize | ||
) |
Sets a kernel argument for any arbitary variable.
[in] | _kernelName | the name of the kernel |
[in] | _index | the argument's index |
[in] | _argsValue | the argument's value |
[in] | _argsSize | the argument's size in bytes |
bool ComputeEngine::setKernelArgs | ( | const char * | _kernelName, |
... | |||
) |
Sets multiple kernel arguments.
[in] | _kernelName | the name of the kernel |
[in] | ... | multiple argument values and sizes |
bool ComputeEngine::swapMemObjects | ( | const char * | _memObjNameA, |
const char * | _memObjNameB | ||
) |
Swaps two memory objects.
[in] | _memObjNameA | the first memory object's name |
[in] | _memObjNameB | the second memory object's name |
bool ComputeEngine::writeBuffer | ( | const char * | _memObjName, |
cl_uint | _deviceIndex, | ||
cl_uint | _start, | ||
size_t | _bytes, | ||
void * | _data | ||
) |
Writes data to a buffer.
[in] | _memObjName | the buffer's name |
[in] | _deviceIndex | the device in which the write command will be queued |
[in] | _start | the offset in bytes in the buffer object to write to |
[in] | _bytes | the size in bytes of data being written |
[in] | _data | a pointer in host memory where data is to be written from |
bool ComputeEngine::writeImage | ( | const char * | _memObjName, |
cl_uint | _deviceIndex, | ||
cl_uint | _x, | ||
cl_uint | _y, | ||
cl_uint | _z, | ||
cl_uint | _width, | ||
cl_uint | _height, | ||
cl_uint | _depth, | ||
cl_uint | _rowPitch, | ||
cl_uint | _slicePitch, | ||
void * | _data | ||
) |
Writes to an image object.
[in] | _memObjName | the image's name |
[in] | _deviceIndex | the device in which the write command will be queued |
[in] | _x | the X offset in pixels in the image from where to write |
[in] | _y | the Y offset in pixels in the image from where to write |
[in] | _z | the Z offset in pixels in the image from where to write |
[in] | _width | the width in pixels of the 2D or 3D rectangle being writen |
[in] | _height | the height in pixels of the 2D or 3D rectangle being writen |
[in] | _depth | the depth in pixels of the 2D or 3D rectangle being writen |
[in] | _rowPitch | the length of each row in bytes |
[in] | _slicePitch | the size in bytes of the 2D slice of the 3D region |
[in] | _data | the pointer to a buffer in host memory where image data is to be written to |