Multicore.Backendinclude Ir.Backend_impl.No_device_buffer_and_copyinginclude Ir.Backend_impl.Bufferval sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.tinclude sig ... endtype nonrec buffer = buffer_ptr Ir.Backend_impl.bufferval sexp_of_buffer : buffer -> Sexplib0.Sexp.tReturns (an upper bound of) the memory used for arrays, in bytes.
Raw slab primitives used by Make_slab to back the device-level Backend_intf.Slab_alloc. They allocate / free / zero contiguous backend buffers by byte size; pool-id bookkeeping lives in the shared slab wrapper.
val alloc_pool_raw : size_in_bytes:Base.int -> buffer_ptrval free_pool_raw : (buffer_ptr -> Base.unit) Base.optionval memset_zero_raw :
buffer_ptr ->
offset:Base.int ->
size_in_bytes:Base.int ->
Base.unitval offset_buffer : buffer_ptr -> bytes:Base.int -> buffer_ptrReturns a handle for the slab pointer advanced by bytes. Used by Make_slab.resolve_pool to turn a { pool_id; offset } into the concrete pointer for a sub-region of a multi-tenant pool. For bytes = 0 this must return the base unchanged.
val buffer_to_buffer :
dst:buffer_ptr ->
src:buffer_ptr ->
size_in_bytes:Base.int ->
Base.unitval host_to_buffer : Ir.Ndarray.t -> dst:buffer_ptr -> Base.unitval buffer_to_host : Ir.Ndarray.t -> src:buffer_ptr -> Base.unit