cf4ocl (C Framework for OpenCL)  v2.1.0
Object-oriented framework for developing and benchmarking OpenCL projects in C/C++
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ccl_buffer Struct Reference

Buffer wrapper class. More...

Inheritance diagram for ccl_buffer:
Inheritance graph
Collaboration diagram for ccl_buffer:
Collaboration graph

Public Member Functions

void ccl_buffer_destroy (CCLBuffer *buf)
 Decrements the reference count of the wrapper object. More...
 
CCLEventccl_buffer_enqueue_copy (CCLBuffer *src_buf, CCLBuffer *dst_buf, CCLQueue *cq, size_t src_offset, size_t dst_offset, size_t size, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Copy from one buffer object to another. More...
 
CCLEventccl_buffer_enqueue_copy_rect (CCLBuffer *src_buf, CCLBuffer *dst_buf, CCLQueue *cq, const size_t *src_origin, const size_t *dst_origin, const size_t *region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Copy a 2D or 3D rectangular region from a buffer object to another buffer object. More...
 
CCLEventccl_buffer_enqueue_copy_to_image (CCLBuffer *src_buf, CCLImage *dst_img, CCLQueue *cq, size_t src_offset, const size_t *dst_origin, const size_t *region, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Copy a buffer object to an image object. More...
 
CCLEventccl_buffer_enqueue_fill (CCLBuffer *buf, CCLQueue *cq, const void *pattern, size_t pattern_size, size_t offset, size_t size, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Fill a buffer object with a pattern of a given pattern size. More...
 
void * ccl_buffer_enqueue_map (CCLBuffer *buf, CCLQueue *cq, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, CCLEventWaitList *evt_wait_lst, CCLEvent **evt, CCLErr **err)
 Map a region of a buffer into the host address space and return a pointer to this mapped region. More...
 
CCLEventccl_buffer_enqueue_read (CCLBuffer *buf, CCLQueue *cq, cl_bool blocking_read, size_t offset, size_t size, void *ptr, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Read from a buffer object to host memory. More...
 
CCLEventccl_buffer_enqueue_read_rect (CCLBuffer *buf, CCLQueue *cq, cl_bool blocking_read, const size_t *buffer_origin, const size_t *host_origin, const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void *ptr, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Read from a 2D or 3D rectangular region from a buffer object to host memory. More...
 
CCLEventccl_buffer_enqueue_write (CCLBuffer *buf, CCLQueue *cq, cl_bool blocking_write, size_t offset, size_t size, void *ptr, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Write to a buffer object from host memory. More...
 
CCLEventccl_buffer_enqueue_write_rect (CCLBuffer *buf, CCLQueue *cq, cl_bool blocking_write, const size_t *buffer_origin, const size_t *host_origin, const size_t *region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void *ptr, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Write a 2D or 3D rectangular region to a buffer object from host memory. More...
 
CCLBufferccl_buffer_new (CCLContext *ctx, cl_mem_flags flags, size_t size, void *host_ptr, CCLErr **err)
 Create a CCLBuffer wrapper object. More...
 
CCLBufferccl_buffer_new_from_region (CCLBuffer *buf, cl_mem_flags flags, size_t origin, size_t size, CCLErr **err)
 Creates a sub-buffer that represents a specific region in the given buffer. More...
 
- Public Member Functions inherited from ccl_memobj
CCLEventccl_memobj_enqueue_migrate (CCLMemObj **mos, cl_uint num_mos, CCLQueue *cq, cl_mem_migration_flags flags, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Enqueues a command to indicate which device a set of memory objects should be associated with. More...
 
CCLEventccl_memobj_enqueue_unmap (CCLMemObj *mo, CCLQueue *cq, void *mapped_ptr, CCLEventWaitList *evt_wait_lst, CCLErr **err)
 Enqueues a command to unmap a previously mapped region of a memory object. More...
 
cl_uint ccl_memobj_get_opencl_version (CCLMemObj *mo, CCLErr **err)
 Get the OpenCL version of the platform associated with this memory object. More...
 
cl_bool ccl_memobj_set_destructor_callback (CCLMemObj *mo, ccl_memobj_destructor_callback pfn_notify, void *user_data, CCLErr **err)
 Wrapper for OpenCL clSetMemObjectDestructorCallback() function. More...
 
- Public Member Functions inherited from ccl_wrapper
CCLWrapperInfoccl_wrapper_get_info (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err)
 Get information about any wrapped OpenCL object. More...
 
size_t ccl_wrapper_get_info_size (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err)
 Get information size. More...
 
void * ccl_wrapper_get_info_value (CCLWrapper *wrapper1, CCLWrapper *wrapper2, cl_uint param_name, size_t min_size, CCLInfo info_type, cl_bool use_cache, CCLErr **err)
 Get pointer to information value. More...
 
cl_bool ccl_wrapper_memcheck ()
 Debug function which checks if memory allocated by wrappers has been properly freed. More...
 
void ccl_wrapper_ref (CCLWrapper *wrapper)
 Increase the reference count of the wrapper object. More...
 
int ccl_wrapper_ref_count (CCLWrapper *wrapper)
 Returns the wrapper object reference count. More...
 
void * ccl_wrapper_unwrap (CCLWrapper *wrapper)
 Get the wrapped OpenCL object. More...
 

Protected Member Functions

CCLBufferccl_buffer_new_wrap (cl_mem mem_object)
 Get the buffer wrapper for the given OpenCL buffer. More...
 

Additional Inherited Members

- Public Types inherited from ccl_memobj
typedef void(* ccl_memobj_destructor_callback )(cl_mem memobj, void *user_data)
 Prototype for memory object destructor callback functions. More...
 
typedef void(* ccl_memobj_destructor_callback )(cl_mem memobj, void *user_data)
 Prototype for memory object destructor callback functions. More...
 

Detailed Description

Buffer wrapper class.

Examples:
canon.c.

Definition at line 40 of file ccl_buffer_wrapper.c.