carb::this_thread::getAffinity

Defined in carb/thread/Util.h

inline thread::CpuMaskVector carb::this_thread::getAffinity()

Gets the current CPU Affinity for the current thread.

On Windows each entry in the CpuMaskVector represents a Processor Group. On Linux, the CpuMaskVector is analogous to a cpu_set_t.

Returns

A CpuMaskVector containing the cpu affinities for the thread. If the underlying functions to get thread affinity return an error, the returned CpuMaskVector will be empty and errno or last-error will be set.