File indexing completed on 2025-02-21 10:15:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef __TBB_info_H
0018 #define __TBB_info_H
0019
0020 #include "tbb_config.h"
0021
0022 #if __TBB_NUMA_SUPPORT
0023
0024 #include <vector>
0025
0026 namespace tbb {
0027 namespace internal {
0028 namespace numa_topology {
0029 unsigned nodes_count();
0030 void fill(int* indexes_array);
0031 int default_concurrency(int node_id);
0032 }
0033 }
0034
0035 typedef int numa_node_id;
0036
0037 namespace info {
0038 inline std::vector<numa_node_id> numa_nodes() {
0039 std::vector<numa_node_id> nodes_indexes(tbb::internal::numa_topology::nodes_count());
0040 internal::numa_topology::fill(&nodes_indexes.front());
0041 return nodes_indexes;
0042 }
0043
0044 inline int default_concurrency(numa_node_id id = -1) {
0045 return internal::numa_topology::default_concurrency(id);
0046 }
0047 }
0048 }
0049
0050 #endif
0051
0052 #endif