BioDynaMo
v1.05.120-25dc9790
|
#include <agent_vector.h>
Public Member Functions | |
AgentVector () | |
NB: Elements will not be initialized. More... | |
void | reserve () |
void | clear () |
size_t | size (uint16_t numa_node) |
const T & | operator[] (const AgentHandle &handle) const |
T & | operator[] (const AgentHandle &handle) |
bool | operator== (const AgentVector< T > &other) const |
bool | operator!= (const AgentVector< T > &other) const |
Private Attributes | |
std::vector< std::vector< T > > | data_ |
one std::vector<T> for each numa node More... | |
std::vector< size_t > | size_ |
ThreadInfo * | thread_info_ = ThreadInfo::GetInstance() |
Friends | |
struct | detail::InitializeGPUData |
struct | MechanicalForcesOpCuda |
Two dimensional vector. Holds one element of type T
for each agent in the simulation.
Definition at line 31 of file agent_vector.h.
|
inline |
NB: Elements will not be initialized.
Definition at line 37 of file agent_vector.h.
|
inline |
Definition at line 62 of file agent_vector.h.
|
inline |
Definition at line 98 of file agent_vector.h.
|
inline |
Definition at line 82 of file agent_vector.h.
|
inline |
Definition at line 78 of file agent_vector.h.
|
inline |
Definition at line 74 of file agent_vector.h.
|
inline |
Reserves enough memory to hold N instances of type T (N being the number of agents in the simulation). e.g. ResourceManager has two types A
and B
. A
has 10 elements and B
20. data_[0]
corresponds to A
and reserves 10 elements, while data_[1]
corresponds to B
and reserves 20 elements. NB: Elements will not be initialized.
Definition at line 49 of file agent_vector.h.
|
inline |
Definition at line 72 of file agent_vector.h.
|
friend |
Definition at line 32 of file agent_vector.h.
|
friend |
Definition at line 33 of file agent_vector.h.
|
private |
one std::vector<T> for each numa node
Definition at line 104 of file agent_vector.h.
|
private |
Definition at line 105 of file agent_vector.h.
|
private |
Definition at line 106 of file agent_vector.h.