From 17217e6803aea4ccee46292408a91c147b5afc6a Mon Sep 17 00:00:00 2001 From: dbrundu Date: Fri, 31 Jul 2026 10:58:37 +0200 Subject: [PATCH] Fixed wrong operands order in FunctionArgument and other typos --- hydra/detail/FunctionArgument.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hydra/detail/FunctionArgument.h b/hydra/detail/FunctionArgument.h index adbd9ed0e..5c3e7fc70 100644 --- a/hydra/detail/FunctionArgument.h +++ b/hydra/detail/FunctionArgument.h @@ -339,7 +339,7 @@ operator+( Arg1 const& a1, Arg2 const& a2) { template requires (detail::FunctionArg && !detail::FunctionArg) -__hydra_host__ __hydra_device__ decltype(std::declval()+ std::declval() ) +__hydra_host__ __hydra_device__ decltype(std::declval()+ std::declval() ) operator+(Arg2 const& a2, Arg1 const& a1 ) { typedef decltype(std::declval()+ @@ -376,13 +376,13 @@ operator-( Arg1 const& a1, Arg2 const& a2) { template requires (detail::FunctionArg && !detail::FunctionArg) -__hydra_host__ __hydra_device__ decltype(std::declval()- std::declval() ) +__hydra_host__ __hydra_device__ decltype(std::declval()- std::declval() ) operator-(Arg2 const& a2, Arg1 const& a1 ) { typedef decltype(std::declval()- std::declval() ) return_type; - return a1.Value() - a2; + return a2 - a1.Value(); } template @@ -405,7 +405,7 @@ requires (detail::FunctionArg && !detail::FunctionArg) __hydra_host__ __hydra_device__ decltype(std::declval()* std::declval() ) operator*( Arg1 const& a1, Arg2 const& a2) { - typedef decltype(std::declval()- + typedef decltype(std::declval()* std::declval() ) return_type; return a1.Value() * a2; @@ -413,10 +413,10 @@ operator*( Arg1 const& a1, Arg2 const& a2) { template requires (detail::FunctionArg && !detail::FunctionArg) -__hydra_host__ __hydra_device__ decltype(std::declval()* std::declval() ) +__hydra_host__ __hydra_device__ decltype(std::declval()* std::declval() ) operator*(Arg2 const& a2, Arg1 const& a1 ) { - typedef decltype(std::declval()- + typedef decltype(std::declval()* std::declval() ) return_type; return a1.Value() * a2; @@ -441,7 +441,7 @@ requires (detail::FunctionArg && !detail::FunctionArg) __hydra_host__ __hydra_device__ decltype(std::declval() / std::declval() ) operator/( Arg1 const& a1, Arg2 const& a2) { - typedef decltype(std::declval()- + typedef decltype(std::declval()/ std::declval() ) return_type; return a1.Value() / a2; @@ -449,13 +449,13 @@ operator/( Arg1 const& a1, Arg2 const& a2) { template requires (detail::FunctionArg && !detail::FunctionArg) -__hydra_host__ __hydra_device__ decltype(std::declval() / std::declval() ) +__hydra_host__ __hydra_device__ decltype(std::declval() / std::declval() ) operator/(Arg2 const& a2, Arg1 const& a1 ) { - typedef decltype(std::declval()- + typedef decltype(std::declval()/ std::declval() ) return_type; - return a1.Value() / a2; + return a2 / a1.Value(); } template