BioDynaMo  v1.03.58-27764645
Public Member Functions | Private Attributes | List of all members
bdm::AgentFlatIdxMap Class Reference

#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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ AgentFlatIdxMap() [1/2]

bdm::AgentFlatIdxMap::AgentFlatIdxMap ( )
default

◆ AgentFlatIdxMap() [2/2]

bdm::AgentFlatIdxMap::AgentFlatIdxMap ( const AgentFlatIdxMap other)
inline

Definition at line 45 of file agent_flat_idx_map.h.

Member Function Documentation

◆ GetAgentHandle()

AgentHandle bdm::AgentFlatIdxMap::GetAgentHandle ( uint64_t  idx) const
inline

Definition at line 63 of file agent_flat_idx_map.h.

◆ GetFlatIdx()

uint64_t bdm::AgentFlatIdxMap::GetFlatIdx ( const AgentHandle ah) const
inline

Definition at line 59 of file agent_flat_idx_map.h.

◆ Update()

void bdm::AgentFlatIdxMap::Update ( )
inline

Definition at line 49 of file agent_flat_idx_map.h.

Member Data Documentation

◆ offset_

std::vector<size_t> bdm::AgentFlatIdxMap::offset_
private

Definition at line 80 of file agent_flat_idx_map.h.


The documentation for this class was generated from the following file: