pub struct UserDatatype { /* private fields */ }Expand description
A user-defined (derived) datatype describing a non-contiguous layout as a
type map: a set of (byte_offset, byte_length) blocks repeated with a
fixed byte extent. Mirrors rsmpi’s UserDatatype.
This implementation supports the common constructors — contiguous,
vector, indexed and structured — over a primitive base type.
Send a derived layout with View; receive one with MutView.
Implementations§
Source§impl UserDatatype
impl UserDatatype
Sourcepub fn contiguous(count: Count, base: DatatypeRef) -> UserDatatype
pub fn contiguous(count: Count, base: DatatypeRef) -> UserDatatype
count contiguous copies of base (MPI_Type_contiguous).
Sourcepub fn vector(
count: Count,
blocklength: Count,
stride: Count,
base: DatatypeRef,
) -> UserDatatype
pub fn vector( count: Count, blocklength: Count, stride: Count, base: DatatypeRef, ) -> UserDatatype
count blocks of blocklength base elements, each stride base
elements apart (MPI_Type_vector).
Sourcepub fn indexed(
blocklengths: &[Count],
displacements: &[Count],
base: DatatypeRef,
) -> UserDatatype
pub fn indexed( blocklengths: &[Count], displacements: &[Count], base: DatatypeRef, ) -> UserDatatype
Blocks of the given per-block lengths at the given base-element
displacements (MPI_Type_indexed).
Sourcepub fn structured(
blocklengths: &[Count],
byte_displacements: &[isize],
base: DatatypeRef,
) -> UserDatatype
pub fn structured( blocklengths: &[Count], byte_displacements: &[isize], base: DatatypeRef, ) -> UserDatatype
Blocks of the given per-block base-element lengths at explicit byte
displacements (MPI_Type_create_struct, single base type).
Sourcepub fn base_count(&self) -> Count
pub fn base_count(&self) -> Count
The number of base elements in one element of this datatype.
Trait Implementations§
Source§impl Clone for UserDatatype
impl Clone for UserDatatype
Source§fn clone(&self) -> UserDatatype
fn clone(&self) -> UserDatatype
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more