13 #ifndef _H_SST_CORE_UNIQUE_COUNT_STATISTIC_
14 #define _H_SST_CORE_UNIQUE_COUNT_STATISTIC_
16 #include <sst/core/sst_types.h>
18 #include <sst/core/statapi/statbase.h>
21 namespace Statistics {
52 uniqueSet.insert(data);
56 void clearStatisticData()
61 void registerOutputFields(StatisticOutput* statOutput)
63 uniqueCountField = statOutput->registerField<uint64_t>(
"UniqueItems");
66 void outputStatisticData(StatisticOutput* statOutput,
bool EndOfSimFlag)
68 statOutput->outputField(uniqueCountField, (uint64_t) uniqueSet.size());
72 std::set<T> uniqueSet;
73 StatisticOutput::fieldHandle_t uniqueCountField;
Main component object for the simulation.
Definition: component.h:56
Creates a Statistic which counts unique values provided to it.
Definition: statuniquecount.h:32
void setStatisticTypeName(const char *typeName)
Set an optional Statistic Type Name.
Definition: statbase.h:177
Forms the template defined base class for statistics gathering within SST.
Definition: statbase.h:263
void addData_impl(T data)
Present a new value to the Statistic to be included in the unique set.
Definition: statuniquecount.h:51
Parameter store.
Definition: params.h:46