From: Daniel Arndt Date: Sun, 5 Nov 2023 15:54:37 +0000 (-0500) Subject: Remove workarounds for Assert* in tensor.h X-Git-Tag: relicensing~314^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dab0bc76fa01810919dcab0ec2fd6a40ba31b56;p=dealii.git Remove workarounds for Assert* in tensor.h --- diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 467ad896b0..56eaa02ef5 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -1451,13 +1451,7 @@ constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEVICE const typename Tensor::value_type & Tensor::operator[](const unsigned int i) const { -# if KOKKOS_VERSION < 30700 -# ifdef KOKKOS_ACTIVE_MEMORY_SPACE_HOST AssertIndexRange(i, dim); -# endif -# else - KOKKOS_IF_ON_HOST((AssertIndexRange(i, dim);)) -# endif return values[i]; } @@ -1467,17 +1461,8 @@ template constexpr inline DEAL_II_ALWAYS_INLINE const Number & Tensor::operator[](const TableIndices &indices) const { -# if KOKKOS_VERSION < 30700 -# ifdef KOKKOS_ACTIVE_MEMORY_SPACE_HOST Assert(dim != 0, ExcMessage("Cannot access an object of type Tensor")); -# endif -# else - KOKKOS_IF_ON_HOST( - (Assert(dim != 0, - ExcMessage( - "Cannot access an object of type Tensor"));)) -# endif return TensorAccessors::extract(*this, indices); } @@ -1488,17 +1473,8 @@ template constexpr inline DEAL_II_ALWAYS_INLINE Number & Tensor::operator[](const TableIndices &indices) { -# if KOKKOS_VERSION < 30700 -# ifdef KOKKOS_ACTIVE_MEMORY_SPACE_HOST Assert(dim != 0, ExcMessage("Cannot access an object of type Tensor")); -# endif -# else - KOKKOS_IF_ON_HOST( - (Assert(dim != 0, - ExcMessage( - "Cannot access an object of type Tensor"));)) -# endif return TensorAccessors::extract(*this, indices); }