16#ifndef SST_CORE_CORETEST_SHAREDOBJECT_H
17#define SST_CORE_CORETEST_SHAREDOBJECT_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"
26namespace CoreTestSharedObjectsComponent {
37 setItem(
int key,
int value) : key(key), value(value) {}
39 bool operator<(
const setItem& lhs)
const {
return key < lhs.key; }
41 bool operator==(
const setItem& lhs)
const
43 if ( key != lhs.key )
return false;
44 if ( value != lhs.value )
return false;
61 SST_ELI_REGISTER_COMPONENT(
64 "coreTestSharedObjectsComponent",
65 SST_ELI_ELEMENT_VERSION(1,0,0),
66 "Test for SharedObjects",
67 COMPONENT_CATEGORY_UNCATEGORIZED
70 SST_ELI_DOCUMENT_PARAMS(
71 {
"object_type",
"Type of object to test ( array | map | set )",
"array"},
72 {
"num_entities",
"Number of entities in the sim",
"12"},
73 {
"myid",
"ID Number (0 <= myid < num_entities)",
nullptr},
74 {
"full_initialization",
"If true, id 0 will initialize whole array, otherwise each id will contribute",
"true"},
75 {
"multiple_initializers",
"If doing full_initialization, this will cause ID N-1 to also initialize array",
"false"},
76 {
"conflicting_write",
"Controls whether a conflicting write is done when full_initialization and multiple_initializers are turned on (otherwise it has no effect)",
"false"},
77 {
"verify_mode",
"Sets verify mode for SharedArray ( FE | INIT | NONE )",
"INIT" },
78 {
"late_write",
"Controls whether a late write is done",
"false" },
79 {
"publish",
"Controls whether publish() is called or not",
"true"},
80 {
"double_initialize",
"If true, initialize() will be called twice",
"false" },
81 {
"late_initialize",
"If true, initialize() will be called during setup instead of in constructor",
"false" }
85 SST_ELI_DOCUMENT_STATISTICS(
89 SST_ELI_DOCUMENT_PORTS(
93 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
99 void init(
unsigned int phase)
override;
100 void setup()
override;
102 void complete(
unsigned int phase)
override;
104 bool tick(SST::Cycle_t);
120 bool late_initialize;
Main component object for the simulation.
Definition: component.h:31
Definition: coreTest_SharedObjectComponent.h:58
void finish() override
Called after complete phase, but before objects are destroyed.
Definition: coreTest_SharedObjectComponent.cc:224
void setup() override
Called after all components have been constructed and initialization has completed,...
Definition: coreTest_SharedObjectComponent.cc:187
Definition: serializable.h:119
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition: output.h:52
Parameter store.
Definition: params.h:56
SharedArray class.
Definition: sharedArray.h:29
SharedMap class.
Definition: sharedMap.h:29
SharedSet class.
Definition: sharedSet.h:29
Definition: coreTest_SharedObjectComponent.h:31