Skip to content

Commit e5672d3

Browse files
committed
Fixes
1 parent fa125a1 commit e5672d3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

common/common.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,11 @@ uint64_t generate_Mask(int32_t direction, int32_t req_threads, int32_t lltravers
176176
}
177177
return bMask.to_ullong();
178178
}
179-
180179
#else
181180
if (cpuMask != 0) {
182181
std::bitset<64> reqMask = cpuMask;
183182
CPUSET_PRINT_DEBUG("Custom cpuMask: %s\n", reqMask.to_string().c_str());
184-
bMask = cpuMask;
185-
return bMask.to_ullong();
183+
return reqMask.to_ullong();
186184
}
187185
#endif
188186

common/common.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ bool cpuset_sorter_worst(CPU_SET_INFORMATION const& lhs, CPU_SET_INFORMATION con
6060

6161
int get_math_cpu_count(int32_t req_threads, int32_t cpuset_order, int32_t lltraversal, int32_t allowtc, int32_t allowcz, int64_t cpuMask);
6262
#endif
63+
#if defined(__x86_64__) && defined(__linux__)
64+
#include <bitset>
65+
int32_t setCpuAffinity(std::bitset<64> cpuMask);
66+
uint64_t generate_Mask(int32_t direction, int32_t req_threads, int32_t lltraversal, int32_t allowtc, int32_t allowcz, int64_t cpuMask);
67+
uint64_t set_procMask(int32_t direction, int32_t req_threads, int32_t lltraversal, int32_t allowtc, int32_t allowcz, int64_t cpuMask);
68+
#endif
69+
6370
static const int32_t BEST_CORES = 0;
6471
static const int32_t WORST_CORES = 1;
6572

0 commit comments

Comments
 (0)