4#ifndef _Stroika_Foundation_Execution_CPUAffinity_h_
5#define _Stroika_Foundation_Execution_CPUAffinity_h_ 1
7#include "Stroika/Foundation/StroikaPreComp.h"
11#include "Stroika/Foundation/Common/Common.h"
12#include "Stroika/Foundation/Containers/Set.h"
90#if qStroika_Foundation_Common_Platform_Windows or qStroika_Foundation_Common_Platform_Linux
169#include "CPUAffinity.inl"
Set<T> is a container of T, where once an item is added, additionally adds () do nothing.
optional< LogicalCPUCoreSet > GetCPUAffinity()
Which logical CPU cores this process may currently run on; nullopt if not knowable.
constexpr bool kCPUAffinitySupported
Can CPU affinity be controlled on this platform at all?
void SetCPUAffinity(const LogicalCPUCoreSet &cores)
Restrict this process to the given logical CPU cores.
bool SetCPUAffinityQuietly(const LogicalCPUCoreSet &cores) noexcept
Like SetCPUAffinity (), but returns false rather than throwing.
optional< unsigned int > PinToOneLogicalCPUCoreQuietly() noexcept
Pin to a single logical CPU core chosen from those currently permitted; returns which,...