1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
pub struct DistributedContext { pub rank: u32, pub world_size: u32, } impl DistributedContext { pub fn new() -> Self { Self { rank: 0, world_size: 1, } } } impl Default for DistributedContext { fn default() -> Self { Self::new() } }