Last change
on this file since ba0e1bc was
8f01ad71,
checked in by Thierry Delisle <tdelisle@…>, 3 years ago
|
Forgot a few pragma once
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
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 | #pragma once |
---|
17 | |
---|
18 | #include <stddef.h> |
---|
19 | |
---|
20 | // Map from cpu entry to a structure detailling cpus with common topologies |
---|
21 | // Note that the cpu-groups are contiguous so the indexing is different from |
---|
22 | // the cpu indexing |
---|
23 | struct cpu_map_entry_t { |
---|
24 | // Where this particular cpu is in the group |
---|
25 | unsigned self; |
---|
26 | |
---|
27 | // Starting index of the cpus with the same topology |
---|
28 | unsigned start; |
---|
29 | |
---|
30 | // Number of cpus with the same topology |
---|
31 | unsigned count; |
---|
32 | |
---|
33 | // Index of the cache this entry describes |
---|
34 | unsigned cache; |
---|
35 | }; |
---|
36 | |
---|
37 | struct cpu_info_t { |
---|
38 | // Array of size [hthrd_count] |
---|
39 | const cpu_map_entry_t * llc_map; |
---|
40 | |
---|
41 | // Number of _hardware_ threads present in the system |
---|
42 | size_t hthrd_count; |
---|
43 | |
---|
44 | // Number of distinct last level caches |
---|
45 | size_t llc_count; |
---|
46 | }; |
---|
47 | |
---|
48 | extern cpu_info_t cpu_info; |
---|
Note: See
TracBrowser
for help on using the repository browser.