diff --git a/src/cunumeric/unary/unary_op_util.h b/src/cunumeric/unary/unary_op_util.h index cbd07585cd..127b539028 100644 --- a/src/cunumeric/unary/unary_op_util.h +++ b/src/cunumeric/unary/unary_op_util.h @@ -560,8 +560,7 @@ struct UnaryOp { template struct UnaryOp { static constexpr bool valid = is_floating_or_complex; - ; - using T = legate::legate_type_of; + using T = legate::legate_type_of; UnaryOp(const std::vector& args) {} @@ -576,7 +575,7 @@ struct UnaryOp { constexpr decltype(auto) operator()(const T& x) const { using std::exp; - return exp(x) - 1; + return exp(x) - T(1); } }; @@ -800,7 +799,7 @@ struct UnaryOp { constexpr decltype(auto) operator()(const T& x) const { using std::log; - return log(1 + x); + return log(T(1) + x); } }; @@ -928,7 +927,7 @@ struct UnaryOp { constexpr T operator()(const T& x) const { // TODO: We should raise an exception for any divide-by-zero attempt - return x != 0 ? 1 / x : 0; + return x != T(0) ? T(1) / x : 0; } };