// // Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // cpu.hfa -- read the data structure // // Author : Thierry Delisle // Created On : Fri Jun 11 15:22:23 2021 // Last Modified By : // Last Modified On : // Update Count : // #pragma once #include // Map from cpu entry to a structure detailling cpus with common topologies // Note that the cpu-groups are contiguous so the indexing is different from // the cpu indexing struct cpu_map_entry_t { // Where this particular cpu is in the group unsigned self; // Starting index of the cpus with the same topology unsigned start; // Number of cpus with the same topology unsigned count; // Index of the cache this entry describes unsigned cache; }; struct cpu_info_t { // Array of size [hthrd_count] const cpu_map_entry_t * llc_map; // Number of _hardware_ threads present in the system size_t hthrd_count; // Number of distinct last level caches size_t llc_count; }; extern cpu_info_t cpu_info;