Clover Git
OpenCL 1.1 software implementation
Defines | Functions | Variables

api_memory.cpp File Reference

Memory objects. More...

#include "CL/cl.h"
#include <core/memobject.h>
#include <core/context.h>
#include <cstring>
Include dependency graph for api_memory.cpp:

Go to the source code of this file.

Defines

#define MIN(a, b)   ((a) < (b) ? (a) : (b))

Functions

cl_mem clCreateBuffer (cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_int *errcode_ret)
cl_mem clCreateSubBuffer (cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const void *buffer_create_info, cl_int *errcode_ret)
cl_mem clCreateImage2D (cl_context context, cl_mem_flags flags, const cl_image_format *image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void *host_ptr, cl_int *errcode_ret)
cl_mem clCreateImage3D (cl_context context, cl_mem_flags flags, const cl_image_format *image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void *host_ptr, cl_int *errcode_ret)
cl_int clRetainMemObject (cl_mem memobj)
cl_int clReleaseMemObject (cl_mem memobj)
cl_int clGetSupportedImageFormats (cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format *image_formats, cl_uint *num_image_formats)
cl_int clGetMemObjectInfo (cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
cl_int clGetImageInfo (cl_mem image, cl_image_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
cl_int clSetMemObjectDestructorCallback (cl_mem memobj, void(CL_CALLBACK *pfn_notify)(cl_mem memobj, void *user_data), void *user_data)

Variables

static cl_image_format supported_formats []

Detailed Description

Memory objects.

Definition in file api_memory.cpp.


Define Documentation

#define MIN (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 341 of file api_memory.cpp.

Referenced by clGetSupportedImageFormats().


Function Documentation

cl_mem clCreateBuffer ( cl_context  context,
cl_mem_flags  flags,
size_t  size,
void *  host_ptr,
cl_int *  errcode_ret 
)

Definition at line 41 of file api_memory.cpp.

References Coal::MemObject::init(), and Coal::Object::T_Context.

cl_mem clCreateImage2D ( cl_context  context,
cl_mem_flags  flags,
const cl_image_format *  image_format,
size_t  image_width,
size_t  image_height,
size_t  image_row_pitch,
void *  host_ptr,
cl_int *  errcode_ret 
)

Definition at line 128 of file api_memory.cpp.

References Coal::MemObject::init(), and Coal::Object::T_Context.

cl_mem clCreateImage3D ( cl_context  context,
cl_mem_flags  flags,
const cl_image_format *  image_format,
size_t  image_width,
size_t  image_height,
size_t  image_depth,
size_t  image_row_pitch,
size_t  image_slice_pitch,
void *  host_ptr,
cl_int *  errcode_ret 
)

Definition at line 164 of file api_memory.cpp.

References Coal::MemObject::init(), and Coal::Object::T_Context.

cl_mem clCreateSubBuffer ( cl_mem  buffer,
cl_mem_flags  flags,
cl_buffer_create_type  buffer_create_type,
const void *  buffer_create_info,
cl_int *  errcode_ret 
)
cl_int clGetImageInfo ( cl_mem  image,
cl_image_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)
cl_int clGetMemObjectInfo ( cl_mem  memobj,
cl_mem_info  param_name,
size_t  param_value_size,
void *  param_value,
size_t *  param_value_size_ret 
)

Definition at line 374 of file api_memory.cpp.

References Coal::Object::T_MemObject.

cl_int clGetSupportedImageFormats ( cl_context  context,
cl_mem_flags  flags,
cl_mem_object_type  image_type,
cl_uint  num_entries,
cl_image_format *  image_formats,
cl_uint *  num_image_formats 
)

Definition at line 344 of file api_memory.cpp.

References MIN, supported_formats, and Coal::Object::T_Context.

cl_int clReleaseMemObject ( cl_mem  memobj)

Definition at line 214 of file api_memory.cpp.

References Coal::Object::T_MemObject.

cl_int clRetainMemObject ( cl_mem  memobj)

Definition at line 203 of file api_memory.cpp.

References Coal::Object::T_MemObject.

cl_int clSetMemObjectDestructorCallback ( cl_mem  memobj,
void(CL_CALLBACK *pfn_notify)(cl_mem memobj,void *user_data)  ,
void *  user_data 
)

Definition at line 406 of file api_memory.cpp.

References Coal::Object::T_MemObject.


Variable Documentation

cl_image_format supported_formats[] [static]

Definition at line 225 of file api_memory.cpp.

Referenced by clGetSupportedImageFormats().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines