sig
type ('data, 'kind) t
type ('data, 'kind) nvector = ('data, 'kind) Nvector.t
type 'k serial = (Sundials.RealArray.t, 'k) Nvector.t
constraint 'k = [> `Serial ]
val unwrap : ('data, 'kind) Nvector.t -> 'data
val context : ('data, 'kind) Nvector.t -> Sundials.Context.t
exception IncompatibleNvector
val check : ('data, 'kind) Nvector.t -> ('data, 'kind) Nvector.t -> unit
val clone : ('data, 'kind) Nvector.t -> ('data, 'kind) Nvector.t
type nvector_id =
Serial
| Parallel
| OpenMP
| Pthreads
| ParHyp
| PETSc
| CUDA
| RAJA
| OpenMPdev
| Trilinos
| ManyVector
| MpiManyVector
| MpiPlusX
| Custom
val get_id : ('data, 'kind) Nvector.t -> Nvector.nvector_id
module type NVECTOR_OPS =
sig
type t
val clone : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t
val linearsum :
float ->
Nvector.NVECTOR_OPS.t ->
float -> Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val const : float -> Nvector.NVECTOR_OPS.t -> unit
val prod :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val div :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val scale :
float -> Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val abs : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val inv : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val addconst :
Nvector.NVECTOR_OPS.t -> float -> Nvector.NVECTOR_OPS.t -> unit
val dotprod : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val maxnorm : Nvector.NVECTOR_OPS.t -> float
val wrmsnorm : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val min : Nvector.NVECTOR_OPS.t -> float
val compare :
float -> Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> unit
val invtest : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> bool
val wl2norm : Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val l1norm : Nvector.NVECTOR_OPS.t -> float
val wrmsnormmask :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val constrmask :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> bool
val minquotient :
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val space : Nvector.NVECTOR_OPS.t -> int * int
val getlength : Nvector.NVECTOR_OPS.t -> int
val print :
?logfile:Sundials.Logfile.t -> Nvector.NVECTOR_OPS.t -> unit
val linearcombination :
Sundials.RealArray.t ->
Nvector.NVECTOR_OPS.t array -> Nvector.NVECTOR_OPS.t -> unit
val scaleaddmulti :
Sundials.RealArray.t ->
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t array -> Nvector.NVECTOR_OPS.t array -> unit
val dotprodmulti :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t array -> Sundials.RealArray.t -> unit
val linearsumvectorarray :
float ->
Nvector.NVECTOR_OPS.t array ->
float ->
Nvector.NVECTOR_OPS.t array -> Nvector.NVECTOR_OPS.t array -> unit
val scalevectorarray :
Sundials.RealArray.t ->
Nvector.NVECTOR_OPS.t array -> Nvector.NVECTOR_OPS.t array -> unit
val constvectorarray : float -> Nvector.NVECTOR_OPS.t array -> unit
val wrmsnormvectorarray :
Nvector.NVECTOR_OPS.t array ->
Nvector.NVECTOR_OPS.t array -> Sundials.RealArray.t -> unit
val wrmsnormmaskvectorarray :
Nvector.NVECTOR_OPS.t array ->
Nvector.NVECTOR_OPS.t array ->
Nvector.NVECTOR_OPS.t -> Sundials.RealArray.t -> unit
val scaleaddmultivectorarray :
Sundials.RealArray.t ->
Nvector.NVECTOR_OPS.t array ->
Nvector.NVECTOR_OPS.t array array ->
Nvector.NVECTOR_OPS.t array array -> unit
val linearcombinationvectorarray :
Sundials.RealArray.t ->
Nvector.NVECTOR_OPS.t array array ->
Nvector.NVECTOR_OPS.t array -> unit
module Local :
sig
val dotprod :
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val maxnorm : Nvector.NVECTOR_OPS.t -> float
val min : Nvector.NVECTOR_OPS.t -> float
val l1norm : Nvector.NVECTOR_OPS.t -> float
val invtest :
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> bool
val constrmask :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> bool
val minquotient :
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val wsqrsum :
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val wsqrsummask :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t -> Nvector.NVECTOR_OPS.t -> float
val dotprodmulti :
Nvector.NVECTOR_OPS.t ->
Nvector.NVECTOR_OPS.t array -> Sundials.RealArray.t -> unit
val dotprodmulti_allreduce :
Nvector.NVECTOR_OPS.t -> Sundials.RealArray.t -> unit
end
end
module type NVECTOR =
sig
type kind
type data
type t = (Nvector.NVECTOR.data, Nvector.NVECTOR.kind) Nvector.nvector
val wrap :
?context:Sundials.Context.t ->
?with_fused_ops:bool -> Nvector.NVECTOR.data -> Nvector.NVECTOR.t
val enable :
?with_fused_ops:bool ->
?with_linear_combination:bool ->
?with_scale_add_multi:bool ->
?with_dot_prod_multi:bool ->
?with_linear_sum_vector_array:bool ->
?with_scale_vector_array:bool ->
?with_const_vector_array:bool ->
?with_wrms_norm_vector_array:bool ->
?with_wrms_norm_mask_vector_array:bool ->
?with_scale_add_multi_vector_array:bool ->
?with_linear_combination_vector_array:bool ->
Nvector.NVECTOR.t -> unit
module Ops :
sig
type t = t
val clone : t -> t
val linearsum : float -> t -> float -> t -> t -> unit
val const : float -> t -> unit
val prod : t -> t -> t -> unit
val div : t -> t -> t -> unit
val scale : float -> t -> t -> unit
val abs : t -> t -> unit
val inv : t -> t -> unit
val addconst : t -> float -> t -> unit
val dotprod : t -> t -> float
val maxnorm : t -> float
val wrmsnorm : t -> t -> float
val min : t -> float
val compare : float -> t -> t -> unit
val invtest : t -> t -> bool
val wl2norm : t -> t -> float
val l1norm : t -> float
val wrmsnormmask : t -> t -> t -> float
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val space : t -> int * int
val getlength : t -> int
val print : ?logfile:Sundials.Logfile.t -> t -> unit
val linearcombination :
Sundials.RealArray.t -> t array -> t -> unit
val scaleaddmulti :
Sundials.RealArray.t -> t -> t array -> t array -> unit
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val linearsumvectorarray :
float -> t array -> float -> t array -> t array -> unit
val scalevectorarray :
Sundials.RealArray.t -> t array -> t array -> unit
val constvectorarray : float -> t array -> unit
val wrmsnormvectorarray :
t array -> t array -> Sundials.RealArray.t -> unit
val wrmsnormmaskvectorarray :
t array -> t array -> t -> Sundials.RealArray.t -> unit
val scaleaddmultivectorarray :
Sundials.RealArray.t ->
t array -> t array array -> t array array -> unit
val linearcombinationvectorarray :
Sundials.RealArray.t -> t array array -> t array -> unit
module Local :
sig
val dotprod : t -> t -> float
val maxnorm : t -> float
val min : t -> float
val l1norm : t -> float
val invtest : t -> t -> bool
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val wsqrsum : t -> t -> float
val wsqrsummask : t -> t -> t -> float
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val dotprodmulti_allreduce : t -> Sundials.RealArray.t -> unit
end
end
module DataOps :
sig
type t = data
val clone : t -> t
val linearsum : float -> t -> float -> t -> t -> unit
val const : float -> t -> unit
val prod : t -> t -> t -> unit
val div : t -> t -> t -> unit
val scale : float -> t -> t -> unit
val abs : t -> t -> unit
val inv : t -> t -> unit
val addconst : t -> float -> t -> unit
val dotprod : t -> t -> float
val maxnorm : t -> float
val wrmsnorm : t -> t -> float
val min : t -> float
val compare : float -> t -> t -> unit
val invtest : t -> t -> bool
val wl2norm : t -> t -> float
val l1norm : t -> float
val wrmsnormmask : t -> t -> t -> float
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val space : t -> int * int
val getlength : t -> int
val print : ?logfile:Sundials.Logfile.t -> t -> unit
val linearcombination :
Sundials.RealArray.t -> t array -> t -> unit
val scaleaddmulti :
Sundials.RealArray.t -> t -> t array -> t array -> unit
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val linearsumvectorarray :
float -> t array -> float -> t array -> t array -> unit
val scalevectorarray :
Sundials.RealArray.t -> t array -> t array -> unit
val constvectorarray : float -> t array -> unit
val wrmsnormvectorarray :
t array -> t array -> Sundials.RealArray.t -> unit
val wrmsnormmaskvectorarray :
t array -> t array -> t -> Sundials.RealArray.t -> unit
val scaleaddmultivectorarray :
Sundials.RealArray.t ->
t array -> t array array -> t array array -> unit
val linearcombinationvectorarray :
Sundials.RealArray.t -> t array array -> t array -> unit
module Local :
sig
val dotprod : t -> t -> float
val maxnorm : t -> float
val min : t -> float
val l1norm : t -> float
val invtest : t -> t -> bool
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val wsqrsum : t -> t -> float
val wsqrsummask : t -> t -> t -> float
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val dotprodmulti_allreduce : t -> Sundials.RealArray.t -> unit
end
end
end
module Ops :
sig
val clone : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t
val linearsum :
float ->
('d, 'k) Nvector.t ->
float -> ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val const : float -> ('d, 'k) Nvector.t -> unit
val prod :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val div :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val scale : float -> ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val abs : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val inv : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val addconst :
('d, 'k) Nvector.t -> float -> ('d, 'k) Nvector.t -> unit
val dotprod : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val maxnorm : ('d, 'k) Nvector.t -> float
val wrmsnorm : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val min : ('d, 'k) Nvector.t -> float
val compare : float -> ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> unit
val invtest : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> bool
val wl2norm : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val l1norm : ('d, 'k) Nvector.t -> float
val wrmsnormmask :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val constrmask :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> bool
val minquotient : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val space : ('d, 'k) Nvector.t -> int * int
val getlength : ('d, 'k) Nvector.t -> int
val print : ?logfile:Sundials.Logfile.t -> ('d, 'k) Nvector.t -> unit
val linearcombination :
Sundials.RealArray.t ->
('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t -> unit
val scaleaddmulti :
Sundials.RealArray.t ->
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t array -> unit
val dotprodmulti :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t array -> Sundials.RealArray.t -> unit
val linearsumvectorarray :
float ->
('d, 'k) Nvector.t array ->
float -> ('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t array -> unit
val scalevectorarray :
Sundials.RealArray.t ->
('d, 'k) Nvector.t array -> ('d, 'k) Nvector.t array -> unit
val constvectorarray : float -> ('d, 'k) Nvector.t array -> unit
val wrmsnormvectorarray :
('d, 'k) Nvector.t array ->
('d, 'k) Nvector.t array -> Sundials.RealArray.t -> unit
val wrmsnormmaskvectorarray :
('d, 'k) Nvector.t array ->
('d, 'k) Nvector.t array ->
('d, 'k) Nvector.t -> Sundials.RealArray.t -> unit
val scaleaddmultivectorarray :
Sundials.RealArray.t ->
('d, 'k) Nvector.t array ->
('d, 'k) Nvector.t array array ->
('d, 'k) Nvector.t array array -> unit
val linearcombinationvectorarray :
Sundials.RealArray.t ->
('d, 'k) Nvector.t array array -> ('d, 'k) Nvector.t array -> unit
external has_linearcombination : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_linearcombination" [@@noalloc]
external has_scaleaddmulti : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_scaleaddmulti" [@@noalloc]
external has_dotprodmulti : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_dotprodmulti" [@@noalloc]
external has_linearsumvectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_linearsumvectorarray" [@@noalloc]
external has_scalevectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_scalevectorarray" [@@noalloc]
external has_constvectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_constvectorarray" [@@noalloc]
external has_wrmsnormvectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_wrmsnormvectorarray" [@@noalloc]
external has_wrmsnormmaskvectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_wrmsnormmaskvectorarray" [@@noalloc]
external has_scaleaddmultivectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_scaleaddmultivectorarray" [@@noalloc]
external has_linearcombinationvectorarray : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_linearcombinationvectorarray" [@@noalloc]
module Local :
sig
val dotprod : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val maxnorm : ('d, 'k) Nvector.t -> float
val min : ('d, 'k) Nvector.t -> float
val l1norm : ('d, 'k) Nvector.t -> float
val invtest : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> bool
val constrmask :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> bool
val minquotient : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val wsqrsum : ('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val wsqrsummask :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t -> ('d, 'k) Nvector.t -> float
val dotprodmulti :
('d, 'k) Nvector.t ->
('d, 'k) Nvector.t array -> Sundials.RealArray.t -> unit
val dotprodmulti_allreduce :
('d, 'k) Nvector.t -> Sundials.RealArray.t -> unit
external has_dotprod : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_dotprodlocal" [@@noalloc]
external has_maxnorm : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_maxnormlocal" [@@noalloc]
external has_min : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_minlocal" [@@noalloc]
external has_l1norm : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_l1normlocal" [@@noalloc]
external has_invtest : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_invtestlocal" [@@noalloc]
external has_constrmask : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_constrmasklocal" [@@noalloc]
external has_minquotient : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_minquotientlocal" [@@noalloc]
external has_wsqrsum : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_wsqrsumlocal" [@@noalloc]
external has_wsqrsummask : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_wsqrsummasklocal" [@@noalloc]
external has_dotprodmulti : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_dotprodmultilocal" [@@noalloc]
external has_dotprodmulti_allreduce : ('d, 'k) Nvector.t -> bool
= "sunml_nvec_has_dotprodmultiallreduce" [@@noalloc]
end
end
type gdata = ..
type gdata += RA of Sundials.RealArray.t
type gkind
type any = (Nvector.gdata, Nvector.gkind) Nvector.t
exception BadGenericType
exception OperationNotProvided
module MakeDataOps :
sig
type t
val clone : t -> t
val linearsum : float -> t -> float -> t -> t -> unit
val const : float -> t -> unit
val prod : t -> t -> t -> unit
val div : t -> t -> t -> unit
val scale : float -> t -> t -> unit
val abs : t -> t -> unit
val inv : t -> t -> unit
val addconst : t -> float -> t -> unit
val dotprod : t -> t -> float
val maxnorm : t -> float
val wrmsnorm : t -> t -> float
val min : t -> float
val compare : float -> t -> t -> unit
val invtest : t -> t -> bool
val wl2norm : t -> t -> float
val l1norm : t -> float
val wrmsnormmask : t -> t -> t -> float
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val space : t -> int * int
val getlength : t -> int
val print : ?logfile:Sundials.Logfile.t -> t -> unit
val linearcombination : Sundials.RealArray.t -> t array -> t -> unit
val scaleaddmulti :
Sundials.RealArray.t -> t -> t array -> t array -> unit
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val linearsumvectorarray :
float -> t array -> float -> t array -> t array -> unit
val scalevectorarray :
Sundials.RealArray.t -> t array -> t array -> unit
val constvectorarray : float -> t array -> unit
val wrmsnormvectorarray :
t array -> t array -> Sundials.RealArray.t -> unit
val wrmsnormmaskvectorarray :
t array -> t array -> t -> Sundials.RealArray.t -> unit
val scaleaddmultivectorarray :
Sundials.RealArray.t ->
t array -> t array array -> t array array -> unit
val linearcombinationvectorarray :
Sundials.RealArray.t -> t array array -> t array -> unit
module Local :
sig
val dotprod : t -> t -> float
val maxnorm : t -> float
val min : t -> float
val l1norm : t -> float
val invtest : t -> t -> bool
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val wsqrsum : t -> t -> float
val wsqrsummask : t -> t -> t -> float
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val dotprodmulti_allreduce : t -> Sundials.RealArray.t -> unit
end
val unwrap : gdata -> t
val wrap : t -> gdata
end ->
sig
type t = gdata
val clone : t -> t
val linearsum : float -> t -> float -> t -> t -> unit
val const : float -> t -> unit
val prod : t -> t -> t -> unit
val div : t -> t -> t -> unit
val scale : float -> t -> t -> unit
val abs : t -> t -> unit
val inv : t -> t -> unit
val addconst : t -> float -> t -> unit
val dotprod : t -> t -> float
val maxnorm : t -> float
val wrmsnorm : t -> t -> float
val min : t -> float
val compare : float -> t -> t -> unit
val invtest : t -> t -> bool
val wl2norm : t -> t -> float
val l1norm : t -> float
val wrmsnormmask : t -> t -> t -> float
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val space : t -> int * int
val getlength : t -> int
val print : ?logfile:Sundials.Logfile.t -> t -> unit
val linearcombination : Sundials.RealArray.t -> t array -> t -> unit
val scaleaddmulti :
Sundials.RealArray.t -> t -> t array -> t array -> unit
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val linearsumvectorarray :
float -> t array -> float -> t array -> t array -> unit
val scalevectorarray :
Sundials.RealArray.t -> t array -> t array -> unit
val constvectorarray : float -> t array -> unit
val wrmsnormvectorarray :
t array -> t array -> Sundials.RealArray.t -> unit
val wrmsnormmaskvectorarray :
t array -> t array -> t -> Sundials.RealArray.t -> unit
val scaleaddmultivectorarray :
Sundials.RealArray.t ->
t array -> t array array -> t array array -> unit
val linearcombinationvectorarray :
Sundials.RealArray.t -> t array array -> t array -> unit
module Local :
sig
val dotprod : t -> t -> float
val maxnorm : t -> float
val min : t -> float
val l1norm : t -> float
val invtest : t -> t -> bool
val constrmask : t -> t -> t -> bool
val minquotient : t -> t -> float
val wsqrsum : t -> t -> float
val wsqrsummask : t -> t -> t -> float
val dotprodmulti : t -> t array -> Sundials.RealArray.t -> unit
val dotprodmulti_allreduce : t -> Sundials.RealArray.t -> unit
end
end
end