Module Ir.Indexing

Symbols and projections used to lower tensor indexing.

type symbol =
  1. | Symbol of Base.int
val compare_symbol : symbol -> symbol -> Base.int
val equal_symbol : symbol -> symbol -> Base.bool
val sexp_of_symbol : symbol -> Sexplib0.Sexp.t
val symbol_of_sexp : Sexplib0.Sexp.t -> symbol
val hash_fold_symbol : Ppx_hash_lib.Std.Hash.state -> symbol -> Ppx_hash_lib.Std.Hash.state
val hash_symbol : symbol -> Ppx_hash_lib.Std.Hash.hash_value
val symbol : Base.int -> symbol
val is_symbol : symbol -> Base.bool
val symbol_val : symbol -> Base.int Base.option
module Variants_of_symbol : sig ... end
module Symbol : sig ... end
val get_symbol : Base.unit -> symbol
val symbol_ident : symbol -> Base.string
type 'a environment = 'a Base.Map.M(Symbol).t
val sexp_of_environment : ('a -> Sexplib0.Sexp.t) -> 'a environment -> Sexplib0.Sexp.t
val environment_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a environment
type static_symbol = {
  1. static_symbol : symbol;
  2. mutable static_range : Base.int Base.option;
  3. mutable used_as_extent : Base.bool;
  4. mutable used_as_slice : Base.bool;
}
val compare_static_symbol : static_symbol -> static_symbol -> Base.int
val equal_static_symbol : static_symbol -> static_symbol -> Base.bool
val sexp_of_static_symbol : static_symbol -> Sexplib0.Sexp.t
val static_symbol_of_sexp : Sexplib0.Sexp.t -> static_symbol
val hash_fold_static_symbol : Ppx_hash_lib.Std.Hash.state -> static_symbol -> Ppx_hash_lib.Std.Hash.state
val hash_static_symbol : static_symbol -> Ppx_hash_lib.Std.Hash.hash_value
type 'a bindings =
  1. | Empty
  2. | Bind of static_symbol * (Base.int -> 'a) bindings
val sexp_of_bindings : ('a -> Sexplib0.Sexp.t) -> 'a bindings -> Sexplib0.Sexp.t
val bound_symbols : 'a bindings -> static_symbol Base.list
type ('r, 'idcs, 'p1, 'p2) variadic =
  1. | Result of 'r
  2. | Param_idx of Base.int Base.ref * (Base.int -> 'r, Base.int -> 'idcs, 'p1, 'p2) variadic
  3. | Param_1 of 'p1 Base.option Base.ref * ('p1 -> 'r, 'idcs, 'p1, 'p2) variadic
  4. | Param_2 of 'p2 Base.option Base.ref * ('p2 -> 'r, 'idcs, 'p1, 'p2) variadic
  5. | Param_2f : ('p2f -> 'p2) * 'p2f Base.option Base.ref * ('p2 -> 'r, 'idcs, 'p1, 'p2) variadic -> ('r, 'idcs, 'p1, 'p2) variadic
type unit_bindings = (Base.unit -> Base.unit) bindings
val sexp_of_unit_bindings : unit_bindings -> Sexplib0.Sexp.t
type lowered_bindings = (static_symbol, Base.int Base.ref) Base.List.Assoc.t
val sexp_of_lowered_bindings : lowered_bindings -> Sexplib0.Sexp.t
val apply : ('r, 'idcs, 'p1, 'p2) variadic -> 'r
val lowered_bindings : 'a bindings -> ('b, 'a, 'p1, 'p2) variadic -> lowered_bindings
val find_exn : lowered_bindings -> static_symbol -> Base.int Base.ref
val get_static_symbol : ?static_range:Base.int -> (Base.int -> 'a) bindings -> static_symbol * 'a bindings
val validate_bound_value : ?width64:Base.bool -> static_symbol -> Base.int -> Base.unit
val validate_lowered_bindings : ?width64:Base.bool -> lowered_bindings -> Base.unit
val dims_to_string : ?with_axis_numbers:Base.bool -> Base.int Base.array -> Base.string
type axis_index =
  1. | Fixed_idx of Base.int
  2. | Iterator of symbol
  3. | Affine of {
    1. symbols : (Base.int * symbol) Base.list;
    2. offset : Base.int;
    }
  4. | Sub_axis
  5. | Concat of symbol Base.list
val compare_axis_index : axis_index -> axis_index -> Base.int
val equal_axis_index : axis_index -> axis_index -> Base.bool
val sexp_of_axis_index : axis_index -> Sexplib0.Sexp.t
val axis_index_of_sexp : Sexplib0.Sexp.t -> axis_index
val axis_index_mentions_symbol : symbol -> axis_index -> Base.bool
val axis_index_mentions_any : symbol Base.list -> axis_index -> Base.bool
type str_osym_map = (Base.string, symbol Base.option, Base.String.comparator_witness) Base.Map.t
type projections_debug = {
  1. spec : Base.string;
  2. derived_for : Base.Sexp.t;
  3. trace : (Base.string * Base.int) Base.list;
}
val sexp_of_projections_debug : projections_debug -> Sexplib0.Sexp.t
val projections_debug_of_sexp : Sexplib0.Sexp.t -> projections_debug
val unique_debug_id : Base.unit -> Base.int
type component = (Base.int * symbol) Base.list
val compare_component : component -> component -> Base.int
val equal_component : component -> component -> Base.bool
val sexp_of_component : component -> Sexplib0.Sexp.t
val component_of_sexp : Sexplib0.Sexp.t -> component
type projections = {
  1. components : component Base.array;
  2. lhs_dims : Base.int Base.array;
  3. rhs_dims : Base.int Base.array Base.array;
  4. project_lhs : axis_index Base.array;
  5. project_rhs : axis_index Base.array Base.array;
  6. extent_syms : (symbol Base.option * static_symbol) Base.list;
  7. debug_info : projections_debug;
}
val compare_projections : projections -> projections -> Base.int
val equal_projections : projections -> projections -> Base.bool
val sexp_of_projections : projections -> Sexplib0.Sexp.t
val projections_of_sexp : Sexplib0.Sexp.t -> projections
val iterated : Base.int -> Base.bool
val all_iterators : projections -> symbol Base.list
val iterator_sizes : projections -> Base.int Base.Map.M(Symbol).t
val coalesce_affine_terms : (Base.int * symbol) Base.list -> (Base.int * symbol) Base.list
val affine_injective : symbol_range:(symbol -> Base.int) -> axis_index Base.array -> Base.bool
val prod_project_for : projections -> dims:Base.int Base.array -> axis_index Base.array
val reflect_projection : dims:Base.int Base.array -> projection:axis_index Base.array -> axis_index
type variable_ref = {
  1. ref_label : Base.string;
  2. mutable solved_dim : Base.int Base.option;
  3. mutable solved_sym : static_symbol Base.option;
}
val sexp_of_variable_ref : variable_ref -> Sexplib0.Sexp.t
val equal_variable_ref : variable_ref -> variable_ref -> Base.bool
module Doc_helpers : sig ... end