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"
21 namespace CoreTestMemPoolTest {
33 Event::serialize_order(ser);
41 return std::string(
"MemPoolTestEvent1 to be delivered at ") + std::to_string(
getDeliveryTime());
55 Event::serialize_order(ser);
63 return std::string(
"MemPoolTestEvent2 to be delivered at ") + std::to_string(
getDeliveryTime());
77 Event::serialize_order(ser);
85 return std::string(
"MemPoolTestEvent3 to be delivered at ") + std::to_string(
getDeliveryTime());
99 Event::serialize_order(ser);
107 return std::string(
"MemPoolTestEvent4 to be delivered at ") + std::to_string(
getDeliveryTime());
123 Event::serialize_order(ser);
137 SST_ELI_REGISTER_COMPONENT(
140 "memPoolTestComponent",
141 SST_ELI_ELEMENT_VERSION(1,0,0),
142 "Test MemPool overflow",
143 COMPONENT_CATEGORY_UNCATEGORIZED
146 SST_ELI_DOCUMENT_PARAMS(
147 {
"event_size",
"Size of event to sent (valid sizes: 1-4).",
"1" },
148 {
"initial_events",
"Number of events to send to each other component",
"256" },
149 {
"undeleted_events",
"Number of events to leave undeleted",
"0" },
150 {
"check_overflow",
"Check to see whether MemPool overflow is working correctly",
"true"}
153 SST_ELI_DOCUMENT_PORTS(
154 {
"port%d",
"Links to other test components", {
"CoreTestMemPoolTest.MemPoolTestEvent",
"" } }
157 SST_ELI_DOCUMENT_ATTRIBUTES(
158 {
"test_element",
"true" }
164 void eventHandler(
Event* ev,
int port);
165 void setup(
void)
override;
166 void finish(
void)
override;
167 void complete(
unsigned int phase)
override;
171 std::vector<Link*> links;
176 int undeleted_events;
179 Event* createEvent();
SimTime_t getDeliveryTime() const
Return the time at which this Activity will be delivered.
Definition: activity.h:144
Main component object for the simulation.
Definition: component.h:31
Definition: coreTest_MemPoolTest.h:135
void finish(void) override
Called after complete phase, but before objects are destroyed.
Definition: coreTest_MemPoolTest.cc:123
void setup(void) override
Called after all components have been constructed and initialization has completed,...
Definition: coreTest_MemPoolTest.cc:82
Definition: coreTest_MemPoolTest.h:27
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:39
Definition: coreTest_MemPoolTest.h:49
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:61
Definition: coreTest_MemPoolTest.h:71
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:83
Definition: coreTest_MemPoolTest.h:93
std::string toString() const override
Get a string represenation of the event.
Definition: coreTest_MemPoolTest.h:105
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
Base class for Events - Items sent across links to communicate between components.
Definition: event.h:35
Parameter store.
Definition: params.h:56