benchmark: affinity cast for mingw (#96)

This commit is contained in:
Jethro Grassie 2019-07-03 12:13:38 -04:00 committed by tevador
parent 89aba80925
commit 41401797c9

View File

@ -64,7 +64,7 @@ set_thread_affinity(std::thread::native_handle_type thread,
rc = thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY,
(thread_policy_t)&policy, 1);
#elif defined(_WIN32) || defined(__CYGWIN__)
rc = SetThreadAffinityMask(thread, 1ULL << cpuid) == 0 ? -2 : 0;
rc = SetThreadAffinityMask(static_cast<HANDLE>(thread), 1ULL << cpuid) == 0 ? -2 : 0;
#else
cpu_set_t cs;
CPU_ZERO(&cs);