carb::this_thread::setAffinity

Defined in carb/thread/Util.h

inline void carb::this_thread::setAffinity(size_t mask)

Sets the affinity of the current thread.

Each bit represents a logical CPU; bit 0 for CPU 0, bit 1 for CPU 1, etc.

Note

This function is limited to the first 64 CPUs in a system.

Parameters

mask – The bitmask representing the desired CPU affinity. Zero (no bits set) is ignored.