10 virtual uint64_t
get_chare_id(uint64_t global_id)
const = 0;
12 virtual uint64_t
get_local_id(uint64_t global_id)
const = 0;
16 virtual uint64_t
get_global_id(uint64_t chare_id, uint64_t local_id)
const = 0;
18 virtual uint64_t
get_num_lps(uint64_t chare_id)
const = 0;
virtual uint64_t get_chare_id(uint64_t global_id) const =0
Maps a global LP id, gid, to a chare id.
virtual uint64_t get_local_id(uint64_t global_id) const =0
Maps a global LP id, gid, to its local offset id within its chare.
unsigned g_lps_per_chare
number of LPs per chare (if constant)
Definition: globals.C:16
uint64_t get_global_id(uint64_t chare_id, uint64_t local_id) const
The global id for (chare_id,\ p local_id) is g_lps_per_chare * chare_id + local_id.
Definition: mapper.h:38
uint64_t get_chare_id(uint64_t global_id) const
The chare id where gid is located is gid / g_lps_per_chare.
Definition: mapper.h:27
uint64_t get_num_lps(uint64_t chare_id) const
The number of lps on all chares is g_lps_per_chare.
Definition: mapper.h:42
Concrete implementation of a basic block mapping to be used as a default.
Definition: mapper.h:25
Base class which defines the mapper interface used during simulation setup.
Definition: mapper.h:7
uint64_t get_local_id(uint64_t global_id) const
The local offset of gid is gid % g_lps_per_chare.
Definition: mapper.h:31
virtual uint64_t get_global_id(uint64_t chare_id, uint64_t local_id) const =0
Maps a chare id and offset within the chare to a global LP id.
virtual uint64_t get_num_lps(uint64_t chare_id) const =0
Maps a chare id to the number of LPs that chare will have.