PPU LLVM: multithread compilation

This commit is contained in:
Nekotekina 2017-06-24 18:36:49 +03:00
parent ef21e2253f
commit 6561ddae41
9 changed files with 285 additions and 190 deletions

View file

@ -182,34 +182,3 @@ std::string cpu_thread::dump() const
{
return fmt::format("Type: %s\n" "State: %s\n", typeid(*this).name(), state.load());
}
void cpu_thread::set_native_priority(int priority)
{
#ifdef _WIN32
HANDLE _this_thread = GetCurrentThread();
INT native_priority = THREAD_PRIORITY_NORMAL;
switch (priority)
{
default:
case 0:
break;
case 1:
native_priority = THREAD_PRIORITY_ABOVE_NORMAL;
break;
case -1:
native_priority = THREAD_PRIORITY_BELOW_NORMAL;
break;
}
SetThreadPriority(_this_thread, native_priority);
#endif // _WIN32
}
void cpu_thread::set_ideal_processor_core(int core)
{
#ifdef _WIN32
HANDLE _this_thread = GetCurrentThread();
SetThreadIdealProcessor(_this_thread, core);
#endif
}