12 #ifndef SST_CORE_STATAPI_STATNULL_H 13 #define SST_CORE_STATAPI_STATNULL_H 15 #include "sst/core/sst_types.h" 16 #include "sst/core/statapi/statbase.h" 17 #include "sst/core/warnmacros.h" 39 template <
class T,
bool = std::is_arithmetic_v<T>>
47 BaseComponent* comp,
const std::string& stat_name,
const std::string& stat_sub_id,
Params& stat_params) :
51 void addData_impl(T UNUSED(data))
override {}
53 void addData_impl_Ntimes(uint64_t UNUSED(N), T UNUSED(data))
override {}
55 virtual const std::string&
getStatTypeName()
const override {
return stat_type_; }
58 inline static const std::string stat_type_ =
"NULL";
61 template <
class... Args>
66 BaseComponent* comp,
const std::string& stat_name,
const std::string& stat_sub_id,
Params& stat_params) :
67 Statistic<std::tuple<Args...>>(comp, stat_name, stat_sub_id, stat_params)
70 void addData_impl(Args... UNUSED(data))
override {}
72 void addData_impl_Ntimes(uint64_t UNUSED(N), Args... UNUSED(data))
override {}
74 virtual const std::string&
getStatTypeName()
const override {
return stat_type_; }
77 inline static const std::string stat_type_ =
"NULL";
85 BaseComponent* comp,
const std::string& stat_name,
const std::string& stat_sub_id,
Params& stat_params) :
89 void addData_impl(T&& UNUSED(data))
override {}
90 void addData_impl(
const T& UNUSED(data))
override {}
92 void addData_impl_Ntimes(uint64_t UNUSED(N), T&& UNUSED(data))
override {}
93 void addData_impl_Ntimes(uint64_t UNUSED(N),
const T& UNUSED(data))
override {}
95 virtual const std::string&
getStatTypeName()
const override {
return stat_type_; }
98 inline static const std::string stat_type_ =
"NULL";
105 SST_ELI_DECLARE_STATISTIC_TEMPLATE(
109 SST_ELI_ELEMENT_VERSION(1,0,0),
110 "Null object that ignores all collections",
115 BaseComponent* comp,
const std::string& stat_name,
const std::string& stat_sub_id,
Params& stat_params) :
121 void clearStatisticData()
override 131 void outputStatisticFields(
StatisticFieldsOutput* UNUSED(stat_output),
bool UNUSED(end_of_sim_flag))
override 136 bool isReady()
const override {
return true; }
138 bool isNullStatistic()
const override {
return true; }
140 static bool isLoaded() {
return true; }
147 SST_ELI_REGISTER_DERIVED(
152 SST_ELI_ELEMENT_VERSION(1,0,0),
153 "Null statistic for custom (void) stats" 156 SST_ELI_INTERFACE_INFO(
"Statistic<void>")
159 BaseComponent* comp,
const std::string& stat_name,
const std::string& stat_sub_id,
Params& stat_params) :
163 virtual std::string getELIName()
const override {
return "sst.NullStatistic"; }
165 virtual const std::string& getStatTypeName()
const override {
return stat_type_; }
168 inline static const std::string stat_type_ =
"NULL";
173 #endif // SST_CORE_STATAPI_STATNULL_H virtual const std::string & getStatTypeName() const override
Return the Statistic type name.
Definition: statnull.h:55
Forms the template defined base class for statistics gathering within SST.
Definition: elementinfo.h:46
void Statistic has special meaning in that it does not collect fields in the usual way through the ad...
Definition: statbase.h:448
virtual const std::string & getStatTypeName() const override
Return the Statistic type name.
Definition: statnull.h:74
virtual const std::string & getStatTypeName() const override
Return the Statistic type name.
Definition: statnull.h:95
Definition: statoutput.h:170
Main component object for the simulation.
Definition: baseComponent.h:64
Parameter store.
Definition: params.h:63
Definition: statnull.h:144
Definition: elementinfo.h:44
Definition: statnull.h:40
An empty statistic place holder.
Definition: statnull.h:102