SST
14.0.0
StructuralSimulationToolkit
|
Public Member Functions | |
Data (const std::string &name) | |
void | setSize (size_t size, bool init_data, verify_type v_type) |
Set the size of the array. More... | |
size_t | getSize () |
void | update_write (int index, bool data) |
void | write (int index, bool data) |
bool | read (int index) const |
bool | mutex_read (int index) const |
virtual SharedObjectChangeSet * | getChangeSet () override |
Gets the changeset for this data on this rank. More... | |
virtual void | resetChangeSet () override |
Resets the changeset for this data on this rank. More... | |
void | serialize_order (SST::Core::Serialization::serializer &ser) override |
ImplementSerializable (SST::Shared::SharedArray< bool >::Data) | |
![]() | |
const std::string & | getName () |
Get the name of the SharedObject for this data. More... | |
bool | isFullyPublished () |
Checks to see if all instances of this SharedObject have called publish(). More... | |
virtual int | getShareCount () |
Get the number of sharers for this data. More... | |
virtual int | getPublishCount () |
Get the number of instances that have called publish() on their instance of the shared object. More... | |
![]() | |
virtual const char * | cls_name () const =0 |
virtual uint32_t | cls_id () const =0 |
virtual std::string | serialization_name () const =0 |
Data Fields | |
std::vector< bool > | array |
std::vector< bool > | written |
ChangeSet * | change_set |
bool | init |
verify_type | verify |
Additional Inherited Members | |
![]() | |
static constexpr uint32_t | NullClsId = std::numeric_limits<uint32_t>::max() |
![]() | |
enum | cxn_flag_t { ConstructorFlag } |
![]() | |
void | check_lock_for_write (const std::string &obj) |
virtual int | incShareCount () |
Increment the count of sharers. More... | |
virtual void | incPublishCount () |
Increment the count of instances that have called publish. More... | |
void | lock () |
Called by the core when writing to shared regions is no longer allowed. | |
SharedObjectData (const std::string &name) | |
Constructor for SharedObjectData. More... | |
virtual | ~SharedObjectData () |
Destructor for SharedObjectData. | |
void | serialize_order (SST::Core::Serialization::serializer &ser) override |
ImplementVirtualSerializable (SharedObjectData) | |
![]() | |
static void | serializable_abort (uint32_t line, const char *file, const char *func, const char *obj) |
![]() | |
std::string | name |
int | share_count |
int | publish_count |
bool | fully_published |
bool | locked |
std::mutex | mtx |
|
inlineoverridevirtual |
Gets the changeset for this data on this rank.
This is called by the core when exchanging and merging data
Implements SST::Shared::SharedObjectData.
|
inlineoverridevirtual |
Resets the changeset for this data on this rank.
This is called by the core when exchanging and merging data
Implements SST::Shared::SharedObjectData.
|
inline |
Set the size of the array.
An element can only write up to the current size (reading or writing beyond the size will create undefined behavior). However, an element can put in the size it needs for its writes and it will end up being the largest size requested. We use a vector underneatch the covers to manage the memory/copying of data.
References SST::Shared::SharedObjectData::lock(), and SST::Shared::SharedArray< T >::size().