From: Daniel Arndt Date: Thu, 16 Aug 2018 12:43:28 +0000 (+0200) Subject: Mark functions usable in CUDA kernels differently X-Git-Tag: v9.1.0-rc1~814^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd6ca31a7286ceb5eaa22eeb7635f6e084a2808;p=dealii.git Mark functions usable in CUDA kernels differently --- diff --git a/include/deal.II/base/numbers.h b/include/deal.II/base/numbers.h index 7c5e9a2712..90fc1034ae 100644 --- a/include/deal.II/base/numbers.h +++ b/include/deal.II/base/numbers.h @@ -346,6 +346,8 @@ namespace numbers * Return the complex-conjugate of the given number. Since the general * template is selected if number is not a complex data type, this * function simply returns the given number. + * + * @note This function can also be used in CUDA device code. */ static DEAL_II_CUDA_HOST_DEV const number & conjugate(const number &x); @@ -355,7 +357,7 @@ namespace numbers * general template is chosen for types not equal to std::complex, this * function simply returns the square of the given number. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ static DEAL_II_CUDA_HOST_DEV real_type abs_square(const number &x); diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 558e4ae884..5731d38483 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -140,7 +140,7 @@ public: /** * Constructor. Set to zero. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV Tensor(); @@ -191,7 +191,7 @@ public: * This is the non-const conversion operator that returns a writable * reference. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV operator Number &(); @@ -201,7 +201,7 @@ public: * * This is the const conversion operator that returns a read-only reference. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV operator const Number &() const; @@ -264,7 +264,7 @@ public: /** * Multiply the scalar with a factor. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ template DEAL_II_CUDA_HOST_DEV Tensor & @@ -310,7 +310,7 @@ public: * Return the square of the Frobenius-norm of a tensor, i.e. the sum of the * absolute squares of all entries. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV real_type norm_square() const; @@ -436,7 +436,7 @@ public: /** * Constructor. Initialize all entries to zero. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV Tensor(); @@ -470,14 +470,14 @@ public: /** * Read-Write access operator. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV value_type &operator[](const unsigned int i); /** * Read-only access operator. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV const value_type & operator[](const unsigned int i) const; @@ -566,7 +566,7 @@ public: * Scale the tensor by factor, i.e. multiply all components by * factor. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ template DEAL_II_CUDA_HOST_DEV Tensor & @@ -613,7 +613,7 @@ public: * Return the square of the Frobenius-norm of a tensor, i.e. the sum of the * absolute squares of all entries. * - * @see CUDAWrappers + * @note This function can also be used in CUDA device code. */ DEAL_II_CUDA_HOST_DEV typename numbers::NumberTraits::real_type norm_square() const;