carb::thread::getCurrentProcessor¶
Defined in carb/thread/Util.h
-
inline CpuMaskVector
carb::thread
::
getCurrentProcessor
()¶ Returns the processor the calling thread is running on.
This function returns a CpuMaskVector rather than a single value to handle system that have more than 64 cores. On Windows, the current processor is relative to the Processor Group the CPU is in. Returning an CpuMaskVector allows this function to represent that by setting the bit in the CpuMaskVector entry corresponding to the processor group. For instance, if the current processor was the first processor in processor group 1, the return value would be:
CpuMaskVector[0] = 0x0 CpuMaskVector[1] = 0x1
- Returns
An CpuMaskVector with a bit set representing the current processor