Opencl_api.Memorytype 'a buffer = {handle : Opencl_types.cl_mem;size : int;elem_size : int;context : Context.t;zero_copy : bool;}val alloc_with_host_ptr :
Context.t ->
int ->
('a, 'b) Stdlib.Bigarray.kind ->
unit Ctypes_static.ptr ->
'c bufferAllocate buffer with zero-copy using host pointer. For CPU OpenCL devices, this avoids memory copies entirely.
Allocate buffer for custom types with explicit element size in bytes
val is_zero_copy : 'a buffer -> boolCheck if buffer uses zero-copy (no transfers needed)
val free : 'a buffer -> unitval host_to_device :
CommandQueue.t ->
src:('a, 'b, 'c) Stdlib.Bigarray.Array1.t ->
dst:'d buffer ->
unitval device_to_host :
CommandQueue.t ->
src:'a buffer ->
dst:('b, 'c, 'd) Stdlib.Bigarray.Array1.t ->
unitval host_ptr_to_device :
CommandQueue.t ->
src_ptr:unit Ctypes_static.ptr ->
byte_size:int ->
dst:'a buffer ->
unitTransfer from raw pointer to device buffer (for custom types)
val device_to_host_ptr :
CommandQueue.t ->
src:'a buffer ->
dst_ptr:unit Ctypes_static.ptr ->
byte_size:int ->
unitTransfer from device buffer to raw pointer (for custom types)