class ThreadCoreMask

Contains one or multiple logical CPU cores that a thread can run on.

Public

Constructors

ThreadCoreMask

ThreadCoreMask() = default

ThreadCoreMask

ThreadCoreMask(const ThreadCoreMask &other) noexcept(false) = default

ThreadCoreMask

ThreadCoreMask(ThreadCoreMask &&other)

ThreadCoreMask

ThreadCoreMask(std::initializer_list<CPUCore> initializerList)

ThreadCoreMask

ThreadCoreMask(const TInlineArray<CPUCore, 32> &cores)

Methods

GetCoreCount

size_t GetCoreCount() const

Returns the number of enabled cores.

Add

ThreadCoreMask &Add(const ThreadCoreMask &)

Adds cores from the provided mask to the current mask, and returns current mask.

Remove

ThreadCoreMask &Remove(const ThreadCoreMask &)

Removes cores from the provided mask from the current mask, and returns current mask.

staticCreateAnyThreadMask

static ThreadCoreMask CreateAnyThreadMask()

Creates a mask that allows the thread to run on any available CPU core.

Operators

operator=

ThreadCoreMask &operator=(ThreadCoreMask &&other)

operator[]

CPUCore operator[](size_t index) const

Retrieves a core from the affinity.

Private

Fields

mCores

TInlineArray<CPUCore, 32> mCores