BioDynaMo  v1.05.120-25dc9790
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap Struct Reference

#include <in_place_exec_ctxt.h>

Collaboration diagram for bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap:
[legend]

Public Types

using value_type = Agent *
 
using Batch = std::vector< value_type >
 

Public Member Functions

 ThreadSafeAgentUidMap ()
 
 ~ThreadSafeAgentUidMap ()
 
void Insert (const AgentUid &uid, const value_type &value)
 
const value_typeoperator[] (const AgentUid &key) const
 
uint64_t Size () const
 
void Resize (uint64_t new_size)
 
void DeleteOldCopies ()
 

Public Attributes

Spinlock lock_
 
uint64_t num_batches_ = 0
 
std::atomic< Batch ** > batches_
 
std::vector< Batch ** > old_copies_
 

Static Public Attributes

constexpr static uint64_t kBatchSize = 10240
 

Detailed Description

Definition at line 56 of file in_place_exec_ctxt.h.

Member Typedef Documentation

◆ Batch

Definition at line 58 of file in_place_exec_ctxt.h.

◆ value_type

Definition at line 57 of file in_place_exec_ctxt.h.

Constructor & Destructor Documentation

◆ ThreadSafeAgentUidMap()

bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::ThreadSafeAgentUidMap ( )

Definition at line 29 of file in_place_exec_ctxt.cc.

◆ ~ThreadSafeAgentUidMap()

bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::~ThreadSafeAgentUidMap ( )

Definition at line 34 of file in_place_exec_ctxt.cc.

Member Function Documentation

◆ DeleteOldCopies()

void bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::DeleteOldCopies ( )

Definition at line 104 of file in_place_exec_ctxt.cc.

◆ Insert()

void bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::Insert ( const AgentUid uid,
const value_type value 
)

Definition at line 45 of file in_place_exec_ctxt.cc.

◆ operator[]()

const InPlaceExecutionContext::ThreadSafeAgentUidMap::value_type & bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::operator[] ( const AgentUid key) const

Definition at line 62 of file in_place_exec_ctxt.cc.

◆ Resize()

void bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::Resize ( uint64_t  new_size)

Definition at line 83 of file in_place_exec_ctxt.cc.

◆ Size()

uint64_t bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::Size ( ) const

Definition at line 79 of file in_place_exec_ctxt.cc.

Member Data Documentation

◆ batches_

std::atomic<Batch**> bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::batches_

Definition at line 71 of file in_place_exec_ctxt.h.

◆ kBatchSize

constexpr static uint64_t bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::kBatchSize = 10240
staticconstexpr

Definition at line 69 of file in_place_exec_ctxt.h.

◆ lock_

Spinlock bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::lock_

Definition at line 68 of file in_place_exec_ctxt.h.

◆ num_batches_

uint64_t bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::num_batches_ = 0

Definition at line 70 of file in_place_exec_ctxt.h.

◆ old_copies_

std::vector<Batch**> bdm::InPlaceExecutionContext::ThreadSafeAgentUidMap::old_copies_

Definition at line 72 of file in_place_exec_ctxt.h.


The documentation for this struct was generated from the following files: