@@ -29,7 +29,7 @@ class affinity_mask_manager
2929public:
3030 // / Creates the tuned affinity mask manager with the given number of threads per core, reserves given amount of CPU
3131 // / cores for non priority tasks.
32- explicit affinity_mask_manager (unsigned nof_threads_per_core_ = 2U , unsigned nof_cores_for_non_prio_threads_ = 4U ) :
32+ explicit affinity_mask_manager (unsigned nof_threads_per_core_, unsigned nof_cores_for_non_prio_threads_) :
3333 nof_threads_per_core(nof_threads_per_core_),
3434 nof_cores_for_non_prio_threads(nof_cores_for_non_prio_threads_),
3535 cpu_bitset(compute_host_nof_hardware_threads())
@@ -44,6 +44,15 @@ class affinity_mask_manager
4444 cpu_bitset.fill (0 , nof_cores_for_non_prio_threads, true );
4545 }
4646
47+ // / Default constructor.
48+ affinity_mask_manager () :
49+ nof_threads_per_core (2U ),
50+ nof_cores_for_non_prio_threads (compute_host_nof_hardware_threads() / 2 ),
51+ cpu_bitset (compute_host_nof_hardware_threads())
52+ {
53+ cpu_bitset.fill (0 , nof_cores_for_non_prio_threads, true );
54+ }
55+
4756 // / \brief Returns an affinity mask with assigned CPU indexes.
4857 // /
4958 // / \param name Name of the task trying to reserve a CPU core.
0 commit comments