From c00a8a00afd8bcdb42479ba4e15f7a00642d8faf Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Wed, 20 Jun 2018 16:21:43 +0200 Subject: [PATCH] Removed useless copies in det functions --- src/algebra/TinyMatrix.hpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/algebra/TinyMatrix.hpp b/src/algebra/TinyMatrix.hpp index 0e6cdb822..0dd42769d 100644 --- a/src/algebra/TinyMatrix.hpp +++ b/src/algebra/TinyMatrix.hpp @@ -336,8 +336,6 @@ KOKKOS_INLINE_FUNCTION T det(const TinyMatrix<1,T>& A) { static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); - TinyMatrix<1,T> M=A; - return A(0,0); } @@ -346,8 +344,6 @@ KOKKOS_INLINE_FUNCTION T det(const TinyMatrix<2,T>& A) { static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); - TinyMatrix<2,T> M=A; - return A(0,0)*A(1,1)-A(1,0)*A(0,1); } @@ -356,8 +352,6 @@ KOKKOS_INLINE_FUNCTION T det(const TinyMatrix<3,T>& A) { static_assert(std::is_arithmetic<T>::value, "determinent is not defined for non arithmetic types"); - TinyMatrix<3,T> M=A; - return A(0,0)*(A(1,1)*A(2,2)-A(2,1)*A(1,2)) -A(1,0)*(A(0,1)*A(2,2)-A(2,1)*A(0,2)) -- GitLab