12 #ifndef SST_CORE_CORETEST_MEMPOOLTEST_H 13 #define SST_CORE_CORETEST_MEMPOOLTEST_H 15 #include "sst/core/component.h" 16 #include "sst/core/link.h" 35 Event::serialize_order(ser);
43 return std::string(
"MemPoolTestEvent1 to be delivered at ") + std::to_string(
getDeliveryTime());
59 Event::serialize_order(ser);
67 return std::string(
"MemPoolTestEvent2 to be delivered at ") + std::to_string(
getDeliveryTime());
83 Event::serialize_order(ser);
91 return std::string(
"MemPoolTestEvent3 to be delivered at ") + std::to_string(
getDeliveryTime());
107 Event::serialize_order(ser);
115 return std::string(
"MemPoolTestEvent4 to be delivered at ") + std::to_string(
getDeliveryTime());
133 Event::serialize_order(ser);
147 SST_ELI_REGISTER_COMPONENT(
150 "memPoolTestComponent",
151 SST_ELI_ELEMENT_VERSION(1,0,0),
152 "Test MemPool overflow",
153 COMPONENT_CATEGORY_UNCATEGORIZED
156 SST_ELI_DOCUMENT_PARAMS(
157 {
"event_size",
"Size of event to sent (valid sizes: 1-4).",
"1" },
158 {
"initial_events",
"Number of events to send to each other component",
"256" },
159 {
"undeleted_events",
"Number of events to leave undeleted",
"0" },
160 {
"check_overflow",
"Check to see whether MemPool overflow is working correctly",
"true"}
163 SST_ELI_DOCUMENT_PORTS(
164 {
"port%d",
"Links to other test components", {
"CoreTestMemPoolTest.MemPoolTestEvent",
"" } }
167 SST_ELI_DOCUMENT_ATTRIBUTES(
168 {
"test_element",
"true" }
174 void eventHandler(
Event* ev,
int port);
175 void setup()
override;
177 void complete(
unsigned int phase)
override;
181 std::vector<Link*> links;
186 int undeleted_events;
189 Event* createEvent();
194 #endif // SST_CORE_CORETEST_COMPONENT_H This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:42
Main component object for the simulation.
Definition: component.h:30
Definition: coreTest_MemPoolTest.h:74
Definition: coreTest_MemPoolTest.h:22
Definition: coreTest_MemPoolTest.h:50
Definition: coreTest_MemPoolTest.h:26
Definition: coreTest_MemPoolTest.h:98
void finish() override
Called after complete phase, but before objects are destroyed.
Definition: coreTest_MemPoolTest.cc:130
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:41
SimTime_t getDeliveryTime() const
Return the time at which this Activity will be delivered.
Definition: activity.h:150
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:113
Parameter store.
Definition: params.h:63
void setup() override
Called after all components have been constructed and initialization has completed, but before simulation time has begun.
Definition: coreTest_MemPoolTest.cc:87
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:89
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:40
Definition: coreTest_MemPoolTest.h:144
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:65