*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV
+ DEAL_II_HOST_DEVICE
Point();
/**
* Convert a tensor to a point.
*/
- explicit DEAL_II_HOST_DEV
+ explicit DEAL_II_HOST_DEVICE
Point(const Tensor<1, dim, Number> &);
/**
*
* @note This function can also be used in CUDA device code.
*/
- explicit DEAL_II_HOST_DEV
+ explicit DEAL_II_HOST_DEVICE
Point(const Number x);
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV
+ DEAL_II_HOST_DEVICE
Point(const Number x, const Number y);
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV
+ DEAL_II_HOST_DEVICE
Point(const Number x, const Number y, const Number z);
/**
*
* @note This function can also be used in CUDA device code.
*/
- static DEAL_II_HOST_DEV Point<dim, Number>
- unit_vector(const unsigned int i);
+ static DEAL_II_HOST_DEVICE Point<dim, Number>
+ unit_vector(const unsigned int i);
/**
* Read access to the <tt>index</tt>th coordinate.
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Number
+ DEAL_II_HOST_DEVICE Number
operator()(const unsigned int index) const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Number &
- operator()(const unsigned int index);
+ DEAL_II_HOST_DEVICE Number &
+ operator()(const unsigned int index);
/**
* Assignment operator from Tensor<1, dim, Number> with different underlying
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Point<dim, Number>
- operator+(const Tensor<1, dim, Number> &) const;
+ DEAL_II_HOST_DEVICE Point<dim, Number>
+ operator+(const Tensor<1, dim, Number> &) const;
/**
* Subtract two points, i.e., obtain the vector that connects the two. As
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Tensor<1, dim, Number>
- operator-(const Point<dim, Number> &) const;
+ DEAL_II_HOST_DEVICE Tensor<1, dim, Number>
+ operator-(const Point<dim, Number> &) const;
/**
* Subtract a difference vector (represented by a Tensor@<1,dim@>) from the
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Point<dim, Number>
- operator-(const Tensor<1, dim, Number> &) const;
+ DEAL_II_HOST_DEVICE Point<dim, Number>
+ operator-(const Tensor<1, dim, Number> &) const;
/**
* The opposite vector.
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Point<dim, Number>
- operator-() const;
+ DEAL_II_HOST_DEVICE Point<dim, Number>
+ operator-() const;
/**
* @}
* @relatesalso EnableIfScalar
*/
template <typename OtherNumber>
- DEAL_II_HOST_DEV Point<
+ DEAL_II_HOST_DEVICE Point<
dim,
typename ProductType<Number,
typename EnableIfScalar<OtherNumber>::type>::type>
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- DEAL_II_HOST_DEV Point<
+ DEAL_II_HOST_DEVICE Point<
dim,
typename ProductType<Number,
typename EnableIfScalar<OtherNumber>::type>::type>
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV Number
+ DEAL_II_HOST_DEVICE Number
operator*(const Tensor<1, dim, Number> &p) const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
+ DEAL_II_HOST_DEVICE typename numbers::NumberTraits<Number>::real_type
square() const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
+ DEAL_II_HOST_DEVICE typename numbers::NumberTraits<Number>::real_type
distance(const Point<dim, Number> &p) const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
+ DEAL_II_HOST_DEVICE typename numbers::NumberTraits<Number>::real_type
distance_square(const Point<dim, Number> &p) const;
/**
// At least clang-3.7 requires us to have a user-defined constructor
// and we can't use 'Point<dim,Number>::Point () = default' here.
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim, Number>::Point() // NOLINT
{}
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim, Number>::Point(const Tensor<1, dim, Number> &t)
: Tensor<1, dim, Number>(t)
{}
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim, Number>::Point(const Number x)
{
# ifndef __CUDA_ARCH__
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim, Number>::Point(const Number x, const Number y)
{
# ifndef __CUDA_ARCH__
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim, Number>::Point(const Number x, const Number y, const Number z)
{
# ifndef __CUDA_ARCH__
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Point<dim, Number>
- Point<dim, Number>::unit_vector(unsigned int i)
+inline DEAL_II_HOST_DEVICE Point<dim, Number>
+ Point<dim, Number>::unit_vector(unsigned int i)
{
Point<dim, Number> p;
p[i] = 1.;
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Number
+inline DEAL_II_HOST_DEVICE Number
Point<dim, Number>::operator()(const unsigned int index) const
{
# ifndef __CUDA_ARCH__
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Number &
+inline DEAL_II_HOST_DEVICE Number &
Point<dim, Number>::operator()(const unsigned int index)
{
# ifndef __CUDA_ARCH__
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Point<dim, Number>
+inline DEAL_II_HOST_DEVICE Point<dim, Number>
Point<dim, Number>::operator+(const Tensor<1, dim, Number> &p) const
{
Point<dim, Number> tmp = *this;
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Tensor<1, dim, Number>
+inline DEAL_II_HOST_DEVICE Tensor<1, dim, Number>
Point<dim, Number>::operator-(const Point<dim, Number> &p) const
{
return (Tensor<1, dim, Number>(*this) -= p);
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Point<dim, Number>
+inline DEAL_II_HOST_DEVICE Point<dim, Number>
Point<dim, Number>::operator-(const Tensor<1, dim, Number> &p) const
{
Point<dim, Number> tmp = *this;
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Point<dim, Number>
+inline DEAL_II_HOST_DEVICE Point<dim, Number>
Point<dim, Number>::operator-() const
{
Point<dim, Number> result;
template <int dim, typename Number>
template <typename OtherNumber>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim,
typename ProductType<Number,
typename EnableIfScalar<OtherNumber>::type>::type>
template <int dim, typename Number>
template <typename OtherNumber>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim,
typename ProductType<Number,
typename EnableIfScalar<OtherNumber>::type>::type>
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV Number
+inline DEAL_II_HOST_DEVICE Number
Point<dim, Number>::operator*(const Tensor<1, dim, Number> &p) const
{
Number res = Number();
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
+inline DEAL_II_HOST_DEVICE typename numbers::NumberTraits<Number>::real_type
Point<dim, Number>::square() const
{
return this->norm_square();
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
+inline DEAL_II_HOST_DEVICE typename numbers::NumberTraits<Number>::real_type
Point<dim, Number>::distance(const Point<dim, Number> &p) const
{
return std::sqrt(distance_square(p));
template <int dim, typename Number>
-inline DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
+inline DEAL_II_HOST_DEVICE typename numbers::NumberTraits<Number>::real_type
Point<dim, Number>::distance_square(const Point<dim, Number> &p) const
{
Number sum = internal::NumberType<Number>::value(0.0);
* @relates Point
*/
template <int dim, typename Number, typename OtherNumber>
-inline DEAL_II_HOST_DEV
+inline DEAL_II_HOST_DEVICE
Point<dim,
typename ProductType<Number,
typename EnableIfScalar<OtherNumber>::type>::type>
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor();
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor(const Tensor<0, dim, OtherNumber> &initializer);
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor(const OtherNumber &initializer);
#ifdef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG
/**
* Copy constructor
*/
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor(const Tensor<0, dim, Number> &other);
/**
* Move constructor
*/
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor(Tensor<0, dim, Number> &&other) noexcept;
#endif
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
operator Number &();
/**
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV operator const Number &() const;
+ constexpr DEAL_II_HOST_DEVICE operator const Number &() const;
/**
* Assignment from tensors with different underlying scalar type. This
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator=(const Tensor<0, dim, OtherNumber> &rhs);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator=(const Tensor<0, dim, OtherNumber> &rhs);
#if defined(__INTEL_COMPILER) || defined(DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG)
/**
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV Tensor &
- operator=(const Tensor<0, dim, Number> &rhs);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator=(const Tensor<0, dim, Number> &rhs);
#endif
#ifdef DEAL_II_DELETED_MOVE_CONSTRUCTOR_BUG
/**
* Move assignment operator
*/
- constexpr DEAL_II_HOST_DEV Tensor<0, dim, Number> &
- operator=(Tensor<0, dim, Number> &&other) noexcept;
+ constexpr DEAL_II_HOST_DEVICE Tensor<0, dim, Number> &
+ operator=(Tensor<0, dim, Number> &&other) noexcept;
#endif
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator=(const OtherNumber &d);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator=(const OtherNumber &d);
/**
* Test for equality of two tensors.
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator+=(const Tensor<0, dim, OtherNumber> &rhs);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator+=(const Tensor<0, dim, OtherNumber> &rhs);
/**
* Subtract another scalar.
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator-=(const Tensor<0, dim, OtherNumber> &rhs);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator-=(const Tensor<0, dim, OtherNumber> &rhs);
/**
* Multiply the scalar with a <tt>factor</tt>.
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator*=(const OtherNumber &factor);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator*=(const OtherNumber &factor);
/**
* Divide the scalar by <tt>factor</tt>.
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator/=(const OtherNumber &factor);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator/=(const OtherNumber &factor);
/**
* Tensor with inverted entries.
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV Tensor
+ constexpr DEAL_II_HOST_DEVICE Tensor
operator-() const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV real_type
+ constexpr DEAL_II_HOST_DEVICE real_type
norm_square() const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+ constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE
Tensor();
/**
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV explicit Tensor(const array_type &initializer);
+ constexpr DEAL_II_HOST_DEVICE explicit Tensor(const array_type &initializer);
/**
* A constructor where the data is copied from an ArrayView object.
* @note This function can also be used in CUDA device code.
*/
template <typename ElementType, typename MemorySpace>
- constexpr DEAL_II_HOST_DEV explicit Tensor(
+ constexpr DEAL_II_HOST_DEVICE explicit Tensor(
const ArrayView<ElementType, MemorySpace> &initializer);
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor(const Tensor<rank_, dim, OtherNumber> &initializer);
/**
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV value_type &
- operator[](const unsigned int i);
+ constexpr DEAL_II_HOST_DEVICE value_type &
+ operator[](const unsigned int i);
/**
* Read-only access operator.
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV const value_type &
- operator[](const unsigned int i) const;
+ constexpr DEAL_II_HOST_DEVICE const value_type &
+ operator[](const unsigned int i) const;
/**
* Read access using TableIndices <tt>indices</tt>
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
+ constexpr DEAL_II_HOST_DEVICE Tensor &
operator=(const Tensor<rank_, dim, OtherNumber> &rhs);
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
+ constexpr DEAL_II_HOST_DEVICE Tensor &
operator+=(const Tensor<rank_, dim, OtherNumber> &);
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
+ constexpr DEAL_II_HOST_DEVICE Tensor &
operator-=(const Tensor<rank_, dim, OtherNumber> &);
/**
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator*=(const OtherNumber &factor);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator*=(const OtherNumber &factor);
/**
* Scale the vector by <tt>1/factor</tt>.
* @note This function can also be used in CUDA device code.
*/
template <typename OtherNumber>
- constexpr DEAL_II_HOST_DEV Tensor &
- operator/=(const OtherNumber &factor);
+ constexpr DEAL_II_HOST_DEVICE Tensor &
+ operator/=(const OtherNumber &factor);
/**
* Unary minus operator. Negate all entries of a tensor.
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV Tensor
+ constexpr DEAL_II_HOST_DEVICE Tensor
operator-() const;
/**
*
* @note This function can also be used in CUDA device code.
*/
- DEAL_II_HOST_DEV
+ DEAL_II_HOST_DEVICE
typename numbers::NumberTraits<Number>::real_type
norm() const;
*
* @note This function can also be used in CUDA device code.
*/
- constexpr DEAL_II_HOST_DEV typename numbers::NumberTraits<Number>::real_type
- norm_square() const;
+ constexpr DEAL_II_HOST_DEVICE
+ typename numbers::NumberTraits<Number>::real_type
+ norm_square() const;
/**
* Fill a vector with all tensor elements.
* @note This function can also be used in CUDA device code.
*/
template <typename ArrayLike, std::size_t... Indices>
- constexpr DEAL_II_HOST_DEV
+ constexpr DEAL_II_HOST_DEVICE
Tensor(const ArrayLike &initializer, std::index_sequence<Indices...>);
// Allow an arbitrary Tensor to access the underlying values.
template <int dim, typename Number>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor(const Tensor<0, dim, Number> &other)
: value{other.value}
{}
template <int dim, typename Number>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE
Tensor<0, dim, Number>::Tensor(Tensor<0, dim, Number> &&other) noexcept
: value{std::move(other.value)}
{}
template <int dim, typename Number>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE
Tensor<0, dim, Number>::operator Number &()
{
// We cannot use Assert inside a CUDA kernel
template <int dim, typename Number>
constexpr inline DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV Tensor<0, dim, Number>::operator const Number &() const
+ DEAL_II_HOST_DEVICE Tensor<0, dim, Number>::operator const Number &() const
{
// We cannot use Assert inside a CUDA kernel
# ifndef __CUDA_ARCH__
template <int dim, typename Number>
template <typename OtherNumber>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE void
+ constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE void
multiply_assign_scalar(Number &val, const OtherNumber &s)
{
val *= s;
# ifdef __CUDA_ARCH__
template <typename Number, typename OtherNumber>
- constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE void
+ constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number> &
+constexpr DEAL_II_HOST_DEVICE_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>
template <typename OtherNumber>
-constexpr inline DEAL_II_HOST_DEV Tensor<0, dim, Number> &
+constexpr inline DEAL_II_HOST_DEVICE Tensor<0, dim, Number> &
Tensor<0, dim, Number>::operator/=(const OtherNumber &s)
{
value /= s;
template <int dim, typename Number>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE Tensor<0, dim, Number>
+constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor<0, dim, Number>
Tensor<0, dim, Number>::operator-() const
{
return -value;
template <int dim, typename Number>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
typename Tensor<0, dim, Number>::real_type
Tensor<0, dim, Number>::norm_square() const
{
template <int rank_, int dim, typename Number>
template <typename ArrayLike, std::size_t... indices>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_HOST_DEV_ALWAYS_INLINE ArrayElementType &
- subscript(ArrayElementType * values,
- const unsigned int i,
- std::integral_constant<int, dim>)
+ constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE ArrayElementType &
+ subscript(ArrayElementType * values,
+ const unsigned int i,
+ std::integral_constant<int, dim>)
{
// We cannot use Assert in a CUDA kernel
# ifndef __CUDA_ARCH__
}
template <typename ArrayElementType>
- constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE ArrayElementType &
- subscript(ArrayElementType *dummy,
- const unsigned int,
- std::integral_constant<int, 0>)
+ constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE ArrayElementType &
+ subscript(ArrayElementType *dummy,
+ const unsigned int,
+ std::integral_constant<int, 0>)
{
// We cannot use Assert in a CUDA kernel
# ifndef __CUDA_ARCH__
template <int rank_, int dim, typename Number>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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 DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV const typename Tensor<rank_, dim, Number>::value_type &
+ DEAL_II_HOST_DEVICE const typename Tensor<rank_, dim, Number>::value_type &
Tensor<rank_, dim, Number>::operator[](const unsigned int i) const
{
# ifndef DEAL_II_COMPILER_CUDA_AWARE
template <int rank_, int dim, typename Number>
template <typename OtherNumber>
constexpr inline DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV Tensor<rank_, dim, Number> &
+ DEAL_II_HOST_DEVICE Tensor<rank_, dim, Number> &
Tensor<rank_, dim, Number>::operator+=(
const Tensor<rank_, dim, OtherNumber> &p)
{
template <int rank_, int dim, typename Number>
template <typename OtherNumber>
constexpr inline DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV Tensor<rank_, dim, Number> &
+ DEAL_II_HOST_DEVICE Tensor<rank_, dim, Number> &
Tensor<rank_, dim, Number>::operator-=(
const Tensor<rank_, dim, OtherNumber> &p)
{
template <int rank_, int dim, typename Number>
template <typename OtherNumber>
constexpr inline DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV Tensor<rank_, dim, Number> &
+ DEAL_II_HOST_DEVICE Tensor<rank_, dim, Number> &
Tensor<rank_, dim, Number>::operator*=(const OtherNumber &s)
{
for (unsigned int i = 0; i < dim; ++i)
typename ProductType<Number, OtherNumber>::type>::value &&
!std::is_same<Number, Differentiation::SD::Expression>::value,
int> = 0>
- constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE void
+ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE void
division_operator(Tensor<rank, dim, Number> (&t)[dim],
const OtherNumber &factor)
{
typename ProductType<Number, OtherNumber>::type>::value ||
std::is_same<Number, Differentiation::SD::Expression>::value,
int> = 0>
- constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE void
+ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE void
division_operator(Tensor<rank, dim, Number> (&t)[dim],
const OtherNumber &factor)
{
template <int rank_, int dim, typename Number>
template <typename OtherNumber>
constexpr inline DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV Tensor<rank_, dim, Number> &
+ DEAL_II_HOST_DEVICE Tensor<rank_, dim, Number> &
Tensor<rank_, dim, Number>::operator/=(const OtherNumber &s)
{
internal::TensorImplementation::division_operator(values, s);
template <int rank_, int dim, typename Number>
constexpr inline DEAL_II_ALWAYS_INLINE
- DEAL_II_HOST_DEV Tensor<rank_, dim, Number>
+ DEAL_II_HOST_DEVICE Tensor<rank_, dim, Number>
Tensor<rank_, dim, Number>::operator-() const
{
Tensor<rank_, dim, Number> tmp;
template <int rank_, int dim, typename Number>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE
typename numbers::NumberTraits<Number>::real_type
Tensor<rank_, dim, Number>::norm_square() const
{
* @relatesalso Tensor
*/
template <int dim, typename Number, typename Other>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
typename ProductType<Other, Number>::type
operator*(const Other &object, const Tensor<0, dim, Number> &t)
{
* @relatesalso Tensor
*/
template <int dim, typename Number, typename Other>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
typename ProductType<Number, Other>::type
operator*(const Tensor<0, dim, Number> &t, const Other &object)
{
* @relatesalso Tensor
*/
template <int dim, typename Number, typename OtherNumber>
-DEAL_II_HOST_DEV constexpr DEAL_II_ALWAYS_INLINE
+DEAL_II_HOST_DEVICE constexpr DEAL_II_ALWAYS_INLINE
typename ProductType<Number, OtherNumber>::type
operator*(const Tensor<0, dim, Number> & src1,
const Tensor<0, dim, OtherNumber> &src2)
* @relatesalso Tensor
*/
template <int dim, typename Number, typename OtherNumber>
-DEAL_II_HOST_DEV constexpr DEAL_II_ALWAYS_INLINE
+DEAL_II_HOST_DEVICE constexpr DEAL_II_ALWAYS_INLINE
Tensor<0,
dim,
typename ProductType<Number,
* @relatesalso Tensor
*/
template <int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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_HOST_DEV_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE_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 rank, int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
Tensor<rank,
dim,
typename ProductType<Number,
* @relatesalso Tensor
*/
template <int rank, int dim, typename Number, typename OtherNumber>
-DEAL_II_HOST_DEV constexpr inline DEAL_II_ALWAYS_INLINE
+DEAL_II_HOST_DEVICE constexpr inline DEAL_II_ALWAYS_INLINE
Tensor<rank,
dim,
typename ProductType<typename EnableIfScalar<Number>::type,
!std::is_integral<
typename ProductType<Number, OtherNumber>::type>::value,
int> = 0>
- constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
Tensor<rank, dim, typename ProductType<Number, OtherNumber>::type>
division_operator(const Tensor<rank, dim, Number> &t,
const OtherNumber & factor)
std::is_integral<
typename ProductType<Number, OtherNumber>::type>::value,
int> = 0>
- constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+ constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
Tensor<rank, dim, typename ProductType<Number, OtherNumber>::type>
division_operator(const Tensor<rank, dim, Number> &t,
const OtherNumber & factor)
* @relatesalso Tensor
*/
template <int rank, int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
Tensor<rank,
dim,
typename ProductType<Number,
* @relatesalso Tensor
*/
template <int rank, int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
Tensor<rank, dim, typename ProductType<Number, OtherNumber>::type>
operator+(const Tensor<rank, dim, Number> & p,
const Tensor<rank, dim, OtherNumber> &q)
* @relatesalso Tensor
*/
template <int rank, int dim, typename Number, typename OtherNumber>
-constexpr DEAL_II_HOST_DEV inline DEAL_II_ALWAYS_INLINE
+constexpr DEAL_II_HOST_DEVICE inline DEAL_II_ALWAYS_INLINE
Tensor<rank, dim, typename ProductType<Number, OtherNumber>::type>
operator-(const Tensor<rank, dim, Number> & p,
const Tensor<rank, dim, OtherNumber> &q)