Intel(R) Threading Building Blocks Doxygen Documentation version 4.2.3
info.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2019-2020 Intel Corporation
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef __TBB_info_H
18#define __TBB_info_H
19
20#include "tbb_config.h"
21
22#if __TBB_NUMA_SUPPORT
23
24#include <vector>
25
26namespace tbb {
27 namespace internal {
28 namespace numa_topology {
29 unsigned nodes_count();
30 void fill(int* indexes_array);
31 int default_concurrency(int node_id);
32 } //namespace numa_topology
33 } // namespace internal
34
35 typedef int numa_node_id;
36
37 namespace info {
38 inline std::vector<numa_node_id> numa_nodes() {
39 std::vector<numa_node_id> nodes_indexes(tbb::internal::numa_topology::nodes_count());
40 internal::numa_topology::fill(&nodes_indexes.front());
41 return nodes_indexes;
42 }
43
44 inline int default_concurrency(numa_node_id id = -1) {
45 return internal::numa_topology::default_concurrency(id);
46 }
47 } // namespace info
48} // namespace tbb
49
50#endif /*__TBB_NUMA_SUPPORT*/
51
52#endif /*__TBB_info_H*/
The graph class.

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.