1 #pragma once 2 3 #include <stdint.h> 4 5 #define CPUINFO_MACH_MAX_CACHE_LEVELS 8 6 7 struct cpuinfo_mach_topology { 8 uint32_t packages; 9 uint32_t cores; 10 uint32_t threads; 11 uint32_t threads_per_cache[CPUINFO_MACH_MAX_CACHE_LEVELS]; 12 }; 13 14 struct cpuinfo_mach_topology cpuinfo_mach_detect_topology(void); 15