Functions
include/grpc/support/cpu.h File Reference
#include <grpc/support/port_platform.h>
Include dependency graph for include/grpc/support/cpu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GPRAPI unsigned gpr_cpu_current_cpu (void)
 
GPRAPI unsigned gpr_cpu_num_cores (void)
 

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.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:08