35#ifndef __itkOpenCLBuffer_h
36#define __itkOpenCLBuffer_h
80 bool Read(
void * data,
const std::size_t size,
const std::size_t offset = 0 );
90 const std::size_t offset = 0 );
98 bool Write(
const void * data,
const std::size_t size,
const std::size_t offset = 0 );
108 const std::size_t offset = 0 );
118 const std::size_t bufferBytesPerLine,
const std::size_t hostBytesPerLine );
127 const std::size_t bufferBytesPerLine,
const std::size_t hostBytesPerLine,
139 const std::size_t origin[ 3 ],
const std::size_t size[ 3 ],
140 const std::size_t bufferBytesPerLine,
const std::size_t bufferBytesPerSlice,
141 const std::size_t hostBytesPerLine,
const std::size_t hostBytesPerSlice );
150 const std::size_t origin[ 3 ],
const std::size_t size[ 3 ],
151 const std::size_t bufferBytesPerLine,
const std::size_t bufferBytesPerSlice,
152 const std::size_t hostBytesPerLine,
const std::size_t hostBytesPerSlice,
162 const std::size_t bufferBytesPerLine,
const std::size_t hostBytesPerLine );
171 const std::size_t bufferBytesPerLine,
const std::size_t hostBytesPerLine,
182 const std::size_t origin[ 3 ],
const std::size_t size[ 3 ],
183 const std::size_t bufferBytesPerLine,
const std::size_t bufferBytesPerSlice,
184 const std::size_t hostBytesPerLine,
const std::size_t hostBytesPerSlice );
193 const std::size_t origin[ 3 ],
const std::size_t size[ 3 ],
194 const std::size_t bufferBytesPerLine,
const std::size_t bufferBytesPerSlice,
195 const std::size_t hostBytesPerLine,
const std::size_t hostBytesPerSlice,
205 const std::size_t dst_offset = 0,
const std::size_t offset = 0 );
214 const std::size_t size,
216 const std::size_t dst_offset = 0,
217 const std::size_t offset = 0 );
226 const std::size_t src_offset = 0 );
237 const std::size_t src_offset = 0 );
248 const std::size_t bufferBytesPerLine, std::size_t destBytesPerLine );
258 const std::size_t bufferBytesPerLine,
const std::size_t destBytesPerLine,
270 const std::size_t origin[ 3 ],
const std::size_t size[ 3 ],
271 const std::size_t destOrigin[ 3 ],
272 const std::size_t bufferBytesPerLine,
const std::size_t bufferBytesPerSlice,
273 const std::size_t destBytesPerLine,
const std::size_t destBytesPerSlice );
282 const std::size_t origin[ 3 ],
const std::size_t size[ 3 ],
283 const std::size_t destOrigin[ 3 ],
284 const std::size_t bufferBytesPerLine,
const std::size_t bufferBytesPerSlice,
285 const std::size_t destBytesPerLine,
const std::size_t destBytesPerSlice,
295 const std::size_t size,
const std::size_t offset = 0 );
305 const std::size_t offset = 0 );
319 const std::size_t size,
const std::size_t offset = 0 );
The OpenCLBuffer class represents an OpenCL buffer object.
bool CopyToImage(const OpenCLImage &dest, const OpenCLSize &origin, const OpenCLSize ®ion, const std::vcl_size_t src_offset=0)
OpenCLBuffer CreateSubBuffer(const OpenCLMemoryObject::Access access, const std::vcl_size_t size, const std::vcl_size_t offset=0)
bool CopyToBuffer(const OpenCLBuffer &dest, const std::vcl_size_t size, const std::vcl_size_t dst_offset=0, const std::vcl_size_t offset=0)
OpenCLEvent MapAsync(void **ptr, const OpenCLMemoryObject::Access access, const std::vcl_size_t size, const OpenCLEventList &event_list=OpenCLEventList(), const std::vcl_size_t offset=0)
bool CopyToRect(const OpenCLBuffer &dest, const std::vcl_size_t origin[3], const std::vcl_size_t size[3], const std::vcl_size_t destOrigin[3], const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t bufferBytesPerSlice, const std::vcl_size_t destBytesPerLine, const std::vcl_size_t destBytesPerSlice)
OpenCLEvent WriteAsync(const void *data, const std::vcl_size_t size, const OpenCLEventList &event_list=OpenCLEventList(), const std::vcl_size_t offset=0)
void * Map(const OpenCLMemoryObject::Access access, const std::vcl_size_t size, const std::vcl_size_t offset=0)
OpenCLEvent CopyToImageAsync(const OpenCLImage &dest, const OpenCLSize &origin, const OpenCLSize ®ion, const OpenCLEventList &event_list=OpenCLEventList(), const std::vcl_size_t src_offset=0)
OpenCLEvent WriteRectAsync(const void *data, const RectangleType &rect, const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t hostBytesPerLine, const OpenCLEventList &event_list=OpenCLEventList())
bool Read(void *data, const std::vcl_size_t size, const std::vcl_size_t offset=0)
bool ReadRect(void *data, const std::vcl_size_t origin[3], const std::vcl_size_t size[3], const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t bufferBytesPerSlice, const std::vcl_size_t hostBytesPerLine, const std::vcl_size_t hostBytesPerSlice)
void * Map(const OpenCLMemoryObject::Access access)
OpenCLEvent ReadAsync(void *data, const std::vcl_size_t size, const OpenCLEventList &event_list=OpenCLEventList(), const std::vcl_size_t offset=0)
std::vcl_size_t GetOffset() const
OpenCLEvent WriteRectAsync(const void *data, const std::vcl_size_t origin[3], const std::vcl_size_t size[3], const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t bufferBytesPerSlice, const std::vcl_size_t hostBytesPerLine, const std::vcl_size_t hostBytesPerSlice, const OpenCLEventList &event_list=OpenCLEventList())
bool ReadRect(void *data, const RectangleType &rect, const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t hostBytesPerLine)
OpenCLEvent CopyToRectAsync(const OpenCLBuffer &dest, const std::vcl_size_t origin[3], const std::vcl_size_t size[3], const std::vcl_size_t destOrigin[3], const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t bufferBytesPerSlice, const std::vcl_size_t destBytesPerLine, const std::vcl_size_t destBytesPerSlice, const OpenCLEventList &event_list=OpenCLEventList())
OpenCLEvent CopyToRectAsync(const OpenCLBuffer &dest, const RectangleType &rect, const PointType &destPoint, const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t destBytesPerLine, const OpenCLEventList &event_list=OpenCLEventList())
OpenCLEvent ReadRectAsync(void *data, const RectangleType &rect, const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t hostBytesPerLine, const OpenCLEventList &event_list=OpenCLEventList())
bool Write(const void *data, const std::vcl_size_t size, const std::vcl_size_t offset=0)
OpenCLBuffer & operator=(const OpenCLBuffer &other)
OpenCLBuffer(const OpenCLBuffer &other)
OpenCLEvent ReadRectAsync(void *data, const std::vcl_size_t origin[3], const std::vcl_size_t size[3], const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t bufferBytesPerSlice, const std::vcl_size_t hostBytesPerLine, const std::vcl_size_t hostBytesPerSlice, const OpenCLEventList &event_list=OpenCLEventList())
bool WriteRect(const void *data, const std::vcl_size_t origin[3], const std::vcl_size_t size[3], const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t bufferBytesPerSlice, const std::vcl_size_t hostBytesPerLine, const std::vcl_size_t hostBytesPerSlice)
OpenCLEvent CopyToBufferAsync(const OpenCLBuffer &dest, const std::vcl_size_t size, const OpenCLEventList &event_list=OpenCLEventList(), const std::vcl_size_t dst_offset=0, const std::vcl_size_t offset=0)
OpenCLBuffer(OpenCLContext *context, const cl_mem id)
bool WriteRect(const void *data, const RectangleType &rect, const std::vcl_size_t bufferBytesPerLine, const std::vcl_size_t hostBytesPerLine)
bool CopyToRect(const OpenCLBuffer &dest, const RectangleType &rect, const PointType &destPoint, const std::vcl_size_t bufferBytesPerLine, std::vcl_size_t destBytesPerLine)
OpenCLBuffer GetParentBuffer() const
The OpenCLContext class represents an OpenCL context.
OpenCLEventList class represents a list of OpenCLEvent objects.
OpenCLEvent class represents an OpenCL event object.
The OpenCLImage class represents an image object is used to store a one, two or three dimensional tex...
The OpenCLMemoryObject class represents all common memory objects such as buffers and image objects.
Point< std::vcl_size_t, 2 > PointType
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.