BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_CONTAINER_AGENT_VECTOR_H_
16 #define CORE_CONTAINER_AGENT_VECTOR_H_
25 struct InitializeGPUData;
52 auto* rm = sim->GetResourceManager();
54 auto num_agents = rm->GetNumAgents(n);
55 if (
data_[n].capacity() < num_agents) {
56 data_[n].reserve(num_agents * 1.5);
58 size_[n] = num_agents;
63 for (
auto& el :
size_) {
66 for (
auto& vec :
data_) {
72 size_t size(uint16_t numa_node) {
return size_[numa_node]; }
87 for (
size_t i = 0; i <
size_.size(); i++) {
89 for (
size_t j = 0; j < sz; j++) {
111 #endif // CORE_CONTAINER_AGENT_VECTOR_H_
T & operator[](const AgentHandle &handle)
static ThreadInfo * GetInstance()
int GetNumaNodes() const
Returns the number of NUMA nodes on this machine.
size_t size(uint16_t numa_node)
std::vector< size_t > size_
Defines the 3D physical interactions between physical objects.
ThreadInfo * thread_info_
AgentVector()
NB: Elements will not be initialized.
std::vector< std::vector< T > > data_
one std::vector<T> for each numa node
bool operator!=(const AgentVector< T > &other) const
NumaNode_t GetNumaNode() const
bool operator==(const AgentVector< T > &other) const
static Simulation * GetActive()
This function returns the currently active Simulation simulation.
const T & operator[](const AgentHandle &handle) const
ElementIdx_t GetElementIdx() const
This class stores information about each thread. (e.g. to which NUMA node it belongs to....