29#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
32# include <sys/syscall.h>
33# include <sys/types.h>
54 return std::this_thread::get_id();
62 return std::thread::hardware_concurrency();
84#if defined(__linux__) || defined(_AIX)
85 cpu_set_t* aset =
new cpu_set_t;
88 pthread_t& _aT =
static_cast<pthread_t&
>(aT);
89 return (pthread_setaffinity_np(_aT,
sizeof(cpu_set_t), aset) == 0);
unsigned GetNumberOfCores()
void SetThreadId(int aNewValue)
bool SetPinAffinity(int idx, NativeThread &at)
std::thread::native_handle_type NativeThread
void ConsumeParameters(Args...)
thread_local int ThreadID