#include <gpr/linalg/MpiContext.h>
Public Member Functions | |
| bool | is_distributed () const noexcept |
Static Public Member Functions | |
| static MpiContext | local () noexcept |
Public Attributes | |
| int | rank {0} |
| int | nprocs {1} |
| MpiCommType | comm {kMpiCommNull} |
Definition at line 59 of file MpiContext.h.
|
inlinenodiscardnoexcept |
True iff the context spans more than one rank. Callers gate collective code paths on this rather than spelling nprocs > 1 inline so the policy lives next to the data it depends on.
Definition at line 67 of file MpiContext.h.
|
inlinestaticnodiscardnoexcept |
Single-process context. Always available, regardless of build flavour. Returned communicator is MPI_COMM_NULL (or the int placeholder) because no collective is dispatched on the local path.
Definition at line 75 of file MpiContext.h.
| MpiCommType gpr::linalg::MpiContext::comm {kMpiCommNull} |
Definition at line 62 of file MpiContext.h.
| int gpr::linalg::MpiContext::nprocs {1} |
Definition at line 61 of file MpiContext.h.
| int gpr::linalg::MpiContext::rank {0} |
Definition at line 60 of file MpiContext.h.