sc::MessageGrp(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’… sc::MessageGrp(3) β€” MPQC πŸ’…

🌸 NAME 🌸

sc::MessageGrp β€” bestie, this is the abstract class that provides a mechanism for moving data and objects between nodes in a parallel machine. That’s the whole vibe. πŸ’–


✨ SYNOPSIS ✨

#include <message.h>

Inherits sc::DescribedClass.

Inherited by sc::intMessageGrp, sc::MPIMessageGrp, and sc::ProcMessageGrp.

πŸ’– Public Member Functions πŸ’–

Okay so here’s the entire public roster. Every overload is here, no skips, no β€œoops I left out the unsigned char one.” πŸ’…

  • MessageGrp (const Ref< KeyVal > &) β€” the constructor, doing constructor things and taking a Ref< KeyVal >.
  • int n () β€” hands you the number of processors. 🫢
  • int me () β€” tells you which processor you are, and it’s in the range [0,n()).
  • virtual Ref< MessageGrp > clone (void)=0 β€” returns a copy of this MessageGrp specialization with its own independent communication context. ✨
  • virtual void send (int target, const double *data, int ndata) β€” sends messages sequentially over to the target processor.
  • virtual void send (int target, const unsigned int *data, int ndata) β€” same send energy, unsigned int flavor.
  • virtual void send (int target, const int *data, int ndata) β€” same send energy, int flavor.
  • virtual void send (int target, const char *data, int nbyte) β€” same send energy, char flavor.
  • virtual void send (int target, const unsigned char *data, int nbyte) β€” same send energy, unsigned char flavor.
  • virtual void send (int target, const signed char *data, int nbyte) β€” same send energy, signed char flavor.
  • virtual void send (int target, const short *data, int ndata) β€” same send energy, short flavor.
  • virtual void send (int target, const long *data, int ndata) β€” same send energy, long flavor.
  • virtual void send (int target, const float *data, int ndata) β€” same send energy, float flavor.
  • void send (int target, double data) β€” single double, sent straight to the target.
  • void send (int target, int data) β€” single int, sent straight to the target.
  • virtual void raw_send (int target, const void *data, int nbyte)=0 β€” the raw send hook, pure virtual, no cap.
  • virtual void sendt (int target, int type, const double *data, int ndata) β€” sends typed messages to the target processor. πŸ’Œ
  • virtual void sendt (int target, int type, const unsigned int *data, int ndata) β€” typed send, unsigned int flavor.
  • virtual void sendt (int target, int type, const int *data, int ndata) β€” typed send, int flavor.
  • virtual void sendt (int target, int type, const char *data, int nbyte) β€” typed send, char flavor.
  • virtual void sendt (int target, int type, const unsigned char *data, int nbyte) β€” typed send, unsigned char flavor.
  • virtual void sendt (int target, int type, const signed char *data, int nbyte) β€” typed send, signed char flavor.
  • virtual void sendt (int target, int type, const short *data, int ndata) β€” typed send, short flavor.
  • virtual void sendt (int target, int type, const long *data, int ndata) β€” typed send, long flavor.
  • virtual void sendt (int target, int type, const float *data, int ndata) β€” typed send, float flavor.
  • void sendt (int target, int type, double data) β€” single typed double.
  • void sendt (int target, int type, int data) β€” single typed int.
  • virtual void raw_sendt (int target, int type, const void *data, int nbyte)=0 β€” raw typed send hook, pure virtual.
  • virtual void recv (int sender, double *data, int ndata) β€” receives messages sent sequentially from the sender. πŸŽ€
  • virtual void recv (int sender, unsigned int *data, int ndata) β€” receive, unsigned int flavor.
  • virtual void recv (int sender, int *data, int ndata) β€” receive, int flavor.
  • virtual void recv (int sender, char *data, int nbyte) β€” receive, char flavor.
  • virtual void recv (int sender, unsigned char *data, int nbyte) β€” receive, unsigned char flavor.
  • virtual void recv (int sender, signed char *data, int nbyte) β€” receive, signed char flavor.
  • virtual void recv (int sender, short *data, int ndata) β€” receive, short flavor.
  • virtual void recv (int sender, long *data, int ndata) β€” receive, long flavor.
  • virtual void recv (int sender, float *data, int ndata) β€” receive, float flavor.
  • void recv (int sender, double &data) β€” receive one double by reference.
  • void recv (int sender, int &data) β€” receive one int by reference.
  • virtual void raw_recv (int sender, void *data, int nbyte)=0 β€” raw receive hook, pure virtual.
  • virtual void recvt (int type, double *data, int ndata) β€” receives messages sent by type. πŸ¦‹
  • virtual void recvt (int type, unsigned int *data, int ndata) β€” typed receive, unsigned int flavor.
  • virtual void recvt (int type, int *data, int ndata) β€” typed receive, int flavor.
  • virtual void recvt (int type, char *data, int nbyte) β€” typed receive, char flavor.
  • virtual void recvt (int type, unsigned char *data, int nbyte) β€” typed receive, unsigned char flavor.
  • virtual void recvt (int type, signed char *data, int nbyte) β€” typed receive, signed char flavor.
  • virtual void recvt (int type, short *data, int ndata) β€” typed receive, short flavor.
  • virtual void recvt (int type, long *data, int ndata) β€” typed receive, long flavor.
  • virtual void recvt (int type, float *data, int ndata) β€” typed receive, float flavor.
  • void recvt (int type, double &data) β€” receive one typed double by reference.
  • void recvt (int type, int &data) β€” receive one typed int by reference.
  • virtual void raw_recvt (int type, void *data, int nbyte)=0 β€” raw typed receive hook, pure virtual.
  • virtual int probet (int type)=0 β€” asks whether a given typed message has been received. πŸ‘€
  • virtual void bcast (double *data, int ndata, int from=0) β€” does broadcasts for all kinds of data types. πŸ“£
  • virtual void bcast (unsigned int *data, int ndata, int from=0) β€” broadcast, unsigned int flavor.
  • virtual void bcast (int *data, int ndata, int from=0) β€” broadcast, int flavor.
  • virtual void bcast (char *data, int nbyte, int from=0) β€” broadcast, char flavor.
  • virtual void bcast (unsigned char *data, int nbyte, int from=0) β€” broadcast, unsigned char flavor.
  • virtual void bcast (signed char *data, int nbyte, int from=0) β€” broadcast, signed char flavor.
  • virtual void bcast (short *data, int ndata, int from=0) β€” broadcast, short flavor.
  • virtual void bcast (long *data, int ndata, int from=0) β€” broadcast, long flavor.
  • virtual void bcast (float *data, int ndata, int from=0) β€” broadcast, float flavor.
  • virtual void raw_bcast (void *data, int nbyte, int from=0) β€” raw broadcast hook.
  • void bcast (double &data, int from=0) β€” broadcast one double by reference.
  • void bcast (int &data, int from=0) β€” broadcast one int by reference.
  • virtual void raw_collect (const void *part, const int *lengths, void *whole, int bytes_per_datum=1) β€” collects data distributed on the nodes into a big array replicated on each node. 🧚
  • void collect (const double *part, const int *lengths, double *whole) β€” the double collect convenience overload.
  • virtual void sum (double *data, int n, double *=0, int target=-1) β€” global sum reduction. πŸ”₯
  • virtual void sum (unsigned int *data, int n, unsigned int *=0, int target=-1) β€” global sum reduction, unsigned int flavor.
  • virtual void sum (int *data, int n, int *=0, int target=-1) β€” global sum reduction, int flavor.
  • virtual void sum (char *data, int n, char *=0, int target=-1) β€” global sum reduction, char flavor.
  • virtual void sum (unsigned char *data, int n, unsigned char *=0, int target=-1) β€” global sum reduction, unsigned char flavor.
  • virtual void sum (signed char *data, int n, signed char *=0, int target=-1) β€” global sum reduction, signed char flavor.
  • void sum (double &data) β€” sum one double by reference.
  • void sum (int &data) β€” sum one int by reference.
  • virtual void max (double *data, int n, double *=0, int target=-1) β€” global maximization. πŸ‘‘
  • virtual void max (int *data, int n, int *=0, int target=-1) β€” global maximization, int flavor.
  • virtual void max (unsigned int *data, int n, unsigned int *=0, int target=-1) β€” global maximization, unsigned int flavor.
  • virtual void max (char *data, int n, char *=0, int target=-1) β€” global maximization, char flavor.
  • virtual void max (unsigned char *data, int n, unsigned char *=0, int target=-1) β€” global maximization, unsigned char flavor.
  • virtual void max (signed char *data, int n, signed char *=0, int target=-1) β€” global maximization, signed char flavor.
  • void max (double &data) β€” max one double by reference.
  • void max (int &data) β€” max one int by reference.
  • virtual void min (double *data, int n, double *=0, int target=-1) β€” global minimization. 🌈
  • virtual void min (int *data, int n, int *=0, int target=-1) β€” global minimization, int flavor.
  • virtual void min (unsigned int *data, int n, unsigned int *=0, int target=-1) β€” global minimization, unsigned int flavor.
  • virtual void min (char *data, int n, char *=0, int target=-1) β€” global minimization, char flavor.
  • virtual void min (unsigned char *data, int n, unsigned char *=0, int target=-1) β€” global minimization, unsigned char flavor.
  • virtual void min (signed char *data, int n, signed char *=0, int target=-1) β€” global minimization, signed char flavor.
  • void min (double &data) β€” min one double by reference.
  • void min (int &data) β€” min one int by reference.
  • virtual void reduce (double *, int n, GrpReduce< double > &, double *scratch=0, int target=-1) β€” global generic reduction. ⭐
  • virtual void reduce (int *, int n, GrpReduce< int > &, int *scratch=0, int target=-1) β€” generic reduction, int flavor.
  • virtual void reduce (unsigned int *, int n, GrpReduce< unsigned int > &, unsigned int *scratch=0, int target=-1) β€” generic reduction, unsigned int flavor.
  • virtual void reduce (char *, int n, GrpReduce< char > &, char *scratch=0, int target=-1) β€” generic reduction, char flavor.
  • virtual void reduce (unsigned char *, int n, GrpReduce< unsigned char > &, unsigned char *scratch=0, int target=-1) β€” generic reduction, unsigned char flavor.
  • virtual void reduce (signed char *, int n, GrpReduce< signed char > &, signed char *scratch=0, int target=-1) β€” generic reduction, signed char flavor.
  • virtual void reduce (short *, int n, GrpReduce< short > &, short *scratch=0, int target=-1) β€” generic reduction, short flavor.
  • virtual void reduce (float *, int n, GrpReduce< float > &, float *scratch=0, int target=-1) β€” generic reduction, float flavor.
  • virtual void reduce (long *, int n, GrpReduce< long > &, long *scratch=0, int target=-1) β€” generic reduction, long flavor.
  • void reduce (double &data, GrpReduce< double > &r) β€” reduce one double by reference with a GrpReduce< double >.
  • void reduce (int &data, GrpReduce< int > &r) β€” reduce one int by reference with a GrpReduce< int >.
  • virtual void sync () β€” synchronizes all of the processors. 🫢
  • Ref< MachineTopology > topology () β€” returns the MachineTopology object.
  • int classdesc_to_index (const ClassDesc *) β€” each message group maintains an association of ClassDesc with a global index so SavableState information can be sent between nodes without needing to send the classname and look up the ClassDesc with each transfer. πŸ’«
  • const ClassDesc * index_to_classdesc (int) β€” the reverse lookup buddy for that ClassDesc index situation.
  • int nclass () const β€” the class-count const member.

🌟 Static Public Member Functions 🌟

  • static void set_default_messagegrp (const Ref< MessageGrp > &) β€” sets the default message group; the default message group contains the primary message group to be used by an application. πŸ’–
  • static MessageGrp * get_default_messagegrp () β€” returns the default message group. ✨
  • static MessageGrp * initial_messagegrp (int &argc, char **&argv) β€” creates a message group. πŸŽ€

πŸ›‘οΈ Protected Member Functions πŸ›‘οΈ

  • void initialize (int me, int n) β€” the classdesc_to_index_ and index_to_classdesc_ arrays cannot be initialized by the MessageGrp CTOR, because the MessageGrp specialization has not yet been initialized and communication is not available. No cap, that’s just the setup order. 🫢

πŸ”’ Protected Attributes πŸ”’

  • Ref< MachineTopology > topology_ β€” the topology ref hanging out in protected territory.
  • int debug_ β€” the debug int, also protected.

πŸ’– Detailed Description πŸ’–

Real talk: the MessageGrp abstract class provides a mechanism for moving data and objects between nodes in a parallel machine. That’s the whole point, bestie. πŸ’…βœ¨

✨ Member Function Documentation ✨

Okay bestie, this is the part where we meet every member function one by one. Buckle up, because there are a lot of them, and they're all serving "similar members exist for each of the basic types" energy. πŸ’…


🌈 bcast β€” the broadcast bestie 🌈

virtual void sc::MessageGrp::bcast (double * data, int ndata, int from = 0)
    [virtual]

This one does broadcasts of various types of data. And yes, similar members exist for each of the basic types β€” it's giving "one for every type, no cap." πŸ’–


🧚 classdesc_to_index β€” the mapping lore 🧚

int sc::MessageGrp::classdesc_to_index (const ClassDesc *)

Each message group keeps an association of ClassDesc with a global index, so SavableState information can be sent between nodes without needing to send the classname and look up the ClassDesc with each transfer. These routines return information about that mapping. Iykyk. ✨


πŸ‘‘ initial_messagegrp β€” the factory energy πŸ‘‘

static MessageGrp* sc::MessageGrp::initial_messagegrp (int & argc, char **& argv) [static]

Create a message group. This routine looks for a -messagegrp argument, then the environmental variable MESSAGEGRP to decide which specialization of MessageGrp would be appropriate. The argument to -messagegrp should be either a string for a ParsedKeyVal constructor or a classname. If this returns null, it is up to the programmer to create a MessageGrp. So like, no auto-magic if it's a null vibe β€” you're on your own, bestie. 🫢


πŸŽ€ initialize β€” protected but essential πŸŽ€

void sc::MessageGrp::initialize (int me, int n) [protected]

The classdesc_to_index_ and index_to_classdesc_ arrays cannot be initialized by the MessageGrp CTOR, because the MessageGrp specialization has not yet been initialized and communication is not available. CTOR's of specializations of MessageGrp must call the initialize member in their body to complete the initialization process. So like, the constructor can't do it all β€” it needs a lil helper. Periodt. πŸ’…


πŸ”₯ max β€” global maximization πŸ”₯

virtual void sc::MessageGrp::max (double * data, int n, double * = 0, int target = -1) [virtual]

Global maximization. Similar members exist for each of the basic types. That's the whole vibe. πŸ’–


🌸 min β€” global minimization 🌸

virtual void sc::MessageGrp::min (double * data, int n, double * = 0, int target = -1) [virtual]

Global minimization. Similar members exist for each of the basic types. Twin of max, basically. 😌


πŸ¦‹ recv β€” receive sequentially πŸ¦‹

virtual void sc::MessageGrp::recv (int sender, double * data, int ndata) [virtual]

Receive messages sent sequentially from the sender. Similar members exist for each of the basic types. So like, messages come in order from that one sender, bestie. πŸ’Œ


⭐ recvt β€” receive by type ⭐

virtual void sc::MessageGrp::recvt (int type, double * data, int ndata) [virtual]

Receive messages sent by type. Similar members exist for each of the basic types. Now you're filtering by type β€” it's giving selective inbox energy. πŸ“¬


πŸ’œ reduce β€” generic reduction πŸ’œ

virtual void sc::MessageGrp::reduce (double *, int n, GrpReduce< double > &, double * scratch = 0, int target = -1) [virtual]

Global generic reduction. Similar members exist for each of the basic types.

🌟 Reimplemented in sc::MPIMessageGrp.

🌈 send β€” sequential send 🌈

virtual void sc::MessageGrp::send (int target, const double * data, int ndata) [virtual]

Send messages sequentially to the target processor. Similar members exist for each of the basic types. Slide into their DMs β€” sequentially, of course. πŸ’Œ


πŸ“ sendt β€” typed send πŸ“

virtual void sc::MessageGrp::sendt (int target, int type, const double * data, int ndata) [virtual]

Send typed messages to the target processor. Similar members exist for each of the basic types. Now with a type attached, so the receiver knows what's tea. πŸ«–


🌟 sum β€” global sum reduction 🌟

virtual void sc::MessageGrp::sum (double * data, int n, double * = 0, int target = -1) [virtual]

Global sum reduction. Similar members exist for each of the basic types.

Reimplemented in sc::MPIMessageGrp.


✨ Author ✨

This page was generated automatically by Doxygen for MPQC from the source code. πŸ’–

πŸŽ€ That's the whole manual page, bestie β€” MPQC version 2.3.1, dated Sun Oct 4 2020. Go off and message-group responsibly. Periodt. πŸŽ€
πŸ“¦ where this page comes from