BioDynaMo
v1.05.120-25dc9790
|
The SharedData class avoids false sharing between threads. More...
#include <shared_data.h>
Classes | |
struct | AlignedT |
Wrapper for a chacheline-size aligned T. More... | |
struct | Iterator |
Public Types | |
using | Data = std::vector< AlignedT > |
Public Member Functions | |
SharedData ()=default | |
SharedData (size_t size, const T &value=T()) | |
T & | operator[] (size_t index) |
const T & | operator[] (size_t index) const |
size_t | size () const |
Get the size of the SharedData.data_ vector. More... | |
void | resize (size_t new_size) |
Resize the SharedData.data_ vector. More... | |
Iterator | begin () |
Iterator | end () |
const Iterator | begin () const |
const Iterator | end () const |
Private Attributes | |
Data | data_ |
The SharedData class avoids false sharing between threads.
Definition at line 48 of file shared_data.h.
using bdm::SharedData< T >::Data = std::vector<AlignedT> |
Data type definition for a vector whose entries fill full cache lines. A vector whose components' sizes are a multiple of the cacheline size, e.g sizeof(Data[i]) = N*hardware_destructive_interference_size.
Definition at line 58 of file shared_data.h.
|
default |
|
inline |
Definition at line 61 of file shared_data.h.
|
inline |
Definition at line 93 of file shared_data.h.
|
inline |
Definition at line 95 of file shared_data.h.
|
inline |
Definition at line 94 of file shared_data.h.
|
inline |
Definition at line 98 of file shared_data.h.
|
inline |
Definition at line 67 of file shared_data.h.
|
inline |
Definition at line 68 of file shared_data.h.
|
inline |
Resize the SharedData.data_ vector.
Definition at line 74 of file shared_data.h.
|
inline |
Get the size of the SharedData.data_ vector.
Definition at line 71 of file shared_data.h.
|
private |
Definition at line 103 of file shared_data.h.