Linalg.VecSourceLinalg: vectors
module Make
(Repr : Basic_structures.Basic_intf.Lang.Empty)
(Monad :
Basic_structures.Basic_intf.Codegen_monad with type 'a m = 'a Repr.m)
(S : Basic_structures.Basic_intf.Lang.Shape with type 'a m = 'a Repr.m)
(B : Basic_structures.Basic_intf.Lang.Bool with type 'a m = 'a Repr.m)
(R : Basic_structures.Basic_intf.Lang.Ring with type 'a m = 'a Repr.m)
(R_storage :
Basic_structures.Basic_intf.Lang.Storage
with type 'a m = 'a Repr.m
and type elt = R.t)
(E : Basic_structures.Basic_intf.Lang.Exn with type 'a m = 'a Repr.m)
(M : Basic_structures.Basic_intf.Lang.Sequencing with type 'a m = 'a Repr.m) :
Intf.Vec
with type 'a k = 'a Monad.t
and type 'a m = 'a Repr.m
and type 'a shape = 'a S.t
and type ('a, 'b) morphism = ('a, 'b) S.Morphism.t
and type elt = R.tMake takes as input the signature of an object language and generates a module to perform vector computations in this language.
module Array_backed
(Repr : Basic_structures.Basic_intf.Lang.Empty)
(Monad :
Basic_structures.Basic_intf.Codegen_monad with type 'a m = 'a Repr.m)
(S : Intf.Tensor with type 'a m = 'a Repr.m)
(A :
Basic_structures.Basic_intf.Lang.Array
with type index = S.pos
and type 'a m = 'a Repr.m) :
sig ... endArray_backed yields a module that allows to create vectors backed by arrays.
module Make_native
(R : Basic_structures.Basic_intf.Lang.Ring with type 'a m = 'a)
(R_storage :
Basic_structures.Basic_intf.Lang.Storage
with type 'a m = 'a
and type elt = R.t) :
Intf.Vec
with type 'a k = 'a
and type 'a m = 'a
and type 'a shape = 'a Tensor.Int.t
and type ('a, 'b) morphism = ('a, 'b) Tensor.Int.Morphism.t
and type elt = R.tMake_native specializes Make to native execution.
module Float :
Intf.Vec
with type 'a k = 'a
and type 'a m = 'a
and type 'a shape = 'a Tensor.Int.t
and type ('a, 'b) morphism = ('a, 'b) Tensor.Int.Morphism.t
and type elt = floatFloat allows to manipulate float-valued vectors
module Rational :
Intf.Vec
with type 'a k = 'a
and type 'a m = 'a
and type 'a shape = 'a Tensor.Int.t
and type ('a, 'b) morphism = ('a, 'b) Tensor.Int.Morphism.t
and type elt = Q.tRational allows to manipulate Q.t-valued vectors