Changeset 07a1e7a for libcfa


Ignore:
Timestamp:
Jan 11, 2022, 11:38:05 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
00f5fde, 145dcd5
Parents:
9b33337
Message:

Added cpu info for which cache the map referes to.

Location:
libcfa/src/device
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/device/cpu.cfa

    r9b33337 r07a1e7a  
    427427                        unsigned c = pairings[i].cpu;
    428428                        unsigned llc_id = pairings[i].id;
    429                         unsigned width = maps[llc_id].raw->width;
    430429                        unsigned start = maps[llc_id].start;
    431                         unsigned self  = start + (maps[llc_id].count++);
    432                         entries[c].count = width;
     430                        entries[c].count = maps[llc_id].raw->width;
    433431                        entries[c].start = start;
    434                         entries[c].self  = self;
     432                        entries[c].self  = start + (maps[llc_id].count++);
     433                        entries[c].cache = llc_id;
    435434                }
    436435
  • libcfa/src/device/cpu.hfa

    r9b33337 r07a1e7a  
    1616#include <stddef.h>
    1717
     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
    1821struct cpu_map_entry_t {
     22        // Where this particular cpu is in the group
    1923        unsigned self;
     24
     25        // Starting index of the cpus with the same topology
    2026        unsigned start;
     27
     28        // Number of cpus with the same topology
    2129        unsigned count;
     30
     31        // Index of the cache this entry describes
     32        unsigned cache;
    2233};
    2334
Note: See TracChangeset for help on using the changeset viewer.