12#ifndef SST_CORE_CORETEST_STATISTICSCOMPONENT_H
13#define SST_CORE_CORETEST_STATISTICSCOMPONENT_H
15#include "sst/core/component.h"
16#include "sst/core/rng/rng.h"
21using namespace SST::RNG;
22using namespace SST::Statistics;
24namespace SST::CoreTestStatisticsComponent {
30 SST_ELI_REGISTER_COMPONENT(
31 StatisticsComponentInt,
33 "StatisticsComponent.int",
34 SST_ELI_ELEMENT_VERSION(1,0,0),
35 "Statistics test component with ints",
36 COMPONENT_CATEGORY_UNCATEGORIZED
39 SST_ELI_DOCUMENT_PARAMS(
40 {
"seed_w",
"The seed to use for the random number generator",
"7" },
41 {
"seed_z",
"The seed to use for the random number generator",
"5" },
42 {
"seed",
"The seed to use for the random number generator.",
"11" },
43 {
"rng",
"The random number generator to use (Marsaglia or Mersenne), default is Mersenne",
"Mersenne"},
44 {
"count",
"The number of random numbers to generate, default is 1000",
"1000" },
45 {
"dynamic_reg",
"The cycle at which to dynamically register a statistic. 0 indicates none",
"0"}
48 SST_ELI_DOCUMENT_STATISTICS(
49 {
"stat1_U32",
"Test Statistic 1 - Collecting U32 Data",
"units", 1},
50 {
"stat2_U64",
"Test Statistic 2 - Collecting U64 Data",
"units", 2},
51 {
"stat3_I32",
"Test Statistic 3 - Collecting I32 Data",
"units", 3},
52 {
"stat4_I64",
"Test Statistic 4 - Collecting I64 Data",
"units", 4},
53 {
"stat5_dyn",
"Test Statistic 5 - Statistic registered during run loop",
"units", 1}
57 SST_ELI_DOCUMENT_PORTS(
61 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
64 StatisticsComponentInt(ComponentId_t
id,
Params& params);
73 virtual bool Clock1Tick(SST::Cycle_t);
94 SST_ELI_REGISTER_COMPONENT(
95 StatisticsComponentFloat,
97 "StatisticsComponent.float",
98 SST_ELI_ELEMENT_VERSION(1,0,0),
99 "Statistics test component with floats",
100 COMPONENT_CATEGORY_UNCATEGORIZED
103 SST_ELI_DOCUMENT_PARAMS(
104 {
"seed_w",
"The seed to use for the random number generator",
"7" },
105 {
"seed_z",
"The seed to use for the random number generator",
"5" },
106 {
"seed",
"The seed to use for the random number generator.",
"11" },
107 {
"rng",
"The random number generator to use (Marsaglia or Mersenne), default is Mersenne",
"Mersenne"},
108 {
"count",
"The number of random numbers to generate, default is 1000",
"1000" }
111 SST_ELI_DOCUMENT_STATISTICS(
112 {
"stat1_F32",
"Test Statistic 1 - Collecting F32 Data",
"units", 1},
113 {
"stat2_F64",
"Test Statistic 2 - Collecting F64 Data",
"units", 2},
114 {
"stat3_F64",
"Test Statistic 2 - Collecting F64 Data",
"units", 9},
118 SST_ELI_DOCUMENT_PORTS(
122 SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(
125 StatisticsComponentFloat(ComponentId_t
id,
Params& params);
134 virtual bool Clock1Tick(SST::Cycle_t);
137 std::string rng_type;
Main component object for the simulation.
Definition component.h:31
Definition coreTest_StatisticsComponent.h:91
void finish() override
Called after complete phase, but before objects are destroyed.
Definition coreTest_StatisticsComponent.h:127
void setup() override
Called after all components have been constructed and initialization has completed,...
Definition coreTest_StatisticsComponent.h:126
Definition coreTest_StatisticsComponent.h:27
void setup() override
Called after all components have been constructed and initialization has completed,...
Definition coreTest_StatisticsComponent.h:65
void finish() override
Called after complete phase, but before objects are destroyed.
Definition coreTest_StatisticsComponent.h:66
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition output.h:54
Parameter store.
Definition params.h:58
Implements the base class for random number generators for the SST core.
Definition rng.h:29
Forms the template defined base class for statistics gathering within SST.
Definition statbase.h:373