source: libcfa/src/device/cpu.hfa @ 12c1eef

ADTast-experimentalenumpthread-emulationqualifiedEnum
Last change on this file since 12c1eef was 07a1e7a, checked in by Thierry Delisle <tdelisle@…>, 3 years ago

Added cpu info for which cache the map referes to.

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[96f002c1]1//
2// Cforall Version 1.0.0 Copyright (C) 2021 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// cpu.hfa -- read the data structure
8//
9// Author           : Thierry Delisle
10// Created On       : Fri Jun 11 15:22:23 2021
11// Last Modified By :
12// Last Modified On :
13// Update Count     :
14//
15
16#include <stddef.h>
17
[07a1e7a]18// Map from cpu entry to a structure detailling cpus with common topologies
19// Note that the cpu-groups are contiguous so the indexing is different from
20// the cpu indexing
[96f002c1]21struct cpu_map_entry_t {
[07a1e7a]22        // Where this particular cpu is in the group
[cf85f96]23        unsigned self;
[07a1e7a]24
25        // Starting index of the cpus with the same topology
[96f002c1]26        unsigned start;
[07a1e7a]27
28        // Number of cpus with the same topology
[96f002c1]29        unsigned count;
[07a1e7a]30
31        // Index of the cache this entry describes
32        unsigned cache;
[96f002c1]33};
34
35struct cpu_info_t {
[8157bde]36        // Array of size [hthrd_count]
[96f002c1]37        const cpu_map_entry_t * llc_map;
[4d865ca7]38
[8157bde]39        // Number of _hardware_ threads present in the system
[96f002c1]40        size_t hthrd_count;
[8157bde]41
42        // Number of distinct last level caches
43        size_t llc_count;
[96f002c1]44};
45
[72bd9cd]46extern cpu_info_t cpu_info;
Note: See TracBrowser for help on using the repository browser.