16 #ifndef _CORETESTSHAREDOBJECT_H
17 #define _CORETESTSHAREDOBJECT_H
19 #include <sst/core/component.h>
20 #include <sst/core/output.h>
21 #include <sst/core/shared/sharedArray.h>
22 #include <sst/core/shared/sharedMap.h>
23 #include <sst/core/shared/sharedSet.h>
26 namespace CoreTestSharedObjectsComponent {
44 bool operator<(
const setItem& lhs)
const {
48 bool operator==(
const setItem& lhs)
const {
49 if ( key != lhs.key )
return false;
50 if ( value != lhs.value )
return false;
68 SST_ELI_REGISTER_COMPONENT(
71 "coreTestSharedObjectsComponent",
72 SST_ELI_ELEMENT_VERSION(1,0,0),
73 "Test for SharedObjects",
74 COMPONENT_CATEGORY_UNCATEGORIZED
77 SST_ELI_DOCUMENT_PARAMS(
78 {
"object_type",
"Type of object to test ( array | map | set )",
"array"},
79 {
"num_entities",
"Number of entities in the sim",
"12"},
80 {
"myid",
"ID Number (0 <= myid < num_entities)",
nullptr},
81 {
"full_initialization",
"If true, id 0 will initialize whole array, otherwise each id will contribute",
"true"},
82 {
"multiple_initializers",
"If doing full_initialization, this will cause ID N-1 to also initialize array",
"false"},
83 {
"conflicting_write",
"Controls whether a conflicting write is done when full_initialization and multiple_initializers are turned on (otherwise it has no effect)",
"false"},
84 {
"verify_mode",
"Sets verify mode for SharedArray ( FE | INIT | NONE )",
"INIT" },
85 {
"late_write",
"Controls whether a late write is done",
"false" },
86 {
"publish",
"Controls whether publish() is called or not",
"true"},
87 {
"double_initialize",
"If true, initialize() will be called twice",
"false" },
88 {
"late_initialize",
"If true, initialize() will be called during setup instead of in constructor",
"false" }
92 SST_ELI_DOCUMENT_STATISTICS(
96 SST_ELI_DOCUMENT_PORTS(
100 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
106 void init(
unsigned int phase)
override;
107 void setup()
override;
109 void complete(
unsigned int phase)
override;
111 bool tick(SST::Cycle_t);
126 bool late_initialize;
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file...
Definition: output.h:54
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
SharedSet class.
Definition: sharedSet.h:28
Definition: coreTest_SharedObjectComponent.h:63
Main component object for the simulation.
Definition: component.h:31
Definition: serializable.h:109
void setup() override
Called after all components have been constructed and initialization has completed, but before simulation time has begun.
Definition: coreTest_SharedObjectComponent.cc:189
Parameter store.
Definition: params.h:44
Definition: coreTest_SharedObjectComponent.h:30
void finish() override
Called after simulation completes, but before objects are destroyed.
Definition: coreTest_SharedObjectComponent.cc:240