DiSMEC++
anonymous_namespace{numa.cpp} Namespace Reference

Classes

class  NodeData
 

Functions

int numa_node_count ()
 
int current_numa_node ()
 
int lookup_numa_node (const void *ptr)
 
template<class F >
void handle_cpu_set (std::fstream &source, F &&action)
 
template<class F >
void for_each_sibling (cpu_id_t core, F &&action)
 
template<class F >
void for_each_shared_cache_sibling (cpu_id_t core, F &&action)
 
bool set_thread_affinity (cpu_id_t cpu)
 
std::vector< NodeDataget_available_nodes ()
 Returns the list of available NUMA nodes. More...
 

Function Documentation

◆ current_numa_node()

int anonymous_namespace{numa.cpp}::current_numa_node ( )

◆ for_each_shared_cache_sibling()

template<class F >
void anonymous_namespace{numa.cpp}::for_each_shared_cache_sibling ( cpu_id_t  core,
F &&  action 
)

◆ for_each_sibling()

template<class F >
void anonymous_namespace{numa.cpp}::for_each_sibling ( cpu_id_t  core,
F &&  action 
)

◆ get_available_nodes()

std::vector<NodeData> anonymous_namespace{numa.cpp}::get_available_nodes ( )

Returns the list of available NUMA nodes.

If no NUMA information is available, we put all cores into a NUMA 0 node. If CPUs are available for which the corresponding memory node is not available (this happens on my desktop), we assign these CPUs to NUMA node 0.

Definition at line 206 of file numa.cpp.

Referenced by dismec::parallel::ThreadDistributor::ThreadDistributor().

◆ handle_cpu_set()

template<class F >
void anonymous_namespace{numa.cpp}::handle_cpu_set ( std::fstream &  source,
F &&  action 
)

Definition at line 40 of file numa.cpp.

Referenced by for_each_shared_cache_sibling(), and for_each_sibling().

◆ lookup_numa_node()

int anonymous_namespace{numa.cpp}::lookup_numa_node ( const void *  ptr)

Definition at line 33 of file numa.cpp.

Referenced by dismec::parallel::pin_to_data().

◆ numa_node_count()

int anonymous_namespace{numa.cpp}::numa_node_count ( )

Definition at line 23 of file numa.cpp.

Referenced by dismec::parallel::NUMAReplicatorBase::make_copies().

◆ set_thread_affinity()

bool anonymous_namespace{numa.cpp}::set_thread_affinity ( cpu_id_t  cpu)