class
OneOfThreadAffinityPolicy
Inherits:
ThreadAffinityPolicy
Policy that returns an affinity that pins a thread to a single core.
The cores are given out depending on the provided thread index, from the policy's affinity mask.
Public
Constructors
OneOfThreadAffinityPolicy
OneOfThreadAffinityPolicy(const ThreadCoreMask &availableCores)
Creates the policy with a list of cores that will be given out to the requesting threads in round-robin fashion.
Methods
GetMaskForThread
Returns a mask that lets the caller know on which cores can the thread be executed on.
- threadIndex
- Index of the thread for which to determine affinity. It's best these are sequential so cores can be distributed in a round-robin fashion, for policies where that matters.
Returns: Returns mask that determines on which cores should the thread run on.
Private
Fields
mAvailableCores
ThreadCoreMask mAvailableCores