BioDynaMo
v1.05.120-25dc9790
|
#include <agent_flat_idx_map.h>
Public Member Functions | |
AgentFlatIdxMap ()=default | |
AgentFlatIdxMap (const AgentFlatIdxMap &other) | |
void | Update () |
uint64_t | GetFlatIdx (const AgentHandle &ah) const |
AgentHandle | GetAgentHandle (uint64_t idx) const |
Private Attributes | |
std::vector< size_t > | offset_ |
AgentFlatIdxMap maps flattened agent indices to and from AgentHandles
NUMA 0: [0 1 2 3] NUMA 1: [0 1 2 3 4] NUMA 2: [0 1 2 3 4 5] ______________________ ↓
Flattened indices = [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14]
offset_ = [0, 4, 9]
AgentFlatIdxMap::GetFlatIdx(AgentHandle(1, 2)) = offset_[1] + 2 = 4 + 2 = 6 AgentFlatIdxMap::GetAgentHandle(6) = AgentHandle(1, 2)
Definition at line 41 of file agent_flat_idx_map.h.
|
default |
|
inline |
Definition at line 45 of file agent_flat_idx_map.h.
|
inline |
Definition at line 63 of file agent_flat_idx_map.h.
|
inline |
Definition at line 59 of file agent_flat_idx_map.h.
|
inline |
Definition at line 49 of file agent_flat_idx_map.h.
|
private |
Definition at line 80 of file agent_flat_idx_map.h.