Fix missing declarations for TBB_HYBRID_CPUS (#9567)

This commit is contained in:
Vladislav Volkov 2022-01-11 16:06:37 +03:00 committed by GitHub
parent ebcd9eaf07
commit 6ddc1e981b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,7 @@ namespace custom {
namespace detail {
# if USE_TBBBIND_2_5
extern "C" {
void __TBB_internal_initialize_system_topology(std::size_t groups_num,
int& numa_nodes_count,
@ -55,7 +56,20 @@ static bool is_binding_environment_valid() {
# endif /* _WIN32 && !_WIN64 */
}
# elif TBB_NUMA_SUPPORT_PRESENT || TBB_HYBRID_CPUS_SUPPORT_PRESENT
static tbb::task_arena::constraints convert_constraints(const custom::task_arena::constraints& c) {
tbb::task_arena::constraints result{};
# if TBB_HYBRID_CPUS_SUPPORT_PRESENT
result.core_type = c.core_type;
result.max_threads_per_core = c.max_threads_per_core;
# endif
result.numa_id = c.numa_id;
result.max_concurrency = c.max_concurrency;
return result;
}
# endif // USE_TBBBIND_2_5
class TBBbindSystemTopology {
TBBbindSystemTopology() {
@ -192,18 +206,7 @@ static binding_oberver_ptr construct_binding_observer(tbb::task_arena& ta, int n
return observer;
}
# elif TBB_NUMA_SUPPORT_PRESENT
static tbb::task_arena::constraints convert_constraints(const custom::task_arena::constraints& c) {
tbb::task_arena::constraints result{};
# if TBB_HYBRID_CPUS_SUPPORT_PRESENT
result.core_type = c.core_type;
result.max_threads_per_core = c.max_threads_per_core;
# endif
result.numa_id = c.numa_id;
result.max_concurrency = c.max_concurrency;
return result;
}
# endif
# endif // USE_TBBBIND_2_5
} // namespace detail
task_arena::task_arena(int max_concurrency_, unsigned reserved_for_masters)