12#ifndef SST_CORE_CORETEST_COMPONENT_H
13#define SST_CORE_CORETEST_COMPONENT_H
15#include "sst/core/component.h"
16#include "sst/core/link.h"
17#include "sst/core/rng/marsaglia.h"
22namespace SST::CoreTestComponent {
33 SST_ELI_DOCUMENT_PARAMS(
34 {
"workPerCycle",
"Count of busy work to do during a clock tick.", NULL},
35 {
"clockFrequency",
"Frequency of the clock",
"1GHz"}
38 SST_ELI_DOCUMENT_STATISTICS(
39 {
"N",
"events sent on N link",
"counts", 1 }
42 SST_ELI_DOCUMENT_PORTS(
43 {
"Nlink",
"Link to the coreTestComponent to the North", {
"coreTestComponent.coreTestComponentEvent",
"" } }
46 SST_ELI_DOCUMENT_ATTRIBUTES(
47 {
"test_element",
"true" }
50 SST_ELI_IS_CHECKPOINTABLE()
52 explicit coreTestComponentBase(ComponentId_t
id) :
55 ~coreTestComponentBase() {}
56 coreTestComponentBase() :
63class coreTestComponentBase2 :
public coreTestComponentBase
66 SST_ELI_REGISTER_COMPONENT_DERIVED_BASE(
69 SST_ELI_DOCUMENT_PARAMS(
70 {
"commFreq",
"There is a 1/commFreq chance each clock cycle of sending an event to a neighbor", NULL}
73 SST_ELI_DOCUMENT_STATISTICS(
74 {
"S",
"events sent on S link",
"counts", 1 }
77 SST_ELI_DOCUMENT_PORTS(
78 {
"Slink",
"Link to the coreTestComponent to the South", {
"coreTestComponent.coreTestComponentEvent",
"" } }
81 SST_ELI_IS_CHECKPOINTABLE()
83 explicit coreTestComponentBase2(ComponentId_t
id) :
84 coreTestComponentBase(
id)
86 ~coreTestComponentBase2() {}
88 coreTestComponentBase2() :
89 coreTestComponentBase()
94 SST::CoreTestComponent::coreTestComponentBase::serialize_order(ser);
99class coreTestComponent :
public coreTestComponentBase2
103 SST_ELI_REGISTER_COMPONENT(
107 SST_ELI_ELEMENT_VERSION(1,0,0),
108 "CoreTest Test Component",
109 COMPONENT_CATEGORY_PROCESSOR
112 SST_ELI_DOCUMENT_PARAMS(
113 {
"commSize",
"Size of communication to send.",
"16"}
116 SST_ELI_DOCUMENT_STATISTICS(
117 {
"E",
"events sent on E link",
"counts", 1 },
118 {
"W",
"events sent on W link",
"counts", 1 }
121 SST_ELI_DOCUMENT_PORTS(
122 {
"Elink",
"Link to the coreTestComponent to the East", {
"coreTestComponent.coreTestComponentEvent",
"" } },
123 {
"Wlink",
"Link to the coreTestComponent to the West", {
"coreTestComponent.coreTestComponentEvent",
"" } }
127 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
130 SST_ELI_IS_CHECKPOINTABLE()
132 coreTestComponent(SST::ComponentId_t
id,
SST::Params& params);
133 ~coreTestComponent();
136 void finish()
override { printf(
"Component Finished.\n"); }
147 virtual bool clockTic(SST::Cycle_t);
Main component object for the simulation.
Definition component.h:32
Definition coreTest_Component.h:64
Definition coreTest_Component.h:29
Definition coreTest_Component.h:100
void setup() override
Called after all components have been constructed and initialization has completed,...
Definition coreTest_Component.h:135
void finish() override
Called after complete phase, but before objects are destroyed.
Definition coreTest_Component.h:136
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:43
Base class for Events - Items sent across links to communicate between components.
Definition event.h:41
std::pair< uint64_t, int > id_type
Type definition of unique identifiers.
Definition event.h:103
Link between two components.
Definition link.h:57
Parameter store.
Definition params.h:65
Implements a random number generator using the Marsaglia method.
Definition marsaglia.h:41
Forms the template defined base class for statistics gathering within SST.
Definition statbase.h:369