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