Backend_impl.Devicemodule Device_types : Backend_intf.Device_typesmodule Slab : Device_slab with type device := Device_types.deviceinclude module type of struct include Device_types endinclude Backend_intf.Device_configinclude Backend_intf.Device_config_commontype dev = Device_types.devInterface to a device driver.
val sexp_of_dev : dev -> Sexplib0.Sexp.ttype runner = Device_types.runnerInterface to a stream driver.
val sexp_of_runner : runner -> Sexplib0.Sexp.ttype event = Device_types.eventAn event tracks if a device's runner finished computing past a particular point in its schedule. These values are used internally for scheduling across devices/queues of the backend, and can be used for explicit scheduling.
val sexp_of_event : event -> Sexplib0.Sexp.ttype optimize_ctx = Device_types.optimize_ctxThe optimization context for compiling code, in particular Low_level.optimize_ctx for low-level backends.
val sexp_of_optimize_ctx : optimize_ctx -> Sexplib0.Sexp.tval empty_optimize_ctx : Base.unit -> optimize_ctxtype nonrec device = (dev, runner, event) Backend_intf.deviceval sexp_of_device : device -> Sexplib0.Sexp.ttype nonrec context = (dev, runner, event, optimize_ctx) Backend_intf.contextval sexp_of_context : context -> Sexplib0.Sexp.tinclude module type of struct include Slab endinclude Backend_intf.Slab_alloc with type device := Device_types.deviceval alloc_pool :
?mode:Tnode.memory_mode ->
Device_types.device ->
pool_id:Base.int ->
size_in_bytes:Base.int ->
alignment:Base.int ->
Base.unitAllocates the slab for pool_id on device. The optional ?mode carries the tnode's memory mode so backends can pick a storage mode (Metal private vs. shared); backends that do not care ignore it.
val free_pool :
(Device_types.device -> pool_id:Base.int -> Base.unit) Base.optionFrees the slab for pool_id and drops its table entry. None for backends that rely on GC.
val memset_zero :
Device_types.device ->
pool_id:Base.int ->
offset:Base.int ->
size_in_bytes:Base.int ->
Base.unitZero-initializes size_in_bytes at base_of pool_id + offset.
type buffer_ptr = Slab.buffer_ptrval resolve_pool : Device_types.device -> Backend_intf.buffer_loc -> buffer_ptrval make_device :
'a ->
'b ->
ordinal:Base.int ->
('a, 'b, 'c) Backend_intf.deviceval get_name : ('a, 'b, 'c) Backend_intf.device -> stringval make_context :
?ctx_buffers:
(Tnode.t, Backend_intf.buffer_loc, Tnode.comparator_witness) Base.Map.t ->
?optimize_ctx:optimize_ctx ->
('a, 'b, 'c) Backend_intf.device ->
('a, 'b, 'c, optimize_ctx) Backend_intf.contextval make_child :
?ctx_buffers:Backend_intf.ctx_buffers ->
?optimize_ctx:'a ->
?merge_buffer_node:Tnode.t Base.option ->
('b, 'c, 'd, 'a) Backend_intf.context ->
('b, 'c, 'd, 'a) Backend_intf.context