On this page:
cl  Create  Buffer
cl  Enqueue  Read  Buffer
cl  Enqueue  Write  Buffer
cl  Enqueue  Copy  Buffer
cl  Retain  Mem  Object
cl  Release  Mem  Object
cl  Create  Image2D
cl  Create  Image3D
cl  Get  Supported  Image  Formats:  count
cl  Get  Supported  Image  Formats
cl  Get  Supported  Image  Formats:  vector
cl  Enqueue  Read  Image
cl  Enqueue  Write  Image
cl  Enqueue  Copy  Image
cl  Enqueue  Copy  Image  To  Buffer
cl  Enqueue  Copy  Buffer  To  Image
cl  Enqueue  Map  Buffer
cl  Enqueue  Map  Image
cl  Enqueue  Unmap  Mem  Object
cl  Get  Mem  Object  Info
cl  Get  Mem  Object  Info:  length
cl  Get  Mem  Object  Info:  _  cl_  mem_  object_  type
cl  Get  Mem  Object  Info:  _  cl_  mem_  flags
cl  Get  Mem  Object  Info:  _  size_  t
cl  Get  Mem  Object  Info:  _  void*
cl  Get  Mem  Object  Info:  _  cl_  uint
cl  Get  Mem  Object  Info:  _  cl_  context
cl  Get  Mem  Object  Info/  c
cl  Get  Mem  Object  Info:  generic
cl  Get  Image  Info
cl  Get  Image  Info:  length
cl  Get  Image  Info:  _  cl_  image_  format
cl  Get  Image  Info:  _  size_  t
cl  Get  Image  Info/  c
cl  Get  Image  Info:  generic
1.3.2 Memory Objects

 (require opencl/c/5-2) package: opencl

procedure

(clCreateBuffer ctxt mem-flags size host-ptr)  _cl_mem/c

  ctxt : _cl_context/c
  mem-flags : _cl_mem_flags/c
  size : _size_t/c
  host-ptr : _void*/null/c

procedure

(clEnqueueReadBuffer cq    
  buffer    
  blocking?    
  offset    
  cb    
  ptr    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  buffer : _cl_mem/c
  blocking? : _cl_bool/c
  offset : _size_t/c
  cb : _size_t/c
  ptr : _void*/c
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueWriteBuffer cq    
  buffer    
  blocking?    
  offset    
  cb    
  ptr    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  buffer : _cl_mem/c
  blocking? : _cl_bool/c
  offset : _size_t/c
  cb : _size_t/c
  ptr : _void*/c
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueCopyBuffer cq    
  src    
  dst    
  src_offset    
  dst_offset    
  cb    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  src : _cl_mem/c
  dst : _cl_mem/c
  src_offset : _size_t/c
  dst_offset : _size_t/c
  cb : _size_t/c
  wait-list : (vectorof _cl_event/c)

procedure

(clRetainMemObject memobj)  void

  memobj : _cl_mem/c

procedure

(clReleaseMemObject memobj)  void

  memobj : _cl_mem/c

procedure

(clCreateImage2D ctxt    
  mem-flags    
  format    
  image-width    
  image-height    
  image-row-pitch    
  host-ptr)  _cl_mem/c
  ctxt : _cl_context/c
  mem-flags : _cl_mem_flags/c
  format : _cl_image_format/c
  image-width : _size_t/c
  image-height : _size_t/c
  image-row-pitch : _size_t/c
  host-ptr : _void*/c

procedure

(clCreateImage3D ctxt    
  mem-flags    
  format    
  image-width    
  image-height    
  image-depth    
  image-row-pitch    
  image-slice-pitch    
  host-ptr)  _cl_mem/c
  ctxt : _cl_context/c
  mem-flags : _cl_mem_flags/c
  format : _cl_image_format/c
  image-width : _size_t/c
  image-height : _size_t/c
  image-depth : _size_t/c
  image-row-pitch : _size_t/c
  image-slice-pitch : _size_t/c
  host-ptr : _void*/c

procedure

(clGetSupportedImageFormats:count context    
  flags    
  image_type)  _cl_uint/c
  context : _cl_context/c
  flags : _cl_mem_flags/c
  image_type : _cl_mem_object_type/c
Returns how many results clGetSupportedImageFormats may return for these arguments.

procedure

(clGetSupportedImageFormats context 
  flags 
  image_type 
  how-many) 
  
_cl_image_format_vector/c _cl_uint/c
  context : _cl_context/c
  flags : _cl_mem_flags/c
  image_type : _cl_mem_object_type/c
  how-many : _cl_uint/c
Returns the minimum of how-many and how-many-possible values in rets.

procedure

(clGetSupportedImageFormats:vector context 
  flags 
  image_type) 
  _cl_image_format_vector/c
  context : _cl_context/c
  flags : _cl_mem_flags/c
  image_type : _cl_mem_object_type/c
Returns all possible results from clGetSupportedImageFormats using clGetSupportedImageFormats:count to extract the number available.

procedure

(clEnqueueReadImage cq    
  image    
  blocking?    
  origin    
  region    
  row-pitch    
  slice-ptch    
  ptr    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  image : _cl_mem/c
  blocking? : _cl_bool/c
  origin : (vector/c _size_t/c _size_t/c _size_t/c)
  region : (vector/c _size_t/c _size_t/c _size_t/c)
  row-pitch : _size_t/c
  slice-ptch : _size_t/c
  ptr : _void*/c
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueWriteImage cq    
  image    
  blocking?    
  origin    
  region    
  row-pitch    
  slice-ptch    
  ptr    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  image : _cl_mem/c
  blocking? : _cl_bool/c
  origin : (vector/c _size_t/c _size_t/c _size_t/c)
  region : (vector/c _size_t/c _size_t/c _size_t/c)
  row-pitch : _size_t/c
  slice-ptch : _size_t/c
  ptr : _void*/c
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueCopyImage cq    
  src    
  dst    
  src-origin    
  dst-origin    
  region    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  src : _cl_mem/c
  dst : _cl_mem/c
  src-origin : (vector/c _size_t/c _size_t/c _size_t/c)
  dst-origin : (vector/c _size_t/c _size_t/c _size_t/c)
  region : (vector/c _size_t/c _size_t/c _size_t/c)
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueCopyImageToBuffer cq    
  src-image    
  dst-buffer    
  src-origin    
  region    
  dst-offset    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  src-image : _cl_mem/c
  dst-buffer : _cl_mem/c
  src-origin : (vector/c _size_t/c _size_t/c _size_t/c)
  region : (vector/c _size_t/c _size_t/c _size_t/c)
  dst-offset : _size_t/c
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueCopyBufferToImage cq    
  src-buffer    
  dst-image    
  src-offset    
  dst-origin    
  region    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  src-buffer : _cl_mem/c
  dst-image : _cl_mem/c
  src-offset : _size_t/c
  dst-origin : (vector/c _size_t/c _size_t/c _size_t/c)
  region : (vector/c _size_t/c _size_t/c _size_t/c)
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueMapBuffer cq    
  buffer    
  blocking?    
  map-flags    
  offset    
  cb    
  wait-list)  
_cl_event/c _void*/c
  cq : _cl_command_queue/c
  buffer : _cl_mem/c
  blocking? : _cl_bool/c
  map-flags : _cl_map_flags/c
  offset : _size_t/c
  cb : _size_t/c
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueMapImage cq 
  image 
  blocking? 
  map-flags 
  origin 
  region 
  wait-list) 
  
_size_t/c _size_t/c _cl_event/c _void*/c
  cq : _cl_command_queue/c
  image : _cl_mem/c
  blocking? : _cl_bool/c
  map-flags : _cl_map_flags/c
  origin : (vector/c _size_t/c _size_t/c _size_t/c)
  region : (vector/c _size_t/c _size_t/c _size_t/c)
  wait-list : (vectorof _cl_event/c)

procedure

(clEnqueueUnmapMemObject cq    
  memobj    
  mapped-ptr    
  wait-list)  _cl_event/c
  cq : _cl_command_queue/c
  memobj : _cl_mem/c
  mapped-ptr : _void*/c
  wait-list : (vectorof _cl_event/c)
A dummy Racket function that refers callers to the other clGetMemObjectInfo-based functions which access the true C function.

procedure

(clGetMemObjectInfo:length memobj    
  param_name)  _size_t/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the size of param_name field of the argument(s). Calls clGetMemObjectInfo with values for param_value_size and param_value such that param_value_size_ret is queried.

procedure

(clGetMemObjectInfo:_cl_mem_object_type memobj 
  param_name) 
  _cl_mem_object_type/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetMemObjectInfo with param_value_size set to (ctype-sizeof _cl_mem_object_type) so that the value is queried. Valid param_names are '(CL_MEM_TYPE).

procedure

(clGetMemObjectInfo:_cl_mem_flags memobj    
  param_name)  _cl_mem_flags/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetMemObjectInfo with param_value_size set to (ctype-sizeof _cl_mem_flags) so that the value is queried. Valid param_names are '(CL_MEM_FLAGS).

procedure

(clGetMemObjectInfo:_size_t memobj    
  param_name)  _size_t/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetMemObjectInfo with param_value_size set to (ctype-sizeof _size_t) so that the value is queried. Valid param_names are '(CL_MEM_SIZE).

procedure

(clGetMemObjectInfo:_void* memobj    
  param_name)  _void*/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetMemObjectInfo with param_value_size set to (ctype-sizeof _void*) so that the value is queried. Valid param_names are '(CL_MEM_HOST_PTR).

procedure

(clGetMemObjectInfo:_cl_uint memobj    
  param_name)  _cl_uint/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetMemObjectInfo with param_value_size set to (ctype-sizeof _cl_uint) so that the value is queried. Valid param_names are '(CL_MEM_MAP_COUNT CL_MEM_REFERENCE_COUNT).

procedure

(clGetMemObjectInfo:_cl_context memobj    
  param_name)  _cl_context/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetMemObjectInfo with param_value_size set to (ctype-sizeof _cl_context) so that the value is queried. Valid param_names are '(CL_MEM_CONTEXT).

procedure

(clGetMemObjectInfo:generic memobj    
  param_name)  clGetMemObjectInfo/c
  memobj : _cl_mem/c
  param_name : _cl_mem_info/c
Returns the value associated with param_name for the argument(s). Selects the appropriate clGetMemObjectInfo-based function to extract the appropriate value, automatically providing the right length for variable length functions.
A dummy Racket function that refers callers to the other clGetImageInfo-based functions which access the true C function.

procedure

(clGetImageInfo:length memobj param_name)  _size_t/c

  memobj : _cl_mem/c
  param_name : _cl_image_info/c
Returns the size of param_name field of the argument(s). Calls clGetImageInfo with values for param_value_size and param_value such that param_value_size_ret is queried.

procedure

(clGetImageInfo:_cl_image_format memobj 
  param_name) 
  _cl_image_format/c
  memobj : _cl_mem/c
  param_name : _cl_image_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetImageInfo with param_value_size set to (ctype-sizeof _cl_image_format) so that the value is queried. Valid param_names are '(CL_IMAGE_FORMAT).

procedure

(clGetImageInfo:_size_t memobj param_name)  _size_t/c

  memobj : _cl_mem/c
  param_name : _cl_image_info/c
Returns the value associated with param_name for the argument(s). Implemented by clGetImageInfo with param_value_size set to (ctype-sizeof _size_t) so that the value is queried. Valid param_names are '(CL_IMAGE_ELEMENT_SIZE CL_IMAGE_ROW_PITCH CL_IMAGE_SLICE_PITCH CL_IMAGE_WIDTH CL_IMAGE_HEIGHT CL_IMAGE_DEPTH).
A contract for the return values of clGetImageInfo:generic. Its definition is: (or/c _cl_image_format/c _size_t/c).

procedure

(clGetImageInfo:generic memobj param_name)  clGetImageInfo/c

  memobj : _cl_mem/c
  param_name : _cl_image_info/c
Returns the value associated with param_name for the argument(s). Selects the appropriate clGetImageInfo-based function to extract the appropriate value, automatically providing the right length for variable length functions.