From ed4cef38ae19df5d3e59089316103f1a3504274f Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Sun, 10 Dec 2023 18:20:56 +0100 Subject: [PATCH] Make approxEq take const ref --- include/aidge/utils/TensorUtils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/aidge/utils/TensorUtils.hpp b/include/aidge/utils/TensorUtils.hpp index f2d3eae43..e4da1e12e 100644 --- a/include/aidge/utils/TensorUtils.hpp +++ b/include/aidge/utils/TensorUtils.hpp @@ -33,7 +33,7 @@ namespace Aidge { * @return true if both tensor are approximately equal and have the datatype, shape. Else return false */ template <typename T1, typename T2 = T1> -bool approxEq(Aidge::Tensor t1, Aidge::Tensor t2, float relative, float absolute){ +bool approxEq(const Tensor& t1, const Tensor& t2, float relative, float absolute){ assert(t1.dataType() == NativeType<T1>::type); assert(t2.dataType() == NativeType<T2>::type); assert(relative >= 0); -- GitLab