diff --git a/src/runtime/local/kernels/EwUnarySca.h b/src/runtime/local/kernels/EwUnarySca.h index 3c1bd754d..50c18d2bd 100644 --- a/src/runtime/local/kernels/EwUnarySca.h +++ b/src/runtime/local/kernels/EwUnarySca.h @@ -95,9 +95,7 @@ EwUnaryScaFuncPtr getEwUnaryScaFuncPtr(UnaryOpCode opCode) { // Comparison. MAKE_CASE(UnaryOpCode::ISNAN) #undef MAKE_CASE - default: - throw std::runtime_error("unknown UnaryOpCode: " + - std::to_string(static_cast(opCode))); + throw std::runtime_error("unknown UnaryOpCode: " + std::to_string(static_cast(opCode))); } if (!res) throw std::runtime_error( diff --git a/src/runtime/local/kernels/Group.h b/src/runtime/local/kernels/Group.h index c9446409d..2908e9e87 100644 --- a/src/runtime/local/kernels/Group.h +++ b/src/runtime/local/kernels/Group.h @@ -70,24 +70,19 @@ VTRes aggregate(const mlir::daphne::GroupEnum &aggFunc, const VTArg *begin, using mlir::daphne::GroupEnum; switch (aggFunc) { case GroupEnum::COUNT: - return end - begin; - break; // TODO: Do we need to check for Null elements here? + return end - begin;// TODO: Do we need to check for Null elements here? case GroupEnum::SUM: return std::accumulate(begin, end, (VTRes)0); - break; case GroupEnum::MIN: return *std::min_element(begin, end); - break; case GroupEnum::MAX: return *std::max_element(begin, end); - break; case GroupEnum::AVG: return std::accumulate(begin, end, (double)0) / (double)(end - begin); - break; - default: - return *begin; - break; +// default: +// return *begin; } + throw std::runtime_error("unknown value of mlir::daphne::GroupEnum"); } // struct which calls the aggregate() function (specified via aggFunc) on each