/proc/self/cwd/external/cpuinfo/src/cache.c
Line | Count | Source (jump to first uncovered line) |
1 | | #include <stddef.h> |
2 | | |
3 | | #include <cpuinfo.h> |
4 | | #include <cpuinfo/internal-api.h> |
5 | | |
6 | | |
7 | 0 | uint32_t cpuinfo_compute_max_cache_size(const struct cpuinfo_processor* processor) { |
8 | 0 | if (processor->cache.l4 != NULL) { |
9 | 0 | return processor->cache.l4->size; |
10 | 0 | } else if (processor->cache.l3 != NULL) { |
11 | 0 | return processor->cache.l3->size; |
12 | 0 | } else if (processor->cache.l2 != NULL) { |
13 | 0 | return processor->cache.l2->size; |
14 | 0 | } else if (processor->cache.l1d != NULL) { |
15 | 0 | return processor->cache.l1d->size; |
16 | 0 | } |
17 | 0 | return 0; |
18 | 0 | } |