package arrayjit

  1. Overview
  2. Docs
type context
val sexp_of_context : context -> Sexplib0.Sexp.t
type procedure
val sexp_of_procedure : procedure -> Sexplib0.Sexp.t
type ctx_array
val sexp_of_ctx_array : ctx_array -> Sexplib0.Sexp.t
type buffer_ptr
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t
type ctx_arrays = ctx_array Base.Map.M(Arrayjit.Tnode).t
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
val buffer_ptr : ctx_array -> buffer_ptr
val ctx_arrays : context -> ctx_arrays
val alloc_buffer : ?old_buffer:(buffer_ptr * Base.int) -> size_in_bytes:Base.int -> Base.unit -> buffer_ptr
val expected_merge_node : procedure -> Tnode.t Base.option
val is_in_context : Low_level.traced_array -> Base.bool

If true, the node is required to be in the contexts linked with code that uses it.

Should return false for nodes that are virtual, local, or which the backend prefers to access directly from the host.

val compile : name:Base.string -> opt_ctx_arrays:ctx_arrays Base.option -> Indexing.unit_bindings -> Low_level.optimized -> procedure
val compile_batch : names:Base.string Base.option Base.array -> opt_ctx_arrays:ctx_arrays Base.option -> Indexing.unit_bindings -> Low_level.optimized Base.option Base.array -> ctx_arrays Base.option * procedure Base.option Base.array
val name : Base.string
val initialize : Base.unit -> Base.unit
val is_initialized : Base.unit -> Base.bool
val init : label:Base.string -> context
val finalize : context -> Base.unit
val unsafe_cleanup : Base.unit -> Base.unit
val to_buffer : Tnode.t -> dst:buffer_ptr -> src:context -> Base.unit
val host_to_buffer : Ndarray.t -> dst:buffer_ptr -> Base.unit
val buffer_to_host : Ndarray.t -> src:buffer_ptr -> Base.unit
OCaml

Innovation. Community. Security.