13 #ifndef _H_SST_CORE_UNIQUE_COUNT_STATISTIC_ 14 #define _H_SST_CORE_UNIQUE_COUNT_STATISTIC_ 16 #include <sst/core/sst_types.h> 17 #include <sst/core/warnmacros.h> 19 #include <sst/core/statapi/statbase.h> 23 namespace Statistics {
53 uniqueSet.insert(data);
57 void clearStatisticData()
override 64 uniqueCountField = statOutput->
registerField<uint64_t>(
"UniqueItems");
67 void outputStatisticData(
StatisticOutput* statOutput,
bool UNUSED(EndOfSimFlag))
override 69 statOutput->
outputField(uniqueCountField, (uint64_t) uniqueSet.size());
73 std::set<T> uniqueSet;
74 StatisticOutput::fieldHandle_t uniqueCountField;
Forms the base class for statistics output generation within the SST core.
Definition: statoutput.h:47
fieldHandle_t registerField(const char *fieldName)
Register a field to be output (templated function)
Definition: statoutput.h:85
Creates a Statistic which counts unique values provided to it.
Definition: statuniquecount.h:34
void setStatisticTypeName(const char *typeName)
Set an optional Statistic Type Name.
Definition: statbase.h:202
Forms the template defined base class for statistics gathering within SST.
Definition: statbase.h:294
Main component object for the simulation.
Definition: baseComponent.h:104
void addData_impl(T data) override
Present a new value to the Statistic to be included in the unique set.
Definition: statuniquecount.h:52
Parameter store.
Definition: params.h:45
void outputField(fieldHandle_t fieldHandle, int32_t data)
Output field data.
Definition: statoutput.cc:166