This commit is contained in:
mann1x 2024-04-27 20:55:45 +02:00
parent fa125a10bb
commit e5672d33cb
2 changed files with 8 additions and 3 deletions

View file

@ -176,13 +176,11 @@ uint64_t generate_Mask(int32_t direction, int32_t req_threads, int32_t lltravers
} }
return bMask.to_ullong(); return bMask.to_ullong();
} }
#else #else
if (cpuMask != 0) { if (cpuMask != 0) {
std::bitset<64> reqMask = cpuMask; std::bitset<64> reqMask = cpuMask;
CPUSET_PRINT_DEBUG("Custom cpuMask: %s\n", reqMask.to_string().c_str()); CPUSET_PRINT_DEBUG("Custom cpuMask: %s\n", reqMask.to_string().c_str());
bMask = cpuMask; return reqMask.to_ullong();
return bMask.to_ullong();
} }
#endif #endif

View file

@ -60,6 +60,13 @@ bool cpuset_sorter_worst(CPU_SET_INFORMATION const& lhs, CPU_SET_INFORMATION con
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); 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);
#endif #endif
#if defined(__x86_64__) && defined(__linux__)
#include <bitset>
int32_t setCpuAffinity(std::bitset<64> cpuMask);
uint64_t generate_Mask(int32_t direction, int32_t req_threads, int32_t lltraversal, int32_t allowtc, int32_t allowcz, int64_t cpuMask);
uint64_t set_procMask(int32_t direction, int32_t req_threads, int32_t lltraversal, int32_t allowtc, int32_t allowcz, int64_t cpuMask);
#endif
static const int32_t BEST_CORES = 0; static const int32_t BEST_CORES = 0;
static const int32_t WORST_CORES = 1; static const int32_t WORST_CORES = 1;