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

Replace noexcept by noexcept(NO_ASSERT) for access operators

Fixes #1
parent 0364b78a
No related branches found
No related tags found
No related merge requests found
...@@ -186,14 +186,14 @@ public: ...@@ -186,14 +186,14 @@ public:
} }
KOKKOS_INLINE_FUNCTION KOKKOS_INLINE_FUNCTION
constexpr T& operator()(const size_t& i, const size_t& j) noexcept constexpr T& operator()(const size_t& i, const size_t& j) noexcept(NO_ASSERT)
{ {
Assert((i<N) and (j<N)); Assert((i<N) and (j<N));
return m_values[_index(i,j)]; return m_values[_index(i,j)];
} }
KOKKOS_INLINE_FUNCTION KOKKOS_INLINE_FUNCTION
constexpr const T& operator()(const size_t& i, const size_t& j) const noexcept constexpr const T& operator()(const size_t& i, const size_t& j) const noexcept(NO_ASSERT)
{ {
Assert((i<N) and (j<N)); Assert((i<N) and (j<N));
return m_values[_index(i,j)]; return m_values[_index(i,j)];
...@@ -368,7 +368,7 @@ template <size_t N, typename T> ...@@ -368,7 +368,7 @@ template <size_t N, typename T>
KOKKOS_INLINE_FUNCTION KOKKOS_INLINE_FUNCTION
constexpr TinyMatrix<N-1,T> getMinor(const TinyMatrix<N,T>& A, constexpr TinyMatrix<N-1,T> getMinor(const TinyMatrix<N,T>& A,
const size_t& I, const size_t& I,
const size_t& J) noexcept const size_t& J)
{ {
static_assert(N>=2, "minor calculation requires at least 2x2 matrices"); static_assert(N>=2, "minor calculation requires at least 2x2 matrices");
Assert((I<N) and (J<N)); Assert((I<N) and (J<N));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment