Image Component Library (ICL)
|
Wrapper for an OpenCL Buffer. More...
#include <CLBuffer.h>
Public Member Functions | |
CLBuffer () | |
default constructor (creates null instance) | |
CLBuffer (const CLBuffer &other) | |
copy constructor (always performs shallow copy) | |
CLBuffer & | operator= (const CLBuffer &other) |
assignment operator (always performs a shallow copy) | |
~CLBuffer () | |
destructor | |
void | copy (CLBuffer &dst, int len, int src_offset=0, int dst_offset=0) throw (CLBufferException) |
copies the content of this buffer into the given buffer | |
void | read (void *dst, int len, int offset=0, bool block=true) throw (CLBufferException) |
reads buffer from graphics memory into given destination pointer | |
void | write (const void *src, int len, int offset=0, bool block=true) throw (CLBufferException) |
writes source data into the graphics memory | |
bool | isNull () const |
checks whether buffer is null | |
operator bool () const | |
checks whether buffer is not null | |
Private Member Functions | |
CLBuffer (cl::Context &context, cl::CommandQueue &cmdQueue, const string &accessMode, size_t size, const void *src=NULL) throw (CLBufferException) | |
private constructor (buffer can only be created by CLProgram instances) | |
cl::Buffer & | getBuffer () |
provides access to the underlying cl-buffer | |
const cl::Buffer & | getBuffer () const |
Private Attributes | |
Impl * | impl |
internal hidden implementation type | |
Friends | |
class | CLProgram |
for tight integration with CLProgram instances | |
class | CLKernel |
for tight integration with CLKernel instances |
Wrapper for an OpenCL Buffer.
Valid CLBuffer instances can only be created by a CLProgram instance.
icl::utils::CLBuffer::CLBuffer | ( | cl::Context & | context, |
cl::CommandQueue & | cmdQueue, | ||
const string & | accessMode, | ||
size_t | size, | ||
const void * | src = NULL |
||
) | throw (CLBufferException) [private] |
private constructor (buffer can only be created by CLProgram instances)
default constructor (creates null instance)
icl::utils::CLBuffer::CLBuffer | ( | const CLBuffer & | other | ) |
copy constructor (always performs shallow copy)
destructor
void icl::utils::CLBuffer::copy | ( | CLBuffer & | dst, |
int | len, | ||
int | src_offset = 0 , |
||
int | dst_offset = 0 |
||
) | throw (CLBufferException) |
copies the content of this buffer into the given buffer
cl::Buffer& icl::utils::CLBuffer::getBuffer | ( | ) | [private] |
provides access to the underlying cl-buffer
const cl::Buffer& icl::utils::CLBuffer::getBuffer | ( | ) | const [private] |
bool icl::utils::CLBuffer::isNull | ( | ) | const [inline] |
checks whether buffer is null
icl::utils::CLBuffer::operator bool | ( | ) | const [inline] |
checks whether buffer is not null
assignment operator (always performs a shallow copy)
void icl::utils::CLBuffer::read | ( | void * | dst, |
int | len, | ||
int | offset = 0 , |
||
bool | block = true |
||
) | throw (CLBufferException) |
reads buffer from graphics memory into given destination pointer
void icl::utils::CLBuffer::write | ( | const void * | src, |
int | len, | ||
int | offset = 0 , |
||
bool | block = true |
||
) | throw (CLBufferException) |
writes source data into the graphics memory
Impl* icl::utils::CLBuffer::impl [private] |
internal hidden implementation type
internal implemetation