Skip to content
Snippets Groups Projects
Commit c00a8a00 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Removed useless copies in det functions

parent 9c1d9917
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment