mod distribution;
mod error;
mod local_size;
mod plans;
mod pool;
mod transpose;
pub use distribution::{Distribution, LocalPartition};
pub use error::MpiError;
pub use local_size::{local_size_2d, local_size_3d, local_size_nd};
pub use plans::{MpiPlan2D, MpiPlan3D, MpiPlanND};
pub use pool::{MpiFloat, MpiPool};
pub use transpose::distributed_transpose;
use crate::api::Flags;
#[derive(Debug, Clone, Copy, Default)]
pub struct MpiFlags {
pub base: Flags,
pub transposed_out: bool,
pub transposed_in: bool,
}
impl MpiFlags {
pub fn new() -> Self {
Self::default()
}
pub fn with_base(mut self, flags: Flags) -> Self {
self.base = flags;
self
}
pub fn transposed_out(mut self) -> Self {
self.transposed_out = true;
self
}
pub fn transposed_in(mut self) -> Self {
self.transposed_in = true;
self
}
pub fn estimate() -> Self {
Self {
base: Flags::ESTIMATE,
..Default::default()
}
}
pub fn measure() -> Self {
Self {
base: Flags::MEASURE,
..Default::default()
}
}
}