Class message_sender

Class Documentation

class comm::message_sender

A Class that can be used to poll messages and then send them off.

Public Functions

message_sender(std::shared_ptr<ral::cache::CacheMachine> output_cache, const std::map<std::string, node> &node_address_map, int num_threads, ucp_context_h context, ucp_worker_h origin, int ral_id, comm::blazing_protocol protocol, bool require_acknowledge)

Constructs a message_sender.

Parameters
  • output_cache: The cache machine from where to obtain the data to send

  • node_address_map: A map from node id to Node

  • num_threads: Number of threads the message_sender will use to send data concurrently

  • context: The ucp_context_h

  • origin: The ucp_worker_h

  • ral_id: The ral_id

  • protocol: The comm::blazing_protocol

inline std::shared_ptr<ral::cache::CacheMachine> get_output_cache()
void run_polling()

A polling function that listens on a cache for data and send it off via some protocol.

Public Static Functions

static message_sender *get_instance()
static void initialize_instance(std::shared_ptr<ral::cache::CacheMachine> output_cache, std::map<std::string, node> node_address_map, int num_threads, ucp_context_h context, ucp_worker_h origin_node, int ral_id, comm::blazing_protocol protocol, bool require_acknowledge)