package arrayjit

  1. Overview
  2. Docs
module Lazy = Utils.Lazy
module Debug_runtime = Utils.Debug_runtime
val _get_local_debug_runtime : unit -> (module Minidebug_runtime.Debug_runtime)
val name : string
val optimization_level : unit -> Base.Int.t
val compiler_command : unit -> Base.String.t
module Tn = Tnode
type ctx_array = Ndarray.t
val sexp_of_ctx_array : ctx_array -> Sexplib0.Sexp.t
type ctx_arrays = ctx_array Base.Map.M(Tn).t
val sexp_of_ctx_arrays : ctx_arrays -> Sexplib0.Sexp.t
type context = {
  1. label : Base.string;
  2. arrays : ctx_arrays;
}
val sexp_of_context : context -> Sexplib0.Sexp.t
val ctx_arrays : context -> ctx_arrays
type buffer_ptr = ctx_array
val sexp_of_buffer_ptr : buffer_ptr -> Sexplib0.Sexp.t

Alternative approach:

type buffer_ptr = unit Ctypes_static.ptr

let sexp_of_buffer_ptr ptr = Sexp.Atom (Ops.ptr_to_string ptr Ops.Void_prec)
let buffer_ptr ctx_array = Ndarray.get_voidptr ctx_array
val buffer_ptr : 'a -> 'a
val alloc_buffer : ?old_buffer:('a * int) -> size_in_bytes:int -> unit -> 'a
val to_buffer : Tn.t -> dst:Ndarray.t -> src:context -> unit
val host_to_buffer : Ndarray.t -> dst:Ndarray.t -> unit
val buffer_to_host : Ndarray.t -> src:Ndarray.t -> unit
val unsafe_cleanup : unit -> unit
val is_initialized : unit -> bool
val initialize : unit -> Base.unit
val finalize : 'a -> unit
val init : label:Base.string -> context
type library = {
  1. lib : Dl.library;
  2. libname : Base.string;
}
val sexp_of_library : library -> Sexplib0.Sexp.t
type procedure = {
  1. lowered : Low_level.optimized;
  2. bindings : Indexing.unit_bindings;
  3. name : Base.string;
  4. result : library;
  5. params : (Base.string * Backend_utils.Types.param_source) Base.list;
  6. opt_ctx_arrays : Ndarray.t Base.Map.M(Tn).t Base.option;
}
val sexp_of_procedure : procedure -> Sexplib0.Sexp.t
val expected_merge_node : procedure -> Arrayjit.Low_level.Tn.t Base.option
val is_in_context : Low_level.traced_array -> bool
val header_sep : Re.re
val get_global_run_id : unit -> int
val c_compile_and_load : f_name:Base.string -> library
val compile : name:Base.string -> opt_ctx_arrays: (Arrayjit.Low_level.Tn.t Base.Hashtbl.key, Ndarray.t, Tnode.comparator_witness) Base.Map.t Base.Option.t -> (Base.unit -> Base.unit) Indexing.bindings -> Low_level.optimized -> procedure
val compile_batch : names:Base.String.t Base.Option.t Base.Array.t -> opt_ctx_arrays: (Arrayjit.Low_level.Tn.t Base.Hashtbl.key, Ndarray.t, Tnode.comparator_witness) Base.Map.t Base.Option.t -> (Base.unit -> Base.unit) Indexing.bindings -> Low_level.optimized Base.option Base.array -> (Arrayjit.Low_level.Tn.t Base.Hashtbl.key, Ndarray.t, Tnode.comparator_witness) Base.Map.t Base.Option.t * procedure Base.Option.t Base.Array.t
OCaml

Innovation. Community. Security.