*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor();
/**
template <int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor()
// Some auto-differentiable numbers need explicit
// zero initialization such as adtl::adouble.
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor(const OtherNumber &initializer)
: value(internal::NumberType<Number>::value(initializer))
{}
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor(const Tensor<0, dim, OtherNumber> &p)
: Tensor{p.value}
{}
# ifdef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG
template <int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor(const Tensor<0, dim, Number> &other)
: value{other.value}
{}
template <int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor(Tensor<0, dim, Number> &&other) noexcept
: value{std::move(other.value)}
{}
template <int dim, typename Number>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, Number>::operator Number &()
{
// We cannot use Assert inside a CUDA kernel
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator=(const Tensor<0, dim, OtherNumber> &p)
{
value = internal::NumberType<Number>::value(p.value);
# if defined(__INTEL_COMPILER) || defined(DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG)
template <int dim, typename Number>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator=(const Tensor<0, dim, Number> &p)
{
value = p.value;
# ifdef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG
template <int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator=(Tensor<0, dim, Number> &&other) noexcept
{
value = std::move(other.value);
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator=(const OtherNumber &d)
{
value = internal::NumberType<Number>::value(d);
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator+=(const Tensor<0, dim, OtherNumber> &p)
{
value += p.value;
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator-=(const Tensor<0, dim, OtherNumber> &p)
{
value -= p.value;
namespace ComplexWorkaround
{
template <typename Number, typename OtherNumber>
- constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV void
+ constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE void
multiply_assign_scalar(Number &val, const OtherNumber &s)
{
val *= s;
# ifdef __CUDA_ARCH__
template <typename Number, typename OtherNumber>
- constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV void
+ constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE void
multiply_assign_scalar(std::complex<Number> &, const OtherNumber &)
{
printf("This function is not implemented for std::complex<Number>!\n");
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator*=(const OtherNumber &s)
{
internal::ComplexWorkaround::multiply_assign_scalar(value, s);
template <int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV Tensor<0, dim, Number>
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number>
Tensor<0, dim, Number>::operator-() const
{
return -value;
template <int rank_, int dim, typename Number>
template <typename ArrayLike, std::size_t... indices>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<rank_, dim, Number>::Tensor(const ArrayLike &initializer,
std::index_sequence<indices...>)
: values{Tensor<rank_ - 1, dim, Number>(initializer[indices])...}
template <int rank_, int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<rank_, dim, Number>::Tensor()
// We would like to use =default, but this causes compile errors with some
// MSVC versions and internal compiler errors with -O1 in gcc 5.4.
template <int rank_, int dim, typename Number>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<rank_, dim, Number>::Tensor(const array_type &initializer)
: Tensor(initializer, std::make_index_sequence<dim>{})
{}
template <int rank_, int dim, typename Number>
template <typename ElementType, typename MemorySpace>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<rank_, dim, Number>::Tensor(
const ArrayView<ElementType, MemorySpace> &initializer)
{
template <int rank_, int dim, typename Number>
template <typename OtherNumber>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<rank_, dim, Number>::Tensor(
const Tensor<rank_, dim, OtherNumber> &initializer)
: Tensor(initializer, std::make_index_sequence<dim>{})
namespace TensorSubscriptor
{
template <typename ArrayElementType, int dim>
- constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV ArrayElementType &
+ constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE ArrayElementType &
subscript(ArrayElementType * values,
const unsigned int i,
std::integral_constant<int, dim>)
}
template <typename ArrayElementType>
- constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV ArrayElementType &
+ constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE ArrayElementType &
subscript(ArrayElementType *dummy,
const unsigned int,
std::integral_constant<int, 0>)
template <int rank_, int dim, typename Number>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE
typename Tensor<rank_, dim, Number>::value_type &
Tensor<rank_, dim, Number>::operator[](const unsigned int i)
{
template <int rank_, int dim, typename Number>
-constexpr inline DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr inline DEAL_II_HOST_DEV_ALWAYS_INLINE
typename numbers::NumberTraits<Number>::real_type
Tensor<rank_, dim, Number>::norm_square() const
{
* @relatesalso Tensor
*/
template <int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, typename ProductType<Number, OtherNumber>::type>
operator+(const Tensor<0, dim, Number> & p,
const Tensor<0, dim, OtherNumber> &q)
* @relatesalso Tensor
*/
template <int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_ALWAYS_INLINE DEAL_II_HOST_DEV
+constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
Tensor<0, dim, typename ProductType<Number, OtherNumber>::type>
operator-(const Tensor<0, dim, Number> & p,
const Tensor<0, dim, OtherNumber> &q)