libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
isimud::exchanges::common::thread_traits Struct Reference

From the detected NUMA layout, assign cores to the logical threads in the FIX-to-exchange translator. More...

#include <thread_traits.hpp>

Classes

struct  thread_info
 

Public Types

using api_threading_traits = jmmcg::ppd::api_threading_traits< jmmcg::ppd::generic_traits::api_type::posix_pthreads, jmmcg::ppd::heavyweight_threading >
 
using api_threading_traits = jmmcg::ppd::api_threading_traits< jmmcg::ppd::generic_traits::api_type::posix_pthreads, jmmcg::ppd::heavyweight_threading >
 

Static Public Attributes

static constexpr auto exchange_simulator_thread
 
static constexpr auto numa_index =static_cast<unsigned short>(jmmcg::ppd::numa_cpu_traits::is_numa)
 The numa-node upon which the code is compiled to run optimally. More...
 
static constexpr auto max_threads_on_node =jmmcg::ppd::numa_cpu_traits::node_mapping[numa_index].max_size()
 
static constexpr auto main_thread
 
static constexpr auto heartbeat_thread
 
static constexpr auto exchange_to_client_thread
 
static constexpr auto client_to_exchange_thread
 

Detailed Description

From the detected NUMA layout, assign cores to the logical threads in the FIX-to-exchange translator.

Definition at line 34 of file socket_server.cpp.

Member Typedef Documentation

◆ api_threading_traits [1/2]

◆ api_threading_traits [2/2]

Member Data Documentation

◆ client_to_exchange_thread

constexpr auto isimud::exchanges::common::thread_traits::client_to_exchange_thread
inlinestaticconstexpr
Initial value:
=thread_info{
api_threading_traits::api_params_type::priority_type::time_critical
}

Definition at line 131 of file thread_traits.hpp.

◆ exchange_simulator_thread

static constexpr auto isimud::exchanges::common::thread_traits::exchange_simulator_thread
inlinestaticconstexpr
Initial value:
=thread_info{
0,
api_threading_traits::api_params_type::priority_type::normal
}

Definition at line 41 of file socket_server.cpp.

◆ exchange_to_client_thread

constexpr auto isimud::exchanges::common::thread_traits::exchange_to_client_thread
inlinestaticconstexpr
Initial value:
=thread_info{
api_threading_traits::api_params_type::priority_type::normal
}

Definition at line 127 of file thread_traits.hpp.

◆ heartbeat_thread

constexpr auto isimud::exchanges::common::thread_traits::heartbeat_thread
inlinestaticconstexpr
Initial value:
=thread_info{
api_threading_traits::api_params_type::priority_type::idle
}

Definition at line 123 of file thread_traits.hpp.

◆ main_thread

constexpr auto isimud::exchanges::common::thread_traits::main_thread
inlinestaticconstexpr
Initial value:
=thread_info{
api_threading_traits::api_params_type::priority_type::idle
}

Put this well out of the way of anything important.

Definition at line 119 of file thread_traits.hpp.

◆ max_threads_on_node

constexpr auto isimud::exchanges::common::thread_traits::max_threads_on_node =jmmcg::ppd::numa_cpu_traits::node_mapping[numa_index].max_size()
inlinestaticconstexpr

Definition at line 114 of file thread_traits.hpp.

◆ numa_index

constexpr auto isimud::exchanges::common::thread_traits::numa_index =static_cast<unsigned short>(jmmcg::ppd::numa_cpu_traits::is_numa)
inlinestaticconstexpr

The numa-node upon which the code is compiled to run optimally.

This value should be the same as that used by numactl in the start-script (e.g. "start_all_links.sh"), otherwise the code will run on the wrong processor. (One can determine which node the code has been compiled for by running the executable with the "--help" option.)

See also
NUMA_INDEX

Definition at line 113 of file thread_traits.hpp.


The documentation for this struct was generated from the following files:
jmmcg::ppd::numa_cpu_traits::node_mapping
static constexpr element_type node_mapping
This provides a mapping of all sequentially-listed NUMA-nodes to the cores they contain and the mappi...
Definition: numa_traits.hpp:44
isimud::exchanges::common::thread_traits::numa_index
static constexpr auto numa_index
The numa-node upon which the code is compiled to run optimally.
Definition: thread_traits.hpp:113
isimud::exchanges::common::thread_traits::max_threads_on_node
static constexpr auto max_threads_on_node
Definition: thread_traits.hpp:114