GRPC C++  1.30.0
Functions
cpu.h File Reference
#include <grpc/support/port_platform.h>

Go to the source code of this file.

Functions

GPRAPI unsigned gpr_cpu_num_cores (void)
 Interface providing CPU information for currently running system. More...
 
GPRAPI unsigned gpr_cpu_current_cpu (void)
 Return the CPU on which the current thread is executing; N.B. More...
 

Function Documentation

◆ gpr_cpu_current_cpu()

GPRAPI unsigned gpr_cpu_current_cpu ( void  )

Return the CPU on which the current thread is executing; N.B.

This should be considered advisory only - it is possible that the thread is switched to a different CPU at any time. Returns a value in range [0, gpr_cpu_num_cores() - 1]

◆ gpr_cpu_num_cores()

GPRAPI unsigned gpr_cpu_num_cores ( void  )

Interface providing CPU information for currently running system.

Return the number of CPU cores on the current system. Will return 0 if the information is not available.