mpi :: Comm :: defaultinit
core :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Pointer :: defaultinit
mpi :: Comm :: defaultinit
core :: Object :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).
# An MPI communicator
extern class Comm `{ MPI_Comm `}
# The _null_ communicator, targeting no processors
new null_ `{ return MPI_COMM_NULL; `}
# The _world_ communicator, targeting all processors
new world `{ return MPI_COMM_WORLD; `}
# The _self_ communicator, targeting this processor only
new self_ `{ return MPI_COMM_SELF; `}
# Number of processors in this communicator
fun size: Int `{
int size;
MPI_Comm_size(self, &size);
return size;
`}
# Rank on this processor in this communicator
fun rank: Rank `{
int rank;
MPI_Comm_rank(self, &rank);
return rank;
`}
end
lib/mpi/mpi.nit:166,1--190,3