my $call = (caller())[0];
no strict 'refs';
# subs (MPI_ function calls)
- foreach (qw(Init Finalize COMM_WORLD ANY_SOURCE Comm_rank Comm_size
+ foreach (qw(Init Finalize COMM_WORLD ANY_SOURCE ANY_TAG Comm_rank Comm_size
Recv Send Barrier Bcast Gather
Scatter Allgather Alltoall Reduce
Comm_compare Comm_dup Comm_free Comm_split Comm_spawn
C<$source> can be C<MPI_ANY_SOURCE> which will do what it says.
+C<$msg_tag> can be C<MPI_ANY_TAG> which will match any tag.
+
=cut
sub Recv {
return newSViv((IV)MPI_ANY_SOURCE);
}
+/* returns SV whose IV slot is a cast pointer to the MPI_ANY_TAG value */
+SV* ANY_TAG () {
+ return newSViv((IV)MPI_ANY_TAG);
+}
+
/* calls MPI_Barrier for comm */
int Barrier (SV*comm) {
MPI_Barrier((MPI_Comm)SvIVX(comm));
SV *
ANY_SOURCE ()
+SV *
+ANY_TAG ()
+
int
Barrier (comm)
SV * comm