Parameter Multicore.Backend

val name : Base.string
include Ir.Backend_impl.No_device_buffer_and_copying
include Ir.Backend_impl.Buffer
type buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
include sig ... end
type nonrec buffer = buffer_ptr Ir.Backend_impl.buffer
val sexp_of_buffer : buffer -> Sexplib0.Sexp.t
val get_used_memory : Base.unit -> Base.int

Returns (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_ptr
val free_pool_raw : (buffer_ptr -> Base.unit) Base.option
val memset_zero_raw : buffer_ptr -> offset:Base.int -> size_in_bytes:Base.int -> Base.unit
val offset_buffer : buffer_ptr -> bytes:Base.int -> buffer_ptr

Returns 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.unit
val host_to_buffer : Ir.Ndarray.t -> dst:buffer_ptr -> Base.unit
val buffer_to_host : Ir.Ndarray.t -> src:buffer_ptr -> Base.unit