LCI v2.0.0-dev
For Asynchronous Multithreaded Communication
Loading...
Searching...
No Matches
lci.hpp File Reference
#include <memory>
#include <stdexcept>
#include <vector>
#include <string>
#include <cstring>
#include <functional>
#include "lci_config.hpp"
#include "lci_binding_pre.hpp"
#include "lci_binding_post.hpp"
Include dependency graph for lci.hpp:

Go to the source code of this file.

Classes

struct  lci::option_t< T >
 
struct  lci::error_t
 Wrapper class for error code. More...
 
struct  lci::net_status_t
 The struct for network status. More...
 
struct  lci::rmr_t
 The type of remote memory region. More...
 
struct  lci::buffer_t
 The type of a local buffer descriptor. More...
 
struct  lci::rbuffer_t
 The type of a remote buffer descriptor. More...
 
struct  lci::allocator_base_t
 The user-defined allocator type. More...
 
struct  lci::data_t
 A generic type for describing or holding data. More...
 
struct  lci::status_t
 The type of the completion desciptor for a posted communication. More...
 
class  lci::comp_impl_t
 Completion object implementation base type. More...
 

Namespaces

namespace  lci
 All LCI API functions and classes are defined in this namespace.
 

Typedefs

using lci::net_imm_data_t = uint32_t
 The type of network-layer immediate data field.
 
using lci::tag_t = uint64_t
 The type of tag.
 
using lci::rcomp_t = uint32_t
 The type of remote completion handler.
 
using lci::matching_entry_key_t = uint64_t
 The type of matching engine entry key.
 
using lci::matching_entry_val_t = void*
 The type of matching engine entry value.
 
using lci::buffers_t = std::vector<buffer_t>
 
using lci::rbuffers_t = std::vector<rbuffer_t>
 
using lci::comp_handler_t = void (*)(status_t status)
 Function Signature for completion handler.
 
using lci::reduce_op_t
 The user-defined reduction operation.
 
using lci::graph_node_t = void*
 The node type for the completion graph.
 
using lci::graph_node_run_cb_t = status_t (*)(void* value)
 The function signature for a node function in the completion graph.
 
using lci::graph_node_free_cb_t = void (*)(void* value)
 The function signature for a callback that will be triggered when the node was freed.
 
using lci::graph_edge_run_cb_t
 The function signature for a edge funciton in the completion graph.
 

Enumerations

enum class  lci::attr_backend_t { lci::none , lci::ibv , lci::ofi , lci::ucx }
 
enum  lci::attr_net_lock_mode_t { lci::LCI_NET_TRYLOCK_SEND = 1 , lci::LCI_NET_TRYLOCK_RECV = 1 << 1 , lci::LCI_NET_TRYLOCK_POLL = 1 << 2 , lci::LCI_NET_TRYLOCK_MAX = 1 << 3 }
 
enum class  lci::errorcode_t {
  lci::errorcode_t::done_min , lci::errorcode_t::done , lci::errorcode_t::done_backlog , lci::errorcode_t::done_max ,
  lci::errorcode_t::posted_min , lci::errorcode_t::posted , lci::errorcode_t::posted_backlog , lci::errorcode_t::posted_max ,
  lci::errorcode_t::retry_min , lci::errorcode_t::retry , lci::errorcode_t::retry_init , lci::errorcode_t::retry_lock ,
  lci::errorcode_t::retry_nopacket , lci::errorcode_t::retry_nomem , lci::errorcode_t::retry_backlog , lci::errorcode_t::retry_max ,
  lci::errorcode_t::fatal
}
 The actual error code for LCI API functions. More...
 
enum class  lci::net_opcode_t {
  lci::net_opcode_t::SEND , lci::net_opcode_t::RECV , lci::net_opcode_t::WRITE , lci::net_opcode_t::REMOTE_WRITE ,
  lci::net_opcode_t::READ
}
 The Type of network communication operation codes. More...
 
enum class  lci::broadcast_algorithm_t { lci::broadcast_algorithm_t::none , lci::broadcast_algorithm_t::direct , lci::broadcast_algorithm_t::tree , lci::broadcast_algorithm_t::ring }
 The type of broadcast algorithm. More...
 
enum class  lci::reduce_scatter_algorithm_t { lci::reduce_scatter_algorithm_t::none , lci::reduce_scatter_algorithm_t::direct , lci::reduce_scatter_algorithm_t::tree , lci::reduce_scatter_algorithm_t::ring }
 The type of reduce scatter algorithm. More...
 
enum class  lci::allreduce_algorithm_t { lci::allreduce_algorithm_t::none , lci::allreduce_algorithm_t::direct , lci::allreduce_algorithm_t::tree , lci::allreduce_algorithm_t::ring }
 The type of allreduce algorithm. More...
 
enum class  lci::direction_t { lci::direction_t::OUT , lci::direction_t::IN }
 The enum class of comunication direction. More...
 
enum class  lci::matching_entry_type_t : unsigned { lci::matching_entry_type_t::send = 0 , lci::matching_entry_type_t::recv = 1 }
 The type of matching entry. More...
 
enum class  lci::matching_policy_t : unsigned {
  lci::matching_policy_t::none = 0 , lci::matching_policy_t::rank_only = 1 , lci::matching_policy_t::tag_only = 2 , lci::matching_policy_t::rank_tag = 3 ,
  lci::matching_policy_t::max = 4
}
 Enum class for matching policy. More...
 
enum class  lci::comp_semantic_t { lci::comp_semantic_t::buffer , lci::comp_semantic_t::network }
 The enum class of completion semantic. More...
 

Functions

const char * lci::get_errorcode_str (errorcode_t errorcode)
 Get the string representation of an error code.
 
const char * lci::get_net_opcode_str (net_opcode_t opcode)
 Get the string representation of a network operation code.
 
const char * lci::get_broadcast_algorithm_str (broadcast_algorithm_t algorithm)
 Get the string representation of a collective algorithm.
 
const char * lci::get_reduce_scatter_algorithm_str (broadcast_algorithm_t algorithm)
 Get the string representation of a collective algorithm.
 
const char * lci::get_allreduce_algorithm_str (broadcast_algorithm_t algorithm)
 Get the string representation of a collective algorithm.
 
template<typename T>
std::enable_if< std::is_same< typenamestd::result_of< T()>::type, status_t >::value, status_t >::type lci::graph_execute_op_fn (void *value)
 
template<typename T>
std::enable_if< std::is_same< typenamestd::result_of< T()>::type, errorcode_t >::value, status_t >::type lci::graph_execute_op_fn (void *value)
 
template<typename T>
std::enable_if<!std::is_same< typenamestd::result_of< T()>::type, status_t >::value &&!std::is_same< typenamestd::result_of< T()>::type, errorcode_t >::value, status_t >::type lci::graph_execute_op_fn (void *value)
 
template<typename T>
void lci::graph_free_op_fn (void *value)
 
template<typename T>
graph_node_t lci::graph_add_node_op (comp_t graph, const T &op)
 Add a functor as a node to the completion graph.
 
void lci::swap (data_t &first, data_t &second)
 

Variables

const mr_t lci::MR_HOST = mr_t()
 A special mr_t value for host memory.
 
const mr_t lci::MR_DEVICE = mr_t(reinterpret_cast<void*>(0x1))
 A special mr_t value for device memory.
 
const mr_t lci::MR_UNKNOWN = mr_t(reinterpret_cast<void*>(0x2))
 A special mr_t value for unknown memory. LCI will detect the memory type automatically.
 
const rmr_t lci::RMR_NULL = rmr_t()
 The NULL value of rkey_t.
 
const int lci::ANY_SOURCE = -1
 Special rank value for any-source receive.
 
const tag_t lci::ANY_TAG = static_cast<tag_t>(-1)
 Special tag value for any-tag receive.
 
const comp_t lci::COMP_NULL = comp_t(reinterpret_cast<comp_impl_t*>(0x0))
 Special completion object setting allow_posted to false.
 
const comp_t lci::COMP_NULL_EXPECT_DONE
 Deprecated. Same as COMP_NULL.
 
const comp_t lci::COMP_NULL_RETRY = comp_t(reinterpret_cast<comp_impl_t*>(0x1))
 Special completion object setting allow_posted and allow_retry to false.
 
const comp_t lci::COMP_NULL_EXPECT_DONE_OR_RETRY
 Deprecated. Same as COMP_NULL_RETRY.
 
const graph_node_t lci::GRAPH_START = reinterpret_cast<graph_node_t>(0x1)
 The start node of the completion graph.
 
const graph_node_t lci::GRAPH_END = reinterpret_cast<graph_node_t>(0x2)
 
const graph_node_run_cb_t lci::GRAPH_NODE_DUMMY_CB = nullptr
 A dummy callback function for a graph node.