|
Graybat
1.1
Graph Approach for Highly Generic Communication Schemes Based on Adaptive Topologies
|
Public Member Functions | |
Point to Point Communication Interface | |
| template<typename T_Send > | |
| void | send (const VAddr destVAddr, const Tag tag, const Context context, const T_Send &sendData)=delete |
| template<typename T_Send > | |
| Event | asyncSend (const VAddr destVAddr, const Tag tag, const Context context, const T_Send &sendData)=delete |
| template<typename T_Recv > | |
| void | recv (const VAddr srcVAddr, const Tag tag, const Context context, T_Recv &recvData)=delete |
| template<typename T_Recv > | |
| Event | recv (const Context context, T_Recv &recvData)=delete |
| template<typename T_Recv > | |
| Event | asyncRecv (const VAddr srcVAddr, const Tag tag, const Context context, T_Recv &recvData)=delete |
Collective Communication Interface | |
| template<typename T_Send , typename T_Recv > | |
| void | gather (const VAddr rootVAddr, const Context context, const T_Send &sendData, T_Recv &recvData) |
| Collects sendData from all peers of the context and transmits it as a list to the peer with rootVAddr. Data of all peers has to be from the same size. More... | |
| template<typename T_Send , typename T_Recv > | |
| void | gatherVar (const VAddr rootVAddr, const Context context, const T_Send &sendData, T_Recv &recvData, std::vector< unsigned > &recvCount) |
| Collects sendData from all members of the context with varying size and transmits it as a list to peer with rootVAddr. More... | |
| template<typename T_Send , typename T_Recv > | |
| void | allGather (Context context, const T_Send &sendData, T_Recv &recvData) |
| Collects sendData from all members of the context and transmits it as a list to every peer in the context More... | |
| template<typename T_Send , typename T_Recv > | |
| void | allGatherVar (const Context context, const T_Send &sendData, T_Recv &recvData, std::vector< unsigned > &recvCount) |
| Collects sendData from all peers of the context. Size of sendData can vary in size. The data is received by every peer in the context. More... | |
| template<typename T_Send , typename T_Recv > | |
| void | scatter (const VAddr rootVAddr, const Context context, const T_Send &sendData, T_Recv &recvData) |
| Distributes sendData from peer rootVAddr to all peers in context. Every peer will receive different data. More... | |
| template<typename T_Send , typename T_Recv > | |
| void | allScatter (const Context context, const T_Send &sendData, T_Recv &recvData) |
| Distributes sendData of all peer in the context to all peers in the context. Every peer will receive data from every other peer (also the own data) More... | |
| template<typename T_Send , typename T_Recv , typename T_Op > | |
| void | reduce (const VAddr rootVAddr, const Context context, const T_Op op, const T_Send &sendData, T_Recv &recvData) |
| Performs a reduction with a binary operator op on all sendData elements from all peers whithin the context. The result will be received by the peer with rootVAddr. Binary operations like std::plus, std::minus can be used. But, they can also be defined as binary operator simular to std::plus etc. More... | |
| template<typename T_Send , typename T_Recv , typename T_Op > | |
| void | allReduce (const Context context, T_Op op, const T_Send &sendData, T_Recv &recvData) |
| Performs a reduction with a binary operator op on all sendData elements from all peers whithin the context. The result will be received by all peers. More... | |
| template<typename T_SendRecv > | |
| void | broadcast (const VAddr rootVAddr, const Context context, T_SendRecv &data) |
| Send sendData from peer rootVAddr to all peers in context. Every peer will receive the same data. More... | |
| void | synchronize (const Context context) |
| Synchronizes all peers within context to the same point in the programm execution (barrier). | |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::allGather | ( | Context | context, |
| const T_Send & | sendData, | ||
| T_Recv & | recvData | ||
| ) |
Collects sendData from all members of the context and transmits it as a list to every peer in the context
| [in] | context | Set of peers that want to send Data |
| [in] | sendData | Data that every peer in the context sends with same size |
| [out] | recvData | Data from all context members, that all peers* will receive. |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::allGatherVar | ( | const Context | context, |
| const T_Send & | sendData, | ||
| T_Recv & | recvData, | ||
| std::vector< unsigned > & | recvCount | ||
| ) |
Collects sendData from all peers of the context. Size of sendData can vary in size. The data is received by every peer in the context.
| [in] | context | Set of peers that want to send Data |
| [in] | sendData | Data that every peer in the context sends with varying size |
| [out] | recvData | Data from all context members, that all peers* will receive. |
| [out] | recvCount | Number of elements each peer sends (can by varying). |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::allReduce | ( | const Context | context, |
| T_Op | op, | ||
| const T_Send & | sendData, | ||
| T_Recv & | recvData | ||
| ) |
Performs a reduction with a binary operator op on all sendData elements from all peers whithin the context. The result will be received by all peers.
| [in] | context | Set of peers that |
| [in] | op | Binary operator that should be used for reduction |
| [in] | sendData | Data that every peer contributes to the reduction |
| [out] | recvData | Reduced sendData that will be received by all peers. It will have same size of sendData and contains the ith reduced sendData values. |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::allScatter | ( | const Context | context, |
| const T_Send & | sendData, | ||
| T_Recv & | recvData | ||
| ) |
Distributes sendData of all peer in the context to all peers in the context. Every peer will receive data from every other peer (also the own data)
| [in] | context | Set of peers that want to receive Data |
| [in] | sendData | Data that each peer wants to send. Each peer will receive same number of data elements, but not the same data elements. sendData will be divided in equal chunks of data and is then distributed. |
| [out] | recvData | Data from all peer. |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::broadcast | ( | const VAddr | rootVAddr, |
| const Context | context, | ||
| T_SendRecv & | data | ||
| ) |
Send sendData from peer rootVAddr to all peers in context. Every peer will receive the same data.
| [in] | rootVAddr | Source peer |
| [in] | context | Set of peers that want to receive Data |
| [in] | sendData | Data that peer with rootVAddr will send to the peers of the context |
| [out] | recvData | Data from peer with rootVAddr. |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::gather | ( | const VAddr | rootVAddr, |
| const Context | context, | ||
| const T_Send & | sendData, | ||
| T_Recv & | recvData | ||
| ) |
Collects sendData from all peers of the context and transmits it as a list to the peer with rootVAddr. Data of all peers has to be from the same size.
| [in] | rootVAddr | Peer that will receive collcted data from context members |
| [in] | context | Set of peers that want to send Data |
| [in] | sendData | Data that every peer in the context sends. Data of all peers in the context need to have same size(). |
| [out] | recvData | Data from all context members, that peer with virtual address rootVAddr will receive. recvData of all other members of the context will be empty. |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::gatherVar | ( | const VAddr | rootVAddr, |
| const Context | context, | ||
| const T_Send & | sendData, | ||
| T_Recv & | recvData, | ||
| std::vector< unsigned > & | recvCount | ||
| ) |
Collects sendData from all members of the context with varying size and transmits it as a list to peer with rootVAddr.
| [in] | rootVAddr | Peer that will receive collcted data from context members |
| [in] | context | Set of peers that want to send Data |
| [in] | sendData | Data that every peer in the context sends. The Data can have varying size |
| [out] | recvData | Data from all context peers, that peer with rootVAddr will receive. recvData of all other peers of the context will be empty. The received data is ordered by the VAddr of the peers. |
| [out] | recvCount | Number of elements each peer sends (can by varying). |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::reduce | ( | const VAddr | rootVAddr, |
| const Context | context, | ||
| const T_Op | op, | ||
| const T_Send & | sendData, | ||
| T_Recv & | recvData | ||
| ) |
Performs a reduction with a binary operator op on all sendData elements from all peers whithin the context. The result will be received by the peer with rootVAddr. Binary operations like std::plus, std::minus can be used. But, they can also be defined as binary operator simular to std::plus etc.
| [in] | rootVAddr | peer that will receive the result of reduction |
| [in] | context | Set of peers that |
| [in] | op | Binary operator that should be used for reduction |
| [in] | sendData | Data that every peer contributes to the reduction |
| [out] | recvData | Reduced sendData that will be received by peer with rootVAddr. It will have same size of sendData and contains the ith reduced sendData values. |
| void graybat::communicationPolicy::Base< T_CommunicationPolicy >::scatter | ( | const VAddr | rootVAddr, |
| const Context | context, | ||
| const T_Send & | sendData, | ||
| T_Recv & | recvData | ||
| ) |
Distributes sendData from peer rootVAddr to all peers in context. Every peer will receive different data.
| [in] | rootVAddr | peer that want to distribute its data |
| [in] | context | Set of peers that want to receive Data |
| [in] | sendData | Data that peer with rootVAddr will distribute over the peers of the context |
| [out] | recvData | Data from peer with rootVAddr. |