Module Nvector_mpimany.Any

module Any: sig .. end

A generic nvector interface to mpimany-vector nvectors.

Create mpimany-vector nvectors using the generic nvector interface where the payload is wrapped with the MpiMany constructor.


val wrap : ?context:Sundials.Context.t ->
?with_fused_ops:bool ->
?comm:Mpi.communicator -> Nvector.any Sundials.ROArray.t -> Nvector.any

Creates a generic nvector from an array of generic nvectors. If the communicator argument is not given then all nvectors in the array that have a communicator must have the same communicator which becomes the communicator of the new nvector (at least one element must have a communicator). If the communicator argument is given, each array element may use any or no communicator.

An optional argument permits to enable all the fused and array operations for a given nvector (they are disabled by default).

val unwrap : Nvector.any -> Nvector_mpimany.data

Returns the payload of the generic vector if it was constructed with MpiMany, otherwise raises Nvector.BadGenericType.

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_dot_prod_multi_local:bool -> Nvector.any -> unit

Selectively enable or disable fused and array operations. The with_fused_ops argument enables or disables all such operations.