Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes | Friends
icl::utils::CLImage2D Class Reference

Wrapper for an OpenCL Image2D. More...

#include <CLImage2D.h>

List of all members.

Public Member Functions

 CLImage2D ()
 default constructor (creates null instance)
 CLImage2D (const CLImage2D &other)
 copy constructor (always performs shallow copy)
CLImage2Doperator= (const CLImage2D &other)
 assignment operator (always performs a shallow copy)
 ~CLImage2D ()
 destructor
void read (void *dst, const utils::Rect &region=utils::Rect::null, bool block=true) throw (CLBufferException)
 reads image from graphics memory into given destination pointer
void write (const void *src, const utils::Rect &region=utils::Rect::null, bool block=true) throw (CLBufferException)
 writes source data into the graphics memory
bool isNull () const
 checks whether image is null
 operator bool () const
 checks whether image is not null

Private Member Functions

 CLImage2D (cl::Context &context, cl::CommandQueue &cmdQueue, const string &accessMode, const size_t width, const size_t height, int depth, const void *src=NULL) throw (CLBufferException)
 private constructor (image can only be created by CLProgram instances)
cl::Image2D getImage2D ()
 provides access to the underlying cl-Image2D object
const cl::Image2D getImage2D () 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

Detailed Description

Wrapper for an OpenCL Image2D.

Valid CLImage2D instances can only be created by a CLProgram instance.

See also:
CLProgram for more details

Constructor & Destructor Documentation

icl::utils::CLImage2D::CLImage2D ( cl::Context &  context,
cl::CommandQueue &  cmdQueue,
const string &  accessMode,
const size_t  width,
const size_t  height,
int  depth,
const void *  src = NULL 
) throw (CLBufferException) [private]

private constructor (image can only be created by CLProgram instances)

default constructor (creates null instance)

copy constructor (always performs shallow copy)

destructor


Member Function Documentation

cl::Image2D icl::utils::CLImage2D::getImage2D ( ) [private]

provides access to the underlying cl-Image2D object

const cl::Image2D icl::utils::CLImage2D::getImage2D ( ) const [private]
bool icl::utils::CLImage2D::isNull ( ) const [inline]

checks whether image is null

icl::utils::CLImage2D::operator bool ( ) const [inline]

checks whether image is not null

CLImage2D& icl::utils::CLImage2D::operator= ( const CLImage2D other)

assignment operator (always performs a shallow copy)

void icl::utils::CLImage2D::read ( void *  dst,
const utils::Rect region = utils::Rect::null,
bool  block = true 
) throw (CLBufferException)

reads image from graphics memory into given destination pointer

region defines the accessed image area. When no region is provided the complete image is addressed(initial width, height and (0, 0) as origin

void icl::utils::CLImage2D::write ( const void *  src,
const utils::Rect region = utils::Rect::null,
bool  block = true 
) throw (CLBufferException)

writes source data into the graphics memory

region defines the accessed image area. When no region is provided the complete image is addressed(initial width, height and (0, 0) as origin


Friends And Related Function Documentation

friend class CLKernel [friend]

for tight integration with CLKernel instances

friend class CLProgram [friend]

for tight integration with CLProgram instances


Member Data Documentation

Impl* icl::utils::CLImage2D::impl [private]

internal hidden implementation type

internal implemetation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines