OpenCL C++ Wrapper API 1.1
Namespaces | Classes | Typedefs | Functions | Variables
cl Namespace Reference

The OpenCL C++ bindings are defined within this namespace. More...

Namespaces

namespace  detail

Classes

class  Error
 Exception class. More...
class  string
 Simple string class, that provides a limited subset of std::string functionality but avoids many of the issues that come with that class. More...
class  vector
 Fixed sized vector implementation that mirroring std::vector functionality. More...
struct  size_t
 size_t class used to interface between C++ and OpenCL C calls that require arrays of size_t values, who's size is known statically. More...
struct  ImageFormat
 ImageFormat interface fro cl_image_format. More...
class  Device
 Device interface for cl_device_id. More...
class  Platform
 Platform interface. More...
class  Context
class  Event
 Event interface for cl_event. More...
class  Memory
 Memory interface for cl_mem. More...
class  Buffer
 Memory buffer interface. More...
class  BufferGL
 Memory buffer interface for GL interop. More...
class  BufferRenderGL
 Memory buffer interface for GL interop with renderbuffer. More...
class  Image
 Base class interface for all images. More...
class  Image2D
 Image interface for 2D images. More...
class  Image2DGL
 2D image interface for GL interop. More...
class  Image3D
 Image interface for 3D images. More...
class  Image3DGL
class  Sampler
 Sampler interface for cl_sampler. More...
class  NDRange
 NDRange interface. More...
struct  LocalSpaceArg
 Local address raper for use with Kernel::setArg. More...
class  Kernel
 Kernel interface that implements cl_kernel. More...
class  Program
 Program interface that implements cl_program. More...
class  CommandQueue
 CommandQueue interface for cl_command_queue. More...

Typedefs

typedef std::string STRING_CLASS

Functions

static cl_int UnloadCompiler ()
static cl_int WaitForEvents (const VECTOR_CLASS< Event > &events)
LocalSpaceArg __local (::size_t size)
__attribute__((weak)) volatile
int CommandQueue __attribute__((weak))
CommandQueue CommandQueue
__attribute__((weak)) volatile
cl_int CommandQueue cl_int 
enqueueReadBuffer (const Buffer &buffer, cl_bool blocking,::size_t offset,::size_t size, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueWriteBuffer (const Buffer &buffer, cl_bool blocking,::size_t offset,::size_t size, const void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueCopyBuffer (const Buffer &src, const Buffer &dst,::size_t src_offset,::size_t dst_offset,::size_t size, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueReadImage (const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > &region,::size_t row_pitch,::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueWriteImage (const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > &region,::size_t row_pitch,::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueCopyImage (const Image &src, const Image &dst, const size_t< 3 > &src_origin, const size_t< 3 > &dst_origin, const size_t< 3 > &region, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueCopyImageToBuffer (const Image &src, const Buffer &dst, const size_t< 3 > &src_origin, const size_t< 3 > &region,::size_t dst_offset, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int enqueueCopyBufferToImage (const Buffer &src, const Image &dst,::size_t src_offset, const size_t< 3 > &dst_origin, const size_t< 3 > &region, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int flush (void)
cl_int finish (void)

Variables

static const NDRange NullRange

Detailed Description

The OpenCL C++ bindings are defined within this namespace.


Typedef Documentation

typedef std::string cl::STRING_CLASS

Definition at line 426 of file cl.hpp.


Function Documentation

LocalSpaceArg cl::__local ( ::size_t  size) [inline]

Definition at line 2690 of file cl.hpp.

{
    LocalSpaceArg ret = { size };
    return ret;
}
cl_int cl::enqueueCopyBuffer ( const Buffer &  src,
const Buffer &  dst,
::size_t  src_offset,
::size_t  dst_offset,
::size_t  size,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 3932 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueCopyBuffer(src, dst, src_offset, dst_offset, size, events, event);
}
cl_int cl::enqueueCopyBufferToImage ( const Buffer &  src,
const Image &  dst,
::size_t  src_offset,
const size_t< 3 > &  dst_origin,
const size_t< 3 > &  region,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 4171 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueCopyBufferToImage(
        src,
        dst,
        src_offset,
        dst_origin,
        region,
        events,
        event);
}
cl_int cl::enqueueCopyImage ( const Image &  src,
const Image &  dst,
const size_t< 3 > &  src_origin,
const size_t< 3 > &  dst_origin,
const size_t< 3 > &  region,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 4119 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueCopyImage(
        src,
        dst,
        src_origin,
        dst_origin,
        region,
        events,
        event);
}
cl_int cl::enqueueCopyImageToBuffer ( const Image &  src,
const Buffer &  dst,
const size_t< 3 > &  src_origin,
const size_t< 3 > &  region,
::size_t  dst_offset,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 4145 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueCopyImageToBuffer(
        src,
        dst,
        src_origin,
        region,
        dst_offset,
        events,
        event);
}
__attribute__ ((weak)) volatile int CommandQueue __attribute__ ((weak)) CommandQueue CommandQueue __attribute__ ((weak)) volatile cl_int CommandQueue cl_int cl::enqueueReadBuffer ( const Buffer &  buffer,
cl_bool  blocking,
::size_t  offset,
::size_t  size,
void *  ptr,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) volatile [inline]

Definition at line 3894 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueReadBuffer(buffer, blocking, offset, size, ptr, events, event);
}
cl_int cl::enqueueReadImage ( const Image &  image,
cl_bool  blocking,
const size_t< 3 > &  origin,
const size_t< 3 > &  region,
::size_t  row_pitch,
::size_t  slice_pitch,
void *  ptr,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 4059 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueReadImage(
        image,
        blocking,
        origin,
        region,
        row_pitch,
        slice_pitch,
        ptr,
        events, 
        event);
}
cl_int cl::enqueueWriteBuffer ( const Buffer &  buffer,
cl_bool  blocking,
::size_t  offset,
::size_t  size,
const void *  ptr,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 3913 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueWriteBuffer(buffer, blocking, offset, size, ptr, events, event);
}
cl_int cl::enqueueWriteImage ( const Image &  image,
cl_bool  blocking,
const size_t< 3 > &  origin,
const size_t< 3 > &  region,
::size_t  row_pitch,
::size_t  slice_pitch,
void *  ptr,
const VECTOR_CLASS< Event > *  events = NULL,
Event *  event = NULL 
) [inline]

Definition at line 4089 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.enqueueWriteImage(
        image,
        blocking,
        origin,
        region,
        row_pitch,
        slice_pitch,
        ptr,
        events, 
        event);
}
cl_int cl::finish ( void  ) [inline]

Definition at line 4210 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }


    return queue.finish();
}
cl_int cl::flush ( void  ) [inline]

Definition at line 4198 of file cl.hpp.

{
    cl_int error;
    CommandQueue queue = CommandQueue::getDefault(&error);

    if (error != CL_SUCCESS) {
        return error;
    }

    return queue.flush();
}
static cl_int cl::UnloadCompiler ( ) [inline, static]

Definition at line 1604 of file cl.hpp.

{
    return ::clUnloadCompiler();
}
static cl_int cl::WaitForEvents ( const VECTOR_CLASS< Event > &  events) [inline, static]

Definition at line 1977 of file cl.hpp.

{
    return detail::errHandler(
        ::clWaitForEvents(
            (cl_uint) events.size(), (cl_event*)&events.front()),
        __WAIT_FOR_EVENTS_ERR);
}

Variable Documentation

const NDRange cl::NullRange [static]

Definition at line 2659 of file cl.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Defines