diff --git a/common/src/KokkosKernels_ComparableCast.hpp b/common/src/KokkosKernels_ComparableCast.hpp index a0ac4d8c06..8d04ba28fe 100644 --- a/common/src/KokkosKernels_ComparableCast.hpp +++ b/common/src/KokkosKernels_ComparableCast.hpp @@ -44,7 +44,7 @@ namespace Impl { value is not representable. */ template -constexpr auto comparable_cast(const A &a) { +KOKKOS_INLINE_FUNCTION constexpr auto comparable_cast(const A &a) { // both floating point, use the larger type if constexpr (std::is_floating_point_v && std::is_floating_point_v) { if constexpr (sizeof(T) >= sizeof(A)) {