Make.OpsOpaque device-buffer type stored in the per-vector device_buffers table. Native: (module Memory.BUFFER). Stub: unit.
val alloc : elem_size:int -> length:int -> handleAllocate storage for length elements of elem_size bytes each.
val free : handle -> unitRelease storage previously returned by alloc.
val of_raw : nativeint -> handleWrap a raw address as a handle (native-only; may failwith).
val to_raw : handle -> nativeintCompute the raw address of a handle (native-only; may failwith).
val copy_elems :
src:handle ->
dst:handle ->
elem_count:int ->
get:(handle -> int -> 'a) ->
set:(handle -> int -> 'a -> unit) ->
unitCopy elem_count elements using the provided get/set pair.
val bigarray_to_handle :
('a, 'b, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t ->
handleConvert a host Bigarray to a handle for the device-transfer layer. Implementations that do not support device transfers may raise.
val device_id : device_t -> intExtract the integer device-ID from a device (used as hashtable key).
val custom_to_bytes :
set:(handle -> int -> 'a -> unit) ->
elem_size:int ->
'a ->
bytesSerialize a custom-type value to a byte string using the provided set. The native implementation allocates a temporary ctypes char buffer; the jsoo stub raises.
val custom_of_bytes : get:(handle -> int -> 'a) -> elem_size:int -> bytes -> 'aDeserialize a byte string to a custom-type value using the provided get. The native implementation allocates a temporary ctypes char buffer; the jsoo stub raises.