package arrayjit
Module Arrayjit.NdarraySource
N-dimensional arrays: a precision-handling wrapper for Bigarray.Genarray and its utilities.
*** Handling of precisions ***
val precision_to_bigarray_kind :
('ocaml, 'elt_t) Ops.precision ->
('ocaml, 'elt_t) Bigarray.kindtype 'r map_with_prec = {f : 'ocaml 'elt_t. ('ocaml, 'elt_t) Ops.precision -> ('ocaml, 'elt_t) bigarray -> 'r;
}val create_bigarray_of_prec :
('ocaml, 'elt_t) Ops.precision ->
int array ->
('ocaml, 'elt_t) bigarrayval init_bigarray_of_prec :
('ocaml, 'elt_t) Ops.precision ->
int array ->
f:(Base.int Base.array -> 'ocaml) ->
('ocaml, 'elt_t) bigarrayval create_bigarray :
('ocaml, 'elt_t) Ops.precision ->
dims:int Base.Array.t ->
Ops.init_op ->
('ocaml, 'elt_t) bigarray*** Accessing ***
val fold_bigarray :
('a, 'b, 'c) A.t ->
init:'d ->
f:('d -> int Base.Array.t -> 'a -> 'd) ->
'dval retrieve_2d_points :
?from_axis:int ->
xdim:int ->
ydim:int ->
t ->
(Base.Float.t * Base.Float.t) Base.Array.t*** Creating ***
*** Printing ***
Dimensions to string, "x"-separated, e.g. 1x2x3 for batch dims 1, input dims 3, output dims 2. Outputs "-" for empty dimensions.
Logs information about the array on the default ppx_minidebug runtime, if from_log_level > Utlis.settings.with_log_level.
val render_array :
?brief:Base.bool ->
?prefix:Base.String.t ->
?entries_per_axis:int ->
?labels:Base.String.t Base.Array.t ->
indices:int Base.Array.t ->
t ->
PrintBox.tPrints 0-based indices entries out of arr, where a number between -5 and -1 in an axis means to print out the axis, and a non-negative number means to print out only the indexed dimension of the axis. Prints up to entries_per_axis or entries_per_axis+1 entries per axis, possibly with ellipsis in the middle. labels provides the axis labels for all axes (use "" or "_" for no label). The last label corresponds to axis -1 etc. The printed out axes are arranged as:
-1: a horizontal segment in an inner rectangle (i.e. column numbers of the inner rectangle),-2: a sequence of segments in a line of text (i.e. column numbers of an outer rectangle),-3: a vertical segment in an inner rectangle (i.e. row numbers of the inner rectangle),-4: a vertical sequence of segments (i.e. column numbers of an outer rectangle),-5: a sequence of screens of text (i.e. stack numbers of outer rectangles).
val pp_array :
Format.formatter ->
?prefix:Base.String.t ->
?entries_per_axis:int ->
?labels:Base.String.t Base.Array.t ->
indices:int Base.Array.t ->
t ->
unitval pp_array_inline :
Format.formatter ->
num_batch_axes:int ->
num_output_axes:int ->
num_input_axes:int ->
?axes_spec:string ->
t ->
unitPrints the whole array in an inline syntax.