Bigarray

`sig
type float32_elt = Float32_elt
type float64_elt = Float64_elt
type int8_signed_elt = Int8_signed_elt
type int8_unsigned_elt = Int8_unsigned_elt
type int16_signed_elt = Int16_signed_elt
type int16_unsigned_elt = Int16_unsigned_elt
type int32_elt = Int32_elt
type int64_elt = Int64_elt
type int_elt = Int_elt
type nativeint_elt = Nativeint_elt
type complex32_elt = Complex32_elt
type complex64_elt = Complex64_elt
type ('a, 'b) kind =
Float32 : (float, Bigarray.float32_elt) Bigarray.kind
| Float64 : (float, Bigarray.float64_elt) Bigarray.kind
| Int8_signed : (int, Bigarray.int8_signed_elt) Bigarray.kind
| Int8_unsigned : (int, Bigarray.int8_unsigned_elt) Bigarray.kind
| Int16_signed : (int, Bigarray.int16_signed_elt) Bigarray.kind
| Int16_unsigned : (int, Bigarray.int16_unsigned_elt) Bigarray.kind
| Int32 : (int32, Bigarray.int32_elt) Bigarray.kind
| Int64 : (int64, Bigarray.int64_elt) Bigarray.kind
| Int : (int, Bigarray.int_elt) Bigarray.kind
| Nativeint : (nativeint, Bigarray.nativeint_elt) Bigarray.kind
| Complex32 : (Stdlib.Complex.t, Bigarray.complex32_elt) Bigarray.kind
| Complex64 : (Stdlib.Complex.t, Bigarray.complex64_elt) Bigarray.kind
| Char : (char, Bigarray.int8_unsigned_elt) Bigarray.kind
val float32 : (float, Bigarray.float32_elt) Bigarray.kind
val float64 : (float, Bigarray.float64_elt) Bigarray.kind
val complex32 : (Stdlib.Complex.t, Bigarray.complex32_elt) Bigarray.kind
val complex64 : (Stdlib.Complex.t, Bigarray.complex64_elt) Bigarray.kind
val int8_signed : (int, Bigarray.int8_signed_elt) Bigarray.kind
val int8_unsigned : (int, Bigarray.int8_unsigned_elt) Bigarray.kind
val int16_signed : (int, Bigarray.int16_signed_elt) Bigarray.kind
val int16_unsigned : (int, Bigarray.int16_unsigned_elt) Bigarray.kind
val int : (int, Bigarray.int_elt) Bigarray.kind
val int32 : (int32, Bigarray.int32_elt) Bigarray.kind
val int64 : (int64, Bigarray.int64_elt) Bigarray.kind
val nativeint : (nativeint, Bigarray.nativeint_elt) Bigarray.kind
val char : (char, Bigarray.int8_unsigned_elt) Bigarray.kind
val kind_size_in_bytes : ('a, 'b) Bigarray.kind -> int
type c_layout = C_layout_typ
type fortran_layout = Fortran_layout_typ
type 'a layout =
C_layout : Bigarray.c_layout Bigarray.layout
| Fortran_layout : Bigarray.fortran_layout Bigarray.layout
val c_layout : Bigarray.c_layout Bigarray.layout
val fortran_layout : Bigarray.fortran_layout Bigarray.layout
module Genarray :
sig
type (!'a, !'b, !'c) t
external create :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> int array -> ('a, 'b, 'c) Bigarray.Genarray.t
= "caml_ba_create"
val init :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
int array -> (int array -> 'a) -> ('a, 'b, 'c) Bigarray.Genarray.t
external num_dims : ('a, 'b, 'c) Bigarray.Genarray.t -> int
= "caml_ba_num_dims"
val dims : ('a, 'b, 'c) Bigarray.Genarray.t -> int array
external nth_dim : ('a, 'b, 'c) Bigarray.Genarray.t -> int -> int
= "caml_ba_dim"
external kind :
('a, 'b, 'c) Bigarray.Genarray.t -> ('a, 'b) Bigarray.kind
= "caml_ba_kind"
external layout :
('a, 'b, 'c) Bigarray.Genarray.t -> 'c Bigarray.layout
= "caml_ba_layout"
external change_layout :
('a, 'b, 'c) Bigarray.Genarray.t ->
'd Bigarray.layout -> ('a, 'b, 'd) Bigarray.Genarray.t
= "caml_ba_change_layout"
val size_in_bytes : ('a, 'b, 'c) Bigarray.Genarray.t -> int
external get : ('a, 'b, 'c) Bigarray.Genarray.t -> int array -> 'a
= "caml_ba_get_generic"
external set :
('a, 'b, 'c) Bigarray.Genarray.t -> int array -> 'a -> unit
= "caml_ba_set_generic"
external sub_left :
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ->
int -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t
= "caml_ba_sub"
external sub_right :
('a, 'b, Bigarray.fortran_layout) Bigarray.Genarray.t ->
int -> int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Genarray.t
= "caml_ba_sub"
external slice_left :
('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t ->
int array -> ('a, 'b, Bigarray.c_layout) Bigarray.Genarray.t
= "caml_ba_slice"
external slice_right :
('a, 'b, Bigarray.fortran_layout) Bigarray.Genarray.t ->
int array -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Genarray.t
= "caml_ba_slice"
external blit :
('a, 'b, 'c) Bigarray.Genarray.t ->
('a, 'b, 'c) Bigarray.Genarray.t -> unit = "caml_ba_blit"
external fill : ('a, 'b, 'c) Bigarray.Genarray.t -> 'a -> unit
= "caml_ba_fill"
end
module Array0 :
sig
type (!'a, !'b, !'c) t
val create :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> ('a, 'b, 'c) Bigarray.Array0.t
val init :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> 'a -> ('a, 'b, 'c) Bigarray.Array0.t
external kind :
('a, 'b, 'c) Bigarray.Array0.t -> ('a, 'b) Bigarray.kind
= "caml_ba_kind"
external layout : ('a, 'b, 'c) Bigarray.Array0.t -> 'c Bigarray.layout
= "caml_ba_layout"
val change_layout :
('a, 'b, 'c) Bigarray.Array0.t ->
'd Bigarray.layout -> ('a, 'b, 'd) Bigarray.Array0.t
val size_in_bytes : ('a, 'b, 'c) Bigarray.Array0.t -> int
val get : ('a, 'b, 'c) Bigarray.Array0.t -> 'a
val set : ('a, 'b, 'c) Bigarray.Array0.t -> 'a -> unit
external blit :
('a, 'b, 'c) Bigarray.Array0.t ->
('a, 'b, 'c) Bigarray.Array0.t -> unit = "caml_ba_blit"
external fill : ('a, 'b, 'c) Bigarray.Array0.t -> 'a -> unit
= "caml_ba_fill"
val of_value :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> 'a -> ('a, 'b, 'c) Bigarray.Array0.t
end
module Array1 :
sig
type (!'a, !'b, !'c) t
val create :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> int -> ('a, 'b, 'c) Bigarray.Array1.t
val init :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
int -> (int -> 'a) -> ('a, 'b, 'c) Bigarray.Array1.t
external dim : ('a, 'b, 'c) Bigarray.Array1.t -> int = "%caml_ba_dim_1"
external kind :
('a, 'b, 'c) Bigarray.Array1.t -> ('a, 'b) Bigarray.kind
= "caml_ba_kind"
external layout : ('a, 'b, 'c) Bigarray.Array1.t -> 'c Bigarray.layout
= "caml_ba_layout"
val change_layout :
('a, 'b, 'c) Bigarray.Array1.t ->
'd Bigarray.layout -> ('a, 'b, 'd) Bigarray.Array1.t
val size_in_bytes : ('a, 'b, 'c) Bigarray.Array1.t -> int
external get : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a
= "%caml_ba_ref_1"
external set : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a -> unit
= "%caml_ba_set_1"
external sub :
('a, 'b, 'c) Bigarray.Array1.t ->
int -> int -> ('a, 'b, 'c) Bigarray.Array1.t = "caml_ba_sub"
val slice :
('a, 'b, 'c) Bigarray.Array1.t ->
int -> ('a, 'b, 'c) Bigarray.Array0.t
external blit :
('a, 'b, 'c) Bigarray.Array1.t ->
('a, 'b, 'c) Bigarray.Array1.t -> unit = "caml_ba_blit"
external fill : ('a, 'b, 'c) Bigarray.Array1.t -> 'a -> unit
= "caml_ba_fill"
val of_array :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> 'a array -> ('a, 'b, 'c) Bigarray.Array1.t
external unsafe_get : ('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a
= "%caml_ba_unsafe_ref_1"
external unsafe_set :
('a, 'b, 'c) Bigarray.Array1.t -> int -> 'a -> unit
= "%caml_ba_unsafe_set_1"
end
module Array2 :
sig
type (!'a, !'b, !'c) t
val create :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout -> int -> int -> ('a, 'b, 'c) Bigarray.Array2.t
val init :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
int -> int -> (int -> int -> 'a) -> ('a, 'b, 'c) Bigarray.Array2.t
external dim1 : ('a, 'b, 'c) Bigarray.Array2.t -> int
= "%caml_ba_dim_1"
external dim2 : ('a, 'b, 'c) Bigarray.Array2.t -> int
= "%caml_ba_dim_2"
external kind :
('a, 'b, 'c) Bigarray.Array2.t -> ('a, 'b) Bigarray.kind
= "caml_ba_kind"
external layout : ('a, 'b, 'c) Bigarray.Array2.t -> 'c Bigarray.layout
= "caml_ba_layout"
val change_layout :
('a, 'b, 'c) Bigarray.Array2.t ->
'd Bigarray.layout -> ('a, 'b, 'd) Bigarray.Array2.t
val size_in_bytes : ('a, 'b, 'c) Bigarray.Array2.t -> int
external get : ('a, 'b, 'c) Bigarray.Array2.t -> int -> int -> 'a
= "%caml_ba_ref_2"
external set :
('a, 'b, 'c) Bigarray.Array2.t -> int -> int -> 'a -> unit
= "%caml_ba_set_2"
external sub_left :
('a, 'b, Bigarray.c_layout) Bigarray.Array2.t ->
int -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array2.t
= "caml_ba_sub"
external sub_right :
('a, 'b, Bigarray.fortran_layout) Bigarray.Array2.t ->
int -> int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array2.t
= "caml_ba_sub"
val slice_left :
('a, 'b, Bigarray.c_layout) Bigarray.Array2.t ->
int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
val slice_right :
('a, 'b, Bigarray.fortran_layout) Bigarray.Array2.t ->
int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array1.t
external blit :
('a, 'b, 'c) Bigarray.Array2.t ->
('a, 'b, 'c) Bigarray.Array2.t -> unit = "caml_ba_blit"
external fill : ('a, 'b, 'c) Bigarray.Array2.t -> 'a -> unit
= "caml_ba_fill"
val of_array :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
'a array array -> ('a, 'b, 'c) Bigarray.Array2.t
external unsafe_get :
('a, 'b, 'c) Bigarray.Array2.t -> int -> int -> 'a
= "%caml_ba_unsafe_ref_2"
external unsafe_set :
('a, 'b, 'c) Bigarray.Array2.t -> int -> int -> 'a -> unit
= "%caml_ba_unsafe_set_2"
end
module Array3 :
sig
type (!'a, !'b, !'c) t
val create :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
int -> int -> int -> ('a, 'b, 'c) Bigarray.Array3.t
val init :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
int ->
int ->
int -> (int -> int -> int -> 'a) -> ('a, 'b, 'c) Bigarray.Array3.t
external dim1 : ('a, 'b, 'c) Bigarray.Array3.t -> int
= "%caml_ba_dim_1"
external dim2 : ('a, 'b, 'c) Bigarray.Array3.t -> int
= "%caml_ba_dim_2"
external dim3 : ('a, 'b, 'c) Bigarray.Array3.t -> int
= "%caml_ba_dim_3"
external kind :
('a, 'b, 'c) Bigarray.Array3.t -> ('a, 'b) Bigarray.kind
= "caml_ba_kind"
external layout : ('a, 'b, 'c) Bigarray.Array3.t -> 'c Bigarray.layout
= "caml_ba_layout"
val change_layout :
('a, 'b, 'c) Bigarray.Array3.t ->
'd Bigarray.layout -> ('a, 'b, 'd) Bigarray.Array3.t
val size_in_bytes : ('a, 'b, 'c) Bigarray.Array3.t -> int
external get :
('a, 'b, 'c) Bigarray.Array3.t -> int -> int -> int -> 'a
= "%caml_ba_ref_3"
external set :
('a, 'b, 'c) Bigarray.Array3.t -> int -> int -> int -> 'a -> unit
= "%caml_ba_set_3"
external sub_left :
('a, 'b, Bigarray.c_layout) Bigarray.Array3.t ->
int -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array3.t
= "caml_ba_sub"
external sub_right :
('a, 'b, Bigarray.fortran_layout) Bigarray.Array3.t ->
int -> int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array3.t
= "caml_ba_sub"
val slice_left_1 :
('a, 'b, Bigarray.c_layout) Bigarray.Array3.t ->
int -> int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array1.t
val slice_right_1 :
('a, 'b, Bigarray.fortran_layout) Bigarray.Array3.t ->
int -> int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array1.t
val slice_left_2 :
('a, 'b, Bigarray.c_layout) Bigarray.Array3.t ->
int -> ('a, 'b, Bigarray.c_layout) Bigarray.Array2.t
val slice_right_2 :
('a, 'b, Bigarray.fortran_layout) Bigarray.Array3.t ->
int -> ('a, 'b, Bigarray.fortran_layout) Bigarray.Array2.t
external blit :
('a, 'b, 'c) Bigarray.Array3.t ->
('a, 'b, 'c) Bigarray.Array3.t -> unit = "caml_ba_blit"
external fill : ('a, 'b, 'c) Bigarray.Array3.t -> 'a -> unit
= "caml_ba_fill"
val of_array :
('a, 'b) Bigarray.kind ->
'c Bigarray.layout ->
'a array array array -> ('a, 'b, 'c) Bigarray.Array3.t
external unsafe_get :
('a, 'b, 'c) Bigarray.Array3.t -> int -> int -> int -> 'a
= "%caml_ba_unsafe_ref_3"
external unsafe_set :
('a, 'b, 'c) Bigarray.Array3.t -> int -> int -> int -> 'a -> unit
= "%caml_ba_unsafe_set_3"
end
external genarray_of_array0 :
('a, 'b, 'c) Bigarray.Array0.t -> ('a, 'b, 'c) Bigarray.Genarray.t
= "%identity"
external genarray_of_array1 :
('a, 'b, 'c) Bigarray.Array1.t -> ('a, 'b, 'c) Bigarray.Genarray.t
= "%identity"
external genarray_of_array2 :
('a, 'b, 'c) Bigarray.Array2.t -> ('a, 'b, 'c) Bigarray.Genarray.t
= "%identity"
external genarray_of_array3 :
('a, 'b, 'c) Bigarray.Array3.t -> ('a, 'b, 'c) Bigarray.Genarray.t
= "%identity"
val array0_of_genarray :
('a, 'b, 'c) Bigarray.Genarray.t -> ('a, 'b, 'c) Bigarray.Array0.t
val array1_of_genarray :
('a, 'b, 'c) Bigarray.Genarray.t -> ('a, 'b, 'c) Bigarray.Array1.t
val array2_of_genarray :
('a, 'b, 'c) Bigarray.Genarray.t -> ('a, 'b, 'c) Bigarray.Array2.t
val array3_of_genarray :
('a, 'b, 'c) Bigarray.Genarray.t -> ('a, 'b, 'c) Bigarray.Array3.t
val reshape :
('a, 'b, 'c) Bigarray.Genarray.t ->
int array -> ('a, 'b, 'c) Bigarray.Genarray.t
val reshape_0 :
('a, 'b, 'c) Bigarray.Genarray.t -> ('a, 'b, 'c) Bigarray.Array0.t
val reshape_1 :
('a, 'b, 'c) Bigarray.Genarray.t -> int -> ('a, 'b, 'c) Bigarray.Array1.t
val reshape_2 :
('a, 'b, 'c) Bigarray.Genarray.t ->
int -> int -> ('a, 'b, 'c) Bigarray.Array2.t
val reshape_3 :
('a, 'b, 'c) Bigarray.Genarray.t ->
int -> int -> int -> ('a, 'b, 'c) Bigarray.Array3.t
end`