Backend_impl.Devicemodule Device_types : Backend_intf.Device_typesmodule Alloc_buffer :
Backend_intf.Alloc_buffer
with type buffer_ptr := Device_types.buffer_ptr
and type stream := Device_types.streaminclude 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 stream finished computing past a particular point in its schedue. These values are used internally for scheduling across streams 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 = (buffer_ptr, dev, runner, event) Backend_intf.deviceval sexp_of_device : device -> Sexplib0.Sexp.ttype nonrec stream = (buffer_ptr, dev, runner, event) Backend_intf.streamval sexp_of_stream : stream -> Sexplib0.Sexp.ttype nonrec context = (buffer_ptr, stream, optimize_ctx) Backend_intf.contextval sexp_of_context : context -> Sexplib0.Sexp.tinclude module type of struct include Alloc_buffer endinclude Backend_intf.Buffer with type buffer_ptr := Device_types.buffer_ptrval sexp_of_buffer_ptr : Device_types.buffer_ptr -> Sexplib0.Sexp.tinclude sig ... endtype nonrec buffer = Device_types.buffer_ptr Backend_intf.bufferval sexp_of_buffer : buffer -> Sexplib0.Sexp.ttype nonrec ctx_arrays = Device_types.buffer_ptr Backend_intf.ctx_arraysval sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.tval alloc_buffer :
?old_buffer:buffer ->
size_in_bytes:Base.int ->
Device_types.stream ->
bufferval alloc_array :
Ops.prec ->
dims:Base.int Base.array ->
Device_types.stream ->
Device_types.buffer_ptrval alloc_zeros :
Ops.prec ->
dims:Base.int Base.array ->
Device_types.stream ->
Device_types.buffer_ptrval free_buffer :
(Device_types.stream -> Device_types.buffer_ptr -> Base.unit) Base.optionval make_device :
'a ->
ordinal:Base.int ->
('b, 'a, 'c, 'd) Backend_intf.deviceval make_stream :
('a, 'b, 'c, 'd) Backend_intf.device ->
'c ->
('a, 'b, 'c, 'd) Backend_intf.stream_refval get_name : ('a, 'b, 'c, 'd) Backend_intf.stream -> stringval make_context :
?ctx_arrays:(Tnode.t, 'a, Tnode.comparator_witness) Base.Map.t ->
?optimize_ctx:optimize_ctx ->
'b ->
('a, 'b, optimize_ctx) Backend_intf.contextval make_child :
?ctx_arrays:'a Backend_intf.ctx_arrays ->
?optimize_ctx:'b ->
('a, 'c, 'b) Backend_intf.context ->
('a, 'c, 'b) Backend_intf.context