using namespace tflite;
using namespace tflite::ops::builtin;
-class Count
-{
-public:
- Count() : _value(1)
- {
- auto env = std::getenv("COUNT");
-
- if (env)
- {
- _value = atoi(env);
- }
- }
-
-public:
- uint32_t value(void) const { return _value; }
-
-private:
- uint32_t _value;
-};
-
void help(std::ostream &out, const int argc, char **argv)
{
std::string cmd = argv[0];
//
// Measure
//
- const Count count;
+ const auto cnt = nnfw::util::get_env_int("COUNT", 1);
using namespace boost::accumulators;
accumulator_set<double, stats<tag::mean, tag::min, tag::max>> acc;
- for (uint32_t n = 0; n < count.value(); ++n)
+ for (int n = 0; n < cnt; ++n)
{
std::chrono::milliseconds elapsed(0);