diff --git a/src/main.cpp b/src/main.cpp index 32b01be..9d96c90 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,11 +5,11 @@ #include #include +#include #include -#include #include -#include #include +#include #include #include "bude.h" @@ -27,8 +27,7 @@ #endif #ifndef MINIBUDE_COMPILE_COMMANDS - #define MINIBUDE_COMPILE_COMMANDS \ - { MINIBUDE_WARN_NOT_CMAKE } + #define MINIBUDE_COMPILE_COMMANDS {MINIBUDE_WARN_NOT_CMAKE} #endif #ifdef USE_CPU_FEATURES @@ -388,9 +387,12 @@ std::pair> validate(const Sample &sample, const Para } // flush at the end to make sure errors are clumped together std::cerr << std::flush; + return {valid, maxDiffPct, s, SummaryStats({std::numeric_limits::max()}), 0, 0, 0}; + } else if (!valid) + return {valid, maxDiffPct, s, SummaryStats({std::numeric_limits::max()}), 0, 0, 0}; + else { + return {valid, maxDiffPct, s, SummaryStats(msWithoutWarmup), gflops, gfinsts, interactions_per_sec}; } - - return {valid, maxDiffPct, s, SummaryStats(msWithoutWarmup), gflops, gfinsts, interactions_per_sec}; } [[nodiscard]] std::pair selectDevice(const std::string &needle,