INNER CODE UNIT · Rust
rank_to_world
NVIDIA/nccl · contrib/nccl4rust/crates/nccl-device/src/lib.rs:181
pub fn rank_to_world(comm: DevComm<'_>, team: Team, rank: i32) -> Option<i32> {
if rank < 0 || rank >= team.size() {
None
} else {
Some(rank_to_world_device(
comm,
team.size(),
team.rank(),
team.stride(),
rank,
))
}
}
#[inline(always)]
fn rank_to_world_device(
comm: DevComm<'_>,
team_n_ranks: i32,