FMI 1.0
FaaS Message Interface
|
Channel that uses the TCPunch TCP NAT Hole Punching Library for connection establishment. More...
#include <Direct.h>
Public Member Functions | |
Direct (std::map< std::string, std::string > params, std::map< std::string, std::string > model_params) | |
void | send_object (channel_data buf, Utils::peer_num rcpt_id) override |
Send an object to peer with ID peer_id. Needs to be implemented by the channels. More... | |
void | recv_object (channel_data buf, Utils::peer_num sender_id) override |
Receive an object from peer with ID peer_id. Needs to be implemented by the channels. More... | |
double | get_latency (Utils::peer_num producer, Utils::peer_num consumer, std::size_t size_in_bytes) override |
Performance model of an individual channel, provides latency for a simple exchange with a number of producers / consumers. More... | |
double | get_price (Utils::peer_num producer, Utils::peer_num consumer, std::size_t size_in_bytes) override |
Cost model of an individual channel, provides price for a simple exchange with a number of producers / consumers. More... | |
Public Member Functions inherited from FMI::Comm::PeerToPeer | |
void | send (channel_data buf, FMI::Utils::peer_num dest) override |
Send data to peer with id dest, must match a recv call. More... | |
void | recv (channel_data buf, FMI::Utils::peer_num src) override |
Receive data from peer with id src, must match a send call. More... | |
void | bcast (channel_data buf, FMI::Utils::peer_num root) override |
Binomial tree broadcast implementation. More... | |
void | barrier () override |
Calls allreduce with a (associative and commutative) NOP operation. More... | |
void | gather (channel_data sendbuf, channel_data recvbuf, FMI::Utils::peer_num root) override |
Binomial tree gather. More... | |
void | scatter (channel_data sendbuf, channel_data recvbuf, FMI::Utils::peer_num root) override |
Binomial tree scatter. More... | |
void | reduce (channel_data sendbuf, channel_data recvbuf, FMI::Utils::peer_num root, raw_function f) override |
Calls reduce_no_order for associative and commutative functions, reduce_ltr otherwise. More... | |
void | allreduce (channel_data sendbuf, channel_data recvbuf, raw_function f) override |
For associative and commutative functions, allreduce_no_order is called. Otherwise, reduce followed by bcast is used. More... | |
void | scan (channel_data sendbuf, channel_data recvbuf, raw_function f) override |
For associative and commutative functions, scan_no_order is called. Otherwise, scan_ltr is called. More... | |
double | get_operation_latency (Utils::OperationInfo op_info) override |
Performance model for collective operations, provides the latency for the given operation. More... | |
double | get_operation_price (Utils::OperationInfo op_info) override |
Cost model for collective operations, provides the price for the given operation. More... | |
Public Member Functions inherited from FMI::Comm::Channel | |
void | set_peer_id (FMI::Utils::peer_num num) |
Helper utility to set peer id, ID needs to be set before first collective operation. More... | |
void | set_num_peers (FMI::Utils::peer_num num) |
Helper utility to set number of peers, needs to be set before first collective operation. More... | |
void | set_comm_name (std::string communication_name) |
Helper utility to set the communicator name, should be set before first collective operation to avoid conflicts with empty communicator name. More... | |
virtual void | finalize () |
Called before communicator is destructed, can be used by channels to clean up (e.g., delete resources) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from FMI::Comm::Channel | |
static std::shared_ptr< Channel > | get_channel (std::string name, std::map< std::string, std::string > params, std::map< std::string, std::string > model_params) |
Create a new channel with the given config and model params. More... | |
Protected Member Functions inherited from FMI::Comm::PeerToPeer | |
void | reduce_ltr (channel_data sendbuf, channel_data recvbuf, FMI::Utils::peer_num root, const raw_function &f) |
Reduction with left-to-right evaluation, gather followed by a function evaluation on the root peer. More... | |
void | reduce_no_order (channel_data sendbuf, channel_data recvbuf, FMI::Utils::peer_num root, const raw_function &f) |
Binomial tree reduction where all peers apply the function in every step. More... | |
void | allreduce_no_order (channel_data sendbuf, channel_data recvbuf, const raw_function &f) |
Recursive doubling allreduce implementation. When num_peers is not a power of two, there is an additional message in the beginning and end for every peer where they send their value / receive the reduced value. More... | |
void | scan_ltr (channel_data sendbuf, channel_data recvbuf, const raw_function &f) |
Linear function application / sending. More... | |
void | scan_no_order (channel_data sendbuf, channel_data recvbuf, const raw_function &f) |
Binomial tree with up- and down-phase. More... | |
Protected Attributes inherited from FMI::Comm::Channel | |
FMI::Utils::peer_num | peer_id |
FMI::Utils::peer_num | num_peers |
std::string | comm_name |
Can optionally be used by channels to avoid resource conflicts that may occur because of multiple concurrent communicators. More... | |
Channel that uses the TCPunch TCP NAT Hole Punching Library for connection establishment.
|
explicit |
|
overridevirtual |
Performance model of an individual channel, provides latency for a simple exchange with a number of producers / consumers.
Implements FMI::Comm::Channel.
|
overridevirtual |
Cost model of an individual channel, provides price for a simple exchange with a number of producers / consumers.
Implements FMI::Comm::Channel.
|
overridevirtual |
Receive an object from peer with ID peer_id. Needs to be implemented by the channels.
Implements FMI::Comm::PeerToPeer.
|
overridevirtual |
Send an object to peer with ID peer_id. Needs to be implemented by the channels.
Implements FMI::Comm::PeerToPeer.