- p = -atan(1/x) ; x < 0
+ p = -atan(1/x)/π ; x < 0
So the procedure is to calculate the cdf for -fabs(x) using the
diff --git a/doc/math.qbk b/doc/math.qbk
index 4b8804dbbb..385c93a5e8 100644
--- a/doc/math.qbk
+++ b/doc/math.qbk
@@ -424,7 +424,7 @@ and use the function's name as the link text.]
[def __usual_accessors __cdf, __pdf, __quantile, __hazard,
- __chf, __mean, __median, __mode, __variance, __sd, __skewness,
+ __chf, __logcdf, __logpdf, __mean, __median, __mode, __variance, __sd, __skewness,
__kurtosis, __kurtosis_excess, __range and __support]
[def __real_concept [link math_toolkit.real_concepts real concept]]
@@ -557,6 +557,7 @@ and as a CD ISBN 0-9504833-2-X 978-0-9504833-2-0, Classification 519.2-dc22.
[include overview/standalone.qbk]
[include overview/result_type_calc.qbk]
[include overview/error_handling.qbk]
+[include overview/gpu.qbk]
[section:compilers_overview Compilers]
[compilers_overview]
diff --git a/doc/overview/gpu.qbk b/doc/overview/gpu.qbk
new file mode 100644
index 0000000000..7fb27e645e
--- /dev/null
+++ b/doc/overview/gpu.qbk
@@ -0,0 +1,67 @@
+[section:gpu Support for GPU programming in Boost.Math]
+
+[h4 GPU Support]
+
+Selected functions, distributions, tools, etc. support running on both host and devices.
+These functions will have the annotation `BOOST_MATH_GPU_ENABLED` or `BOOST_MATH_CUDA_ENABLED` next to their individual documentation.
+Functions marked with `BOOST_MATH_GPU_ENABLED` are tested using CUDA (both NVCC and NVRTC) as well as SYCL to provide a wide range of support.
+Functions marked with `BOOST_MATH_CUDA_ENABLED` are few, but due to its restrictions SYCL is unsupported.
+
+[h4 Policies]
+
+The default policy on all devices is ignore error due to the lack of throwing ability.
+A user can specify their own policy like usual, but when the code is run on device it will be ignored.
+
+[h4 How to build with device support]
+
+When compiling with CUDA or SYCL you will have to ensure that your code is being run inside of a kernel function.
+It is not enough to simply compile existing code with the NVCC compiler to run the code on the device.
+A simple CUDA kernel to run the Beta Distribution CDF on NVCC would be:
+
+ __global__ void cuda_beta_dist(const double* in, double* out, int num_elements)
+ {
+ const int i = blockDim.x * blockIdx.x + threadIdx.x;
+
+ if (i < num_elements)
+ {
+ out[i] = cdf(boost::math::beta_distribution(), in[i]);
+ }
+ }
+
+And on CUDA on NVRTC:
+
+ const char* cuda_kernel = R"(
+ #include
+ extern "C" __global__
+ void test_beta_dist_kernel(const double* in, double* out, int num_elements)
+ {
+ const int i = blockDim.x * blockIdx.x + threadIdx.x;
+ if (i < num_elements)
+ {
+ out[i] = boost::math::cdf(boost::math::beta_distribution(), in[i]);
+ }
+ }
+ )";
+
+And lastly on SYCL:
+
+ void sycl_beta_dist(const double* in, double* out, int num_elements, sycl::queue& q)
+ {
+ q.submit([&](sycl::handler& h) {
+ h.parallel_for(sycl::range<1>(num_elements), [=](sycl::id<1> i) {
+ out[i] = boost::math::cdf(boost::math::beta_distribution(), in[i]);
+ });
+ });
+ }
+
+Once your kernel function has been written then use the framework mechanism for launching the kernel.
+
+[endsect] [/section:gpu Support for GPU programming in Boost.Math]
+
+[/
+ Copyright 2024. Matt Borland
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
diff --git a/doc/quadrature/double_exponential.qbk b/doc/quadrature/double_exponential.qbk
index b4649adbc6..2959b94cd3 100644
--- a/doc/quadrature/double_exponential.qbk
+++ b/doc/quadrature/double_exponential.qbk
@@ -1,5 +1,6 @@
[/
Copyright (c) 2017 Nick Thompson
+Copyright (c) 2024 Matt Borland
Use, modification and distribution are subject to the
Boost Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -538,6 +539,30 @@ This form integrates just fine over (-log([pi]/2), +[infin]) using either the `t
[endsect] [/section:de_caveats Caveats]
+[section:gpu_usage GPU Usage]
+
+``
+ #include
+
+ namespace boost{ namespace math{ namespace quadrature {
+
+ template >
+ __device__ auto exp_sinh_integrate(const F& f, Real a, Real b, Real tolerance, Real* error, Real* L1, boost::math::size_t* levels)
+
+ template >
+ __device__ auto exp_sinh_integrate(const F& f, Real tolerance, Real* error, Real* L1, boost::math::size_t* levels)
+
+}}}
+``
+
+Quadrature is additionally able to run on CUDA (NVCC and NVRTC) platforms.
+The major difference is outlined in the above function signatures.
+When used on device these are free standing functions instead of using OOP like on the host.
+The tables of abscissas and weights are stored in shared read only memory on the device instead of being initialized when the class is constructed.
+An example use case would be in the finite elements method computing a stiffness matrix since it would consist of many different functions.
+
+[endsect] [/section:gpu_usage Usage]
+
[section:de_refes References]
* Hidetosi Takahasi and Masatake Mori, ['Double Exponential Formulas for Numerical Integration] Publ. Res. Inst. Math. Sci., 9 (1974), pp. 721-741.
diff --git a/doc/roots/roots.qbk b/doc/roots/roots.qbk
index a229300690..ea347639b9 100644
--- a/doc/roots/roots.qbk
+++ b/doc/roots/roots.qbk
@@ -1,4 +1,4 @@
-[section:roots_deriv Root Finding With Derivatives: Newton-Raphson, Halley & Schr'''ö'''der]
+[section:roots_deriv Root Finding With Derivatives: Newton-Raphson, Halley & Schroeder]
[h4 Synopsis]
@@ -10,10 +10,10 @@
namespace tools { // Note namespace boost::math::tools.
// Newton-Raphson
template
- T newton_raphson_iterate(F f, T guess, T min, T max, int digits);
+ BOOST_MATH_GPU_ENABLED T newton_raphson_iterate(F f, T guess, T min, T max, int digits);
template
- T newton_raphson_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter);
+ BOOST_MATH_GPU_ENABLED T newton_raphson_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter);
// Halley
template
@@ -22,7 +22,7 @@
template
T halley_iterate(F f, T guess, T min, T max, int digits, std::uintmax_t& max_iter);
- // Schr'''ö'''der
+ // Schroeder
template
T schroder_iterate(F f, T guess, T min, T max, int digits);
@@ -61,7 +61,7 @@ For second-order iterative method ([@http://en.wikipedia.org/wiki/Newton_Raphson
For the third-order methods
([@http://en.wikipedia.org/wiki/Halley%27s_method Halley] and
-Schr'''ö'''der)
+Schroeder)
the `tuple` should have [*three] elements containing the evaluation of
the function and its first and second derivatives.]]
[[T guess] [The initial starting value. A good guess is crucial to quick convergence!]]
@@ -147,7 +147,7 @@ Out of bounds steps revert to bisection of the current bounds.
Under ideal conditions, the number of correct digits trebles with each iteration.
-[h4:schroder Schr'''ö'''der's Method]
+[h4:schroder Schroeder's Method]
Given an initial guess x0 the subsequent values are computed using:
@@ -162,8 +162,8 @@ Out of bounds steps revert to __bisection_wikipedia of the current bounds.
Under ideal conditions, the number of correct digits trebles with each iteration.
-This is Schr'''ö'''der's general result (equation 18 from [@http://drum.lib.umd.edu/handle/1903/577 Stewart, G. W.
-"On Infinitely Many Algorithms for Solving Equations." English translation of Schr'''ö'''der's original paper.
+This is Schroeder's general result (equation 18 from [@http://drum.lib.umd.edu/handle/1903/577 Stewart, G. W.
+"On Infinitely Many Algorithms for Solving Equations." English translation of Schroeder's original paper.
College Park, MD: University of Maryland, Institute for Advanced Computer Studies, Department of Computer Science, 1993].)
This method guarantees at least quadratic convergence (the same as Newton's method), and is known to work well in the presence of multiple roots:
diff --git a/doc/sf/airy.qbk b/doc/sf/airy.qbk
index 5ff4c7cb5e..4756bee2d8 100644
--- a/doc/sf/airy.qbk
+++ b/doc/sf/airy.qbk
@@ -18,10 +18,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` airy_ai(T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_ai(T x);
template
- ``__sf_result`` airy_ai(T x, const Policy&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_ai(T x, const Policy&);
}} // namespaces
@@ -78,10 +78,10 @@ This function is implemented in terms of the Bessel functions using the relation
namespace boost { namespace math {
template
- ``__sf_result`` airy_bi(T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_bi(T x);
template
- ``__sf_result`` airy_bi(T x, const Policy&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_bi(T x, const Policy&);
}} // namespaces
@@ -132,10 +132,10 @@ This function is implemented in terms of the Bessel functions using the relation
namespace boost { namespace math {
template
- ``__sf_result`` airy_ai_prime(T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_ai_prime(T x);
template
- ``__sf_result`` airy_ai_prime(T x, const Policy&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_ai_prime(T x, const Policy&);
}} // namespaces
@@ -186,10 +186,10 @@ This function is implemented in terms of the Bessel functions using the relation
namespace boost { namespace math {
template
- ``__sf_result`` airy_bi_prime(T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_bi_prime(T x);
template
- ``__sf_result`` airy_bi_prime(T x, const Policy&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` airy_bi_prime(T x, const Policy&);
}} // namespaces
@@ -242,23 +242,23 @@ by providing an output iterator.
The signature of the single value functions are:
template
- T airy_ai_zero(
+ BOOST_MATH_GPU_ENABLED T airy_ai_zero(
int m); // 1-based index of zero.
template
- T airy_bi_zero(
+ BOOST_MATH_GPU_ENABLED T airy_bi_zero(
int m); // 1-based index of zero.
and for multiple zeros:
template
- OutputIterator airy_ai_zero(
+ BOOST_MATH_GPU_ENABLED OutputIterator airy_ai_zero(
int start_index, // 1-based index of first zero.
unsigned number_of_zeros, // How many zeros to generate.
OutputIterator out_it); // Destination for zeros.
template
- OutputIterator airy_bi_zero(
+ BOOST_MATH_GPU_ENABLED OutputIterator airy_bi_zero(
int start_index, // 1-based index of zero.
unsigned number_of_zeros, // How many zeros to generate
OutputIterator out_it); // Destination for zeros.
@@ -266,25 +266,25 @@ and for multiple zeros:
There are also versions which allow control of the __policy_section for error handling and precision.
template
- T airy_ai_zero(
+ BOOST_MATH_GPU_ENABLED T airy_ai_zero(
int m, // 1-based index of zero.
const Policy&); // Policy to use.
template
- T airy_bi_zero(
+ BOOST_MATH_GPU_ENABLED T airy_bi_zero(
int m, // 1-based index of zero.
const Policy&); // Policy to use.
template
- OutputIterator airy_ai_zero(
+ BOOST_MATH_GPU_ENABLED OutputIterator airy_ai_zero(
int start_index, // 1-based index of first zero.
unsigned number_of_zeros, // How many zeros to generate.
OutputIterator out_it, // Destination for zeros.
const Policy& pol); // Policy to use.
template
- OutputIterator airy_bi_zero(
+ BOOST_MATH_GPU_ENABLED OutputIterator airy_bi_zero(
int start_index, // 1-based index of zero.
unsigned number_of_zeros, // How many zeros to generate.
OutputIterator out_it, // Destination for zeros.
diff --git a/doc/sf/bessel_ik.qbk b/doc/sf/bessel_ik.qbk
index d044ac7b80..9fa4e63a74 100644
--- a/doc/sf/bessel_ik.qbk
+++ b/doc/sf/bessel_ik.qbk
@@ -5,16 +5,16 @@
`#include `
template
- ``__sf_result`` cyl_bessel_i(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_bessel_i(T1 v, T2 x);
template
- ``__sf_result`` cyl_bessel_i(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_bessel_i(T1 v, T2 x, const ``__Policy``&);
template
- ``__sf_result`` cyl_bessel_k(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_bessel_k(T1 v, T2 x);
template
- ``__sf_result`` cyl_bessel_k(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_bessel_k(T1 v, T2 x, const ``__Policy``&);
[h4 Description]
diff --git a/doc/sf/bessel_jy.qbk b/doc/sf/bessel_jy.qbk
index 1f43bc7580..faf8788500 100644
--- a/doc/sf/bessel_jy.qbk
+++ b/doc/sf/bessel_jy.qbk
@@ -5,16 +5,16 @@
`#include `
template
- ``__sf_result`` cyl_bessel_j(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_bessel_j(T1 v, T2 x);
template
- ``__sf_result`` cyl_bessel_j(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_bessel_j(T1 v, T2 x, const ``__Policy``&);
template
- ``__sf_result`` cyl_neumann(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_neumann(T1 v, T2 x);
template
- ``__sf_result`` cyl_neumann(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` cyl_neumann(T1 v, T2 x, const ``__Policy``&);
[h4 Description]
diff --git a/doc/sf/bessel_spherical.qbk b/doc/sf/bessel_spherical.qbk
index e9cda89c70..eb1fa69154 100644
--- a/doc/sf/bessel_spherical.qbk
+++ b/doc/sf/bessel_spherical.qbk
@@ -5,16 +5,16 @@
`#include `
template
- ``__sf_result`` sph_bessel(unsigned v, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` sph_bessel(unsigned v, T2 x);
template
- ``__sf_result`` sph_bessel(unsigned v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` sph_bessel(unsigned v, T2 x, const ``__Policy``&);
template
- ``__sf_result`` sph_neumann(unsigned v, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` sph_neumann(unsigned v, T2 x);
template
- ``__sf_result`` sph_neumann(unsigned v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` sph_neumann(unsigned v, T2 x, const ``__Policy``&);
[h4 Description]
diff --git a/doc/sf/beta.qbk b/doc/sf/beta.qbk
index e332fa5030..7e1904c254 100644
--- a/doc/sf/beta.qbk
+++ b/doc/sf/beta.qbk
@@ -9,10 +9,10 @@
namespace boost{ namespace math{
template
- ``__sf_result`` beta(T1 a, T2 b);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` beta(T1 a, T2 b);
template
- ``__sf_result`` beta(T1 a, T2 b, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` beta(T1 a, T2 b, const ``__Policy``&);
}} // namespaces
diff --git a/doc/sf/beta_derivative.qbk b/doc/sf/beta_derivative.qbk
index 8606d6f2b3..5d3b9a13ef 100644
--- a/doc/sf/beta_derivative.qbk
+++ b/doc/sf/beta_derivative.qbk
@@ -9,10 +9,10 @@
namespace boost{ namespace math{
template
- ``__sf_result`` ibeta_derivative(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_derivative(T1 a, T2 b, T3 x);
template
- ``__sf_result`` ibeta_derivative(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_derivative(T1 a, T2 b, T3 x, const ``__Policy``&);
}} // namespaces
diff --git a/doc/sf/digamma.qbk b/doc/sf/digamma.qbk
index c88c5fe7b0..78b68403d8 100644
--- a/doc/sf/digamma.qbk
+++ b/doc/sf/digamma.qbk
@@ -9,10 +9,10 @@
namespace boost{ namespace math{
template
- ``__sf_result`` digamma(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` digamma(T z);
template
- ``__sf_result`` digamma(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` digamma(T z, const ``__Policy``&);
}} // namespaces
diff --git a/doc/sf/ellint_carlson.qbk b/doc/sf/ellint_carlson.qbk
index ca39cd6bef..db45697463 100644
--- a/doc/sf/ellint_carlson.qbk
+++ b/doc/sf/ellint_carlson.qbk
@@ -17,10 +17,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)
template
- ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)
}} // namespaces
@@ -32,10 +32,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)
template
- ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)
}} // namespaces
@@ -47,10 +47,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)
template
- ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)
}} // namespaces
@@ -62,10 +62,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` ellint_rc(T1 x, T2 y)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y)
template
- ``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)
}} // namespaces
@@ -76,10 +76,10 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)
template
- ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)
}} // namespaces
@@ -98,10 +98,10 @@ when the arguments are of different types: otherwise the return is the same type
as the arguments.
template
- ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z)
template
- ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rf(T1 x, T2 y, T3 z, const ``__Policy``&)
Returns Carlson's Elliptic Integral ['R[sub F]]:
@@ -113,10 +113,10 @@ one may be zero. Otherwise returns the result of __domain_error.
[optional_policy]
template
- ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z)
template
- ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rd(T1 x, T2 y, T3 z, const ``__Policy``&)
Returns Carlson's elliptic integral R[sub D]:
@@ -128,10 +128,10 @@ zero, and that z >= 0. Otherwise returns the result of __domain_error.
[optional_policy]
template
- ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p)
template
- ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rj(T1 x, T2 y, T3 z, T4 p, const ``__Policy``&)
Returns Carlson's elliptic integral R[sub J]:
@@ -149,10 +149,10 @@ using the relation:
[equation ellint17]
template
- ``__sf_result`` ellint_rc(T1 x, T2 y)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y)
template
- ``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rc(T1 x, T2 y, const ``__Policy``&)
Returns Carlson's elliptic integral R[sub C]:
@@ -170,10 +170,10 @@ using the relation:
[equation ellint18]
template
- ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z)
template
- ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_rg(T1 x, T2 y, T3 z, const ``__Policy``&)
Returns Carlson's elliptic integral ['R[sub G]:]
diff --git a/doc/sf/ellint_legendre.qbk b/doc/sf/ellint_legendre.qbk
index c780a9b019..50b633af9f 100644
--- a/doc/sf/ellint_legendre.qbk
+++ b/doc/sf/ellint_legendre.qbk
@@ -17,16 +17,16 @@ LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
namespace boost { namespace math {
template
- ``__sf_result`` ellint_1(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi);
template
- ``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);
template
- ``__sf_result`` ellint_1(T k);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k);
template
- ``__sf_result`` ellint_1(T k, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k, const ``__Policy``&);
}} // namespaces
@@ -42,10 +42,10 @@ when T1 and T2 are different types: when they are the same type then the result
is the same type as the arguments.
template
- ``__sf_result`` ellint_1(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi);
template
- ``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T1 k, T2 phi, const ``__Policy``&);
Returns the incomplete elliptic integral of the first kind ['F([phi], k)]:
@@ -56,10 +56,10 @@ Requires k[super 2]sin[super 2](phi) < 1, otherwise returns the result of __doma
[optional_policy]
template
- ``__sf_result`` ellint_1(T k);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k);
template
- ``__sf_result`` ellint_1(T k, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_1(T k, const ``__Policy``&);
Returns the complete elliptic integral of the first kind ['K(k)]:
@@ -123,16 +123,16 @@ and
namespace boost { namespace math {
template
- ``__sf_result`` ellint_2(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi);
template
- ``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);
template
- ``__sf_result`` ellint_2(T k);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k);
template
- ``__sf_result`` ellint_2(T k, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k, const ``__Policy``&);
}} // namespaces
@@ -148,10 +148,10 @@ when T1 and T2 are different types: when they are the same type then the result
is the same type as the arguments.
template
- ``__sf_result`` ellint_2(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi);
template
- ``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T1 k, T2 phi, const ``__Policy``&);
Returns the incomplete elliptic integral of the second kind ['E([phi], k)]:
@@ -162,10 +162,10 @@ Requires k[super 2]sin[super 2](phi) < 1, otherwise returns the result of __doma
[optional_policy]
template
- ``__sf_result`` ellint_2(T k);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k);
template
- ``__sf_result`` ellint_2(T k, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_2(T k, const ``__Policy``&);
Returns the complete elliptic integral of the second kind ['E(k)]:
@@ -230,16 +230,16 @@ and
namespace boost { namespace math {
template
- ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);
template
- ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);
template
- ``__sf_result`` ellint_3(T1 k, T2 n);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n);
template
- ``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);
}} // namespaces
@@ -255,10 +255,10 @@ when the arguments are of different types: when they are the same type then the
is the same type as the arguments.
template
- ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi);
template
- ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, T3 phi, const ``__Policy``&);
Returns the incomplete elliptic integral of the third kind ['[Pi](n, [phi], k)]:
@@ -271,10 +271,10 @@ would be complex).
[optional_policy]
template
- ``__sf_result`` ellint_3(T1 k, T2 n);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n);
template
- ``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);
+ BOOST_MATH_CUDA_ENABLED ``__sf_result`` ellint_3(T1 k, T2 n, const ``__Policy``&);
Returns the complete elliptic integral of the first kind ['[Pi](n, k)]:
@@ -355,16 +355,16 @@ and
namespace boost { namespace math {
template
- ``__sf_result`` ellint_d(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, T2 phi);
template
- ``__sf_result`` ellint_d(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, T2 phi, const ``__Policy``&);
template
- ``__sf_result`` ellint_d(T1 k);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k);
template
- ``__sf_result`` ellint_d(T1 k, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, const ``__Policy``&);
}} // namespaces
@@ -378,10 +378,10 @@ when the arguments are of different types: when they are the same type then the
is the same type as the arguments.
template
- ``__sf_result`` ellint_d(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, T2 phi);
template
- ``__sf_result`` ellint_3(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_3(T1 k, T2 phi, const ``__Policy``&);
Returns the incomplete elliptic integral:
@@ -394,10 +394,10 @@ would be complex).
[optional_policy]
template
- ``__sf_result`` ellint_d(T1 k);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k);
template
- ``__sf_result`` ellint_d(T1 k, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ellint_d(T1 k, const ``__Policy``&);
Returns the complete elliptic integral ['D(k) = D([pi]/2, k)]
@@ -463,10 +463,10 @@ using the relation:
namespace boost { namespace math {
template
- ``__sf_result`` jacobi_zeta(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` jacobi_zeta(T1 k, T2 phi);
template
- ``__sf_result`` jacobi_zeta(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` jacobi_zeta(T1 k, T2 phi, const ``__Policy``&);
}} // namespaces
@@ -543,10 +543,10 @@ is [@../../example/jacobi_zeta_example.cpp jacobi_zeta_example.cpp].
namespace boost { namespace math {
template
- ``__sf_result`` heuman_lambda(T1 k, T2 phi);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` heuman_lambda(T1 k, T2 phi);
template
- ``__sf_result`` heuman_lambda(T1 k, T2 phi, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` heuman_lambda(T1 k, T2 phi, const ``__Policy``&);
}} // namespaces
diff --git a/doc/sf/erf.qbk b/doc/sf/erf.qbk
index 3207b66c07..5f6bdf9fa5 100644
--- a/doc/sf/erf.qbk
+++ b/doc/sf/erf.qbk
@@ -9,16 +9,16 @@
namespace boost{ namespace math{
template
- ``__sf_result`` erf(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf(T z);
template
- ``__sf_result`` erf(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf(T z, const ``__Policy``&);
template
- ``__sf_result`` erfc(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc(T z);
template
- ``__sf_result`` erfc(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc(T z, const ``__Policy``&);
}} // namespaces
@@ -30,10 +30,10 @@ the return type is `double` if T is an integer type, and T otherwise.
[h4 Description]
template
- ``__sf_result`` erf(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf(T z);
template
- ``__sf_result`` erf(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf(T z, const ``__Policy``&);
Returns the [@http://en.wikipedia.org/wiki/Error_function error function]
[@http://functions.wolfram.com/GammaBetaErf/Erf/ erf] of z:
@@ -43,10 +43,10 @@ Returns the [@http://en.wikipedia.org/wiki/Error_function error function]
[graph erf]
template
- ``__sf_result`` erfc(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc(T z);
template
- ``__sf_result`` erfc(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc(T z, const ``__Policy``&);
Returns the complement of the [@http://functions.wolfram.com/GammaBetaErf/Erfc/ error function] of z:
diff --git a/doc/sf/erf_inv.qbk b/doc/sf/erf_inv.qbk
index 729ec22d28..e8f7464e09 100644
--- a/doc/sf/erf_inv.qbk
+++ b/doc/sf/erf_inv.qbk
@@ -9,16 +9,16 @@
namespace boost{ namespace math{
template
- ``__sf_result`` erf_inv(T p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf_inv(T p);
template
- ``__sf_result`` erf_inv(T p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf_inv(T p, const ``__Policy``&);
template
- ``__sf_result`` erfc_inv(T p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc_inv(T p);
template
- ``__sf_result`` erfc_inv(T p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc_inv(T p, const ``__Policy``&);
}} // namespaces
@@ -30,10 +30,10 @@ the return type is `double` if T is an integer type, and T otherwise.
[h4 Description]
template
- ``__sf_result`` erf_inv(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf_inv(T z);
template
- ``__sf_result`` erf_inv(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erf_inv(T z, const ``__Policy``&);
Returns the [@http://functions.wolfram.com/GammaBetaErf/InverseErf/ inverse error function]
of z, that is a value x such that:
@@ -43,10 +43,10 @@ of z, that is a value x such that:
[graph erf_inv]
template
- ``__sf_result`` erfc_inv(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc_inv(T z);
template
- ``__sf_result`` erfc_inv(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` erfc_inv(T z, const ``__Policy``&);
Returns the inverse of the complement of the error function of z, that is a
value x such that:
diff --git a/doc/sf/expint.qbk b/doc/sf/expint.qbk
index 89554730d5..f0abf090e7 100644
--- a/doc/sf/expint.qbk
+++ b/doc/sf/expint.qbk
@@ -11,10 +11,10 @@
namespace boost{ namespace math{
template
- ``__sf_result`` expint(unsigned n, T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(unsigned n, T z);
template
- ``__sf_result`` expint(unsigned n, T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(unsigned n, T z, const ``__Policy``&);
}} // namespaces
@@ -26,10 +26,10 @@ the return type is `double` if T is an integer type, and T otherwise.
[h4 Description]
template
- ``__sf_result`` expint(unsigned n, T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(unsigned n, T z);
template
- ``__sf_result`` expint(unsigned n, T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(unsigned n, T z, const ``__Policy``&);
Returns the [@http://mathworld.wolfram.com/En-Function.html exponential integral En]
of z:
@@ -100,10 +100,10 @@ is used.
namespace boost{ namespace math{
template
- ``__sf_result`` expint(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(T z);
template
- ``__sf_result`` expint(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(T z, const ``__Policy``&);
}} // namespaces
@@ -115,10 +115,10 @@ the return type is `double` if T is an integer type, and T otherwise.
[h4 Description]
template
- ``__sf_result`` expint(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(T z);
template
- ``__sf_result`` expint(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` expint(T z, const ``__Policy``&);
Returns the [@http://mathworld.wolfram.com/ExponentialIntegral.html exponential integral]
of z:
diff --git a/doc/sf/gamma_derivatives.qbk b/doc/sf/gamma_derivatives.qbk
index c7dd248799..1b578d8d98 100644
--- a/doc/sf/gamma_derivatives.qbk
+++ b/doc/sf/gamma_derivatives.qbk
@@ -9,10 +9,10 @@
namespace boost{ namespace math{
template
- ``__sf_result`` gamma_p_derivative(T1 a, T2 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_derivative(T1 a, T2 x);
template
- ``__sf_result`` gamma_p_derivative(T1 a, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_derivative(T1 a, T2 x, const ``__Policy``&);
}} // namespaces
diff --git a/doc/sf/gamma_ratios.qbk b/doc/sf/gamma_ratios.qbk
index a3fcf864cb..0d076890d3 100644
--- a/doc/sf/gamma_ratios.qbk
+++ b/doc/sf/gamma_ratios.qbk
@@ -7,26 +7,26 @@
namespace boost{ namespace math{
template
- ``__sf_result`` tgamma_ratio(T1 a, T2 b);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_ratio(T1 a, T2 b);
template
- ``__sf_result`` tgamma_ratio(T1 a, T2 b, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_ratio(T1 a, T2 b, const ``__Policy``&);
template
- ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta);
template
- ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta, const ``__Policy``&);
}} // namespaces
[h4 Description]
template
- ``__sf_result`` tgamma_ratio(T1 a, T2 b);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_ratio(T1 a, T2 b);
template
- ``__sf_result`` tgamma_ratio(T1 a, T2 b, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_ratio(T1 a, T2 b, const ``__Policy``&);
Returns the ratio of gamma functions:
@@ -37,10 +37,10 @@ Returns the ratio of gamma functions:
Internally this just calls `tgamma_delta_ratio(a, b-a)`.
template
- ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta);
template
- ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_delta_ratio(T1 a, T2 delta, const ``__Policy``&);
Returns the ratio of gamma functions:
diff --git a/doc/sf/gegenbauer.qbk b/doc/sf/gegenbauer.qbk
index a6afc53d82..69671917c8 100644
--- a/doc/sf/gegenbauer.qbk
+++ b/doc/sf/gegenbauer.qbk
@@ -16,13 +16,13 @@
namespace boost{ namespace math{
template
- Real gegenbauer(unsigned n, Real lambda, Real x);
+ BOOST_MATH_GPU_ENABLED Real gegenbauer(unsigned n, Real lambda, Real x);
template
- Real gegenbauer_prime(unsigned n, Real lambda, Real x);
+ BOOST_MATH_GPU_ENABLED Real gegenbauer_prime(unsigned n, Real lambda, Real x);
template
- Real gegenbauer_derivative(unsigned n, Real lambda, Real x, unsigned k);
+ BOOST_MATH_GPU_ENABLED Real gegenbauer_derivative(unsigned n, Real lambda, Real x, unsigned k);
}} // namespaces
diff --git a/doc/sf/hankel.qbk b/doc/sf/hankel.qbk
index 4d8a5eda1e..05d65201b1 100644
--- a/doc/sf/hankel.qbk
+++ b/doc/sf/hankel.qbk
@@ -3,18 +3,36 @@
[h4 Synopsis]
+ #if !defined(__CUDACC__) && !defined(__CUDACC_RTC__)
+
template
- std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x);
template
- std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x, const ``__Policy``&);
template
- std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x);
template
- std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x, const ``__Policy``&);
+ #else // When using cuda we use namespace cuda::std:: instead of std::
+
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x);
+
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> cyl_hankel_1(T1 v, T2 x, const ``__Policy``&);
+
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x);
+
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> cyl_hankel_2(T1 v, T2 x, const ``__Policy``&);
+
+ #endif
+
[h4 Description]
@@ -77,18 +95,35 @@ routines for integer order are used.
[h4 Synopsis]
+ #if !defined(__CUDACC__) && !defined(__CUDACC_RTC__)
+
template
- std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x);
template
- std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x, const ``__Policy``&);
template
- std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x);
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x);
+
+ template
+ BOOST_MATH_GPU_ENABLED std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x, const ``__Policy``&);
+ #else // When using cuda we use namespace cuda::std:: instead of std::
+
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x);
+
template
- std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> sph_hankel_1(T1 v, T2 x, const ``__Policy``&);
+
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x);
+ template
+ BOOST_MATH_GPU_ENABLED cuda::std::complex<``__sf_result``> sph_hankel_2(T1 v, T2 x, const ``__Policy``&);
+
+ #endif
[h4 Description]
diff --git a/doc/sf/hermite.qbk b/doc/sf/hermite.qbk
index c88aadc344..965aa80928 100644
--- a/doc/sf/hermite.qbk
+++ b/doc/sf/hermite.qbk
@@ -9,13 +9,13 @@
namespace boost{ namespace math{
template
- ``__sf_result`` hermite(unsigned n, T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` hermite(unsigned n, T x);
template
- ``__sf_result`` hermite(unsigned n, T x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` hermite(unsigned n, T x, const ``__Policy``&);
template
- ``__sf_result`` hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
}} // namespaces
@@ -26,10 +26,10 @@ note than when there is a single template argument the result is the same type
as that argument or `double` if the template argument is an integer type.
template
- ``__sf_result`` hermite(unsigned n, T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` hermite(unsigned n, T x);
template
- ``__sf_result`` hermite(unsigned n, T x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` hermite(unsigned n, T x, const ``__Policy``&);
Returns the value of the Hermite Polynomial of order /n/ at point /x/:
@@ -43,7 +43,7 @@ Hermite Polynomials:
[graph hermite]
template
- ``__sf_result`` hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
Implements the three term recurrence relation for the Hermite
polynomials, this function can be used to create a sequence of
diff --git a/doc/sf/ibeta.qbk b/doc/sf/ibeta.qbk
index b4a20f9286..5227b2d342 100644
--- a/doc/sf/ibeta.qbk
+++ b/doc/sf/ibeta.qbk
@@ -9,28 +9,28 @@
namespace boost{ namespace math{
template
- ``__sf_result`` ibeta(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta(T1 a, T2 b, T3 x);
template
- ``__sf_result`` ibeta(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta(T1 a, T2 b, T3 x, const ``__Policy``&);
template
- ``__sf_result`` ibetac(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac(T1 a, T2 b, T3 x);
template
- ``__sf_result`` ibetac(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac(T1 a, T2 b, T3 x, const ``__Policy``&);
template
- ``__sf_result`` beta(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` beta(T1 a, T2 b, T3 x);
template
- ``__sf_result`` beta(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` beta(T1 a, T2 b, T3 x, const ``__Policy``&);
template
- ``__sf_result`` betac(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` betac(T1 a, T2 b, T3 x);
template
- ``__sf_result`` betac(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` betac(T1 a, T2 b, T3 x, const ``__Policy``&);
}} // namespaces
@@ -57,10 +57,10 @@ when T1, T2 and T3 are different types.
[optional_policy]
template
- ``__sf_result`` ibeta(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta(T1 a, T2 b, T3 x);
template
- ``__sf_result`` ibeta(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta(T1 a, T2 b, T3 x, const ``__Policy``&);
Returns the normalised incomplete beta function of a, b and x:
@@ -69,30 +69,30 @@ Returns the normalised incomplete beta function of a, b and x:
[graph ibeta]
template
- ``__sf_result`` ibetac(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac(T1 a, T2 b, T3 x);
template
- ``__sf_result`` ibetac(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac(T1 a, T2 b, T3 x, const ``__Policy``&);
Returns the normalised complement of the incomplete beta function of a, b and x:
[equation ibeta4]
template
- ``__sf_result`` beta(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` beta(T1 a, T2 b, T3 x);
template
- ``__sf_result`` beta(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` beta(T1 a, T2 b, T3 x, const ``__Policy``&);
Returns the full (non-normalised) incomplete beta function of a, b and x:
[equation ibeta1]
template
- ``__sf_result`` betac(T1 a, T2 b, T3 x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` betac(T1 a, T2 b, T3 x);
template
- ``__sf_result`` betac(T1 a, T2 b, T3 x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` betac(T1 a, T2 b, T3 x, const ``__Policy``&);
Returns the full (non-normalised) complement of the incomplete beta function of a, b and x:
diff --git a/doc/sf/ibeta_inv.qbk b/doc/sf/ibeta_inv.qbk
index 83c2b00086..60049db465 100644
--- a/doc/sf/ibeta_inv.qbk
+++ b/doc/sf/ibeta_inv.qbk
@@ -7,52 +7,52 @@
namespace boost{ namespace math{
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p);
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, const ``__Policy``&);
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py);
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py, const ``__Policy``&);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, const ``__Policy``&);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py, const ``__Policy``&);
template
- ``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p);
template
- ``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p, const ``__Policy``&);
template
- ``__sf_result`` ibetac_inva(T1 b, T2 x, T3 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inva(T1 b, T2 x, T3 q);
template
- ``__sf_result`` ibetac_inva(T1 b, T2 x, T3 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inva(T1 b, T2 x, T3 q, const ``__Policy``&);
template
- ``__sf_result`` ibeta_invb(T1 a, T2 x, T3 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_invb(T1 a, T2 x, T3 p);
template
- ``__sf_result`` ibeta_invb(T1 a, T2 x, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_invb(T1 a, T2 x, T3 p, const ``__Policy``&);
template
- ``__sf_result`` ibetac_invb(T1 a, T2 x, T3 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_invb(T1 a, T2 x, T3 q);
template
- ``__sf_result`` ibetac_invb(T1 a, T2 x, T3 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_invb(T1 a, T2 x, T3 q, const ``__Policy``&);
}} // namespaces
@@ -81,16 +81,16 @@ The return type of these functions is computed using the __arg_promotion_rules
when called with arguments T1...TN of different types.
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p);
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, const ``__Policy``&);
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py);
template
- ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibeta_inv(T1 a, T2 b, T3 p, T4* py, const ``__Policy``&);
Returns a value /x/ such that: `p = ibeta(a, b, x);`
and sets `*py = 1 - x` when the `py` parameter is provided and is non-null.
@@ -104,16 +104,16 @@ Requires: /a,b > 0/ and /0 <= p <= 1/.
[optional_policy]
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, const ``__Policy``&);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py);
template
- ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_inv(T1 a, T2 b, T3 q, T4* py, const ``__Policy``&);
Returns a value /x/ such that: `q = ibetac(a, b, x);`
and sets `*py = 1 - x` when the `py` parameter is provided and is non-null.
@@ -127,10 +127,10 @@ Requires: /a,b > 0/ and /0 <= q <= 1/.
[optional_policy]
template
- ``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p);
template
- ``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibeta_inva(T1 b, T2 x, T3 p, const ``__Policy``&);
Returns a value /a/ such that: `p = ibeta(a, b, x);`
@@ -139,10 +139,10 @@ Requires: /b > 0/, /0 < x < 1/ and /0 <= p <= 1/.
[optional_policy]
template
- ``__sf_result`` ibetac_inva(T1 b, T2 x, T3 p);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibetac_inva(T1 b, T2 x, T3 p);
template
- ``__sf_result`` ibetac_inva(T1 b, T2 x, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibetac_inva(T1 b, T2 x, T3 p, const ``__Policy``&);
Returns a value /a/ such that: `q = ibetac(a, b, x);`
@@ -151,10 +151,10 @@ Requires: /b > 0/, /0 < x < 1/ and /0 <= q <= 1/.
[optional_policy]
template
- ``__sf_result`` ibeta_invb(T1 b, T2 x, T3 p);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibeta_invb(T1 b, T2 x, T3 p);
template
- ``__sf_result`` ibeta_invb(T1 b, T2 x, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibeta_invb(T1 b, T2 x, T3 p, const ``__Policy``&);
Returns a value /b/ such that: `p = ibeta(a, b, x);`
@@ -163,10 +163,10 @@ Requires: /a > 0/, /0 < x < 1/ and /0 <= p <= 1/.
[optional_policy]
template
- ``__sf_result`` ibetac_invb(T1 b, T2 x, T3 p);
+ BOOST_MATH_GPU_ENABLED``__sf_result`` ibetac_invb(T1 b, T2 x, T3 p);
template
- ``__sf_result`` ibetac_invb(T1 b, T2 x, T3 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` ibetac_invb(T1 b, T2 x, T3 p, const ``__Policy``&);
Returns a value /b/ such that: `q = ibetac(a, b, x);`
diff --git a/doc/sf/igamma.qbk b/doc/sf/igamma.qbk
index ca354ad10f..4675928e63 100644
--- a/doc/sf/igamma.qbk
+++ b/doc/sf/igamma.qbk
@@ -9,28 +9,28 @@
namespace boost{ namespace math{
template
- ``__sf_result`` gamma_p(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p(T1 a, T2 z);
template
- ``__sf_result`` gamma_p(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p(T1 a, T2 z, const ``__Policy``&);
template
- ``__sf_result`` gamma_q(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q(T1 a, T2 z);
template
- ``__sf_result`` gamma_q(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q(T1 a, T2 z, const ``__Policy``&);
template
- ``__sf_result`` tgamma_lower(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_lower(T1 a, T2 z);
template
- ``__sf_result`` tgamma_lower(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_lower(T1 a, T2 z, const ``__Policy``&);
template
- ``__sf_result`` tgamma(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma(T1 a, T2 z);
template
- ``__sf_result`` tgamma(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma(T1 a, T2 z, const ``__Policy``&);
}} // namespaces
@@ -53,10 +53,10 @@ The return type of these functions is computed using the __arg_promotion_rules
when T1 and T2 are different types, otherwise the return type is simply T1.
template
- ``__sf_result`` gamma_p(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p(T1 a, T2 z);
template
- ``__sf_result`` gamma_p(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p(T1 a, T2 z, const ``__Policy``&);
Returns the normalised lower incomplete gamma function of a and z:
@@ -67,10 +67,10 @@ This function changes rapidly from 0 to 1 around the point z == a:
[graph gamma_p]
template
- ``__sf_result`` gamma_q(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q(T1 a, T2 z);
template
- ``__sf_result`` gamma_q(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q(T1 a, T2 z, const ``__Policy``&);
Returns the normalised upper incomplete gamma function of a and z:
@@ -81,20 +81,20 @@ This function changes rapidly from 1 to 0 around the point z == a:
[graph gamma_q]
template
- ``__sf_result`` tgamma_lower(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_lower(T1 a, T2 z);
template
- ``__sf_result`` tgamma_lower(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma_lower(T1 a, T2 z, const ``__Policy``&);
Returns the full (non-normalised) lower incomplete gamma function of a and z:
[equation igamma2]
template
- ``__sf_result`` tgamma(T1 a, T2 z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma(T1 a, T2 z);
template
- ``__sf_result`` tgamma(T1 a, T2 z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` tgamma(T1 a, T2 z, const ``__Policy``&);
Returns the full (non-normalised) upper incomplete gamma function of a and z:
diff --git a/doc/sf/igamma_inv.qbk b/doc/sf/igamma_inv.qbk
index 593c92141b..55fe76e6e8 100644
--- a/doc/sf/igamma_inv.qbk
+++ b/doc/sf/igamma_inv.qbk
@@ -9,28 +9,28 @@
namespace boost{ namespace math{
template
- ``__sf_result`` gamma_q_inv(T1 a, T2 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inv(T1 a, T2 q);
template
- ``__sf_result`` gamma_q_inv(T1 a, T2 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inv(T1 a, T2 q, const ``__Policy``&);
template
- ``__sf_result`` gamma_p_inv(T1 a, T2 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inv(T1 a, T2 p);
template
- ``__sf_result`` gamma_p_inv(T1 a, T2 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inv(T1 a, T2 p, const ``__Policy``&);
template
- ``__sf_result`` gamma_q_inva(T1 x, T2 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inva(T1 x, T2 q);
template
- ``__sf_result`` gamma_q_inva(T1 x, T2 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inva(T1 x, T2 q, const ``__Policy``&);
template
- ``__sf_result`` gamma_p_inva(T1 x, T2 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inva(T1 x, T2 p);
template
- ``__sf_result`` gamma_p_inva(T1 x, T2 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inva(T1 x, T2 p, const ``__Policy``&);
}} // namespaces
@@ -58,40 +58,40 @@ These are implemented here as `gamma_p_inva` and `gamma_q_inva`.]
template
- ``__sf_result`` gamma_q_inv(T1 a, T2 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inv(T1 a, T2 q);
template
- ``__sf_result`` gamma_q_inv(T1 a, T2 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inv(T1 a, T2 q, const ``__Policy``&);
Returns a value x such that: `q = gamma_q(a, x);`
Requires: /a > 0/ and /1 >= p,q >= 0/.
template
- ``__sf_result`` gamma_p_inv(T1 a, T2 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inv(T1 a, T2 p);
template
- ``__sf_result`` gamma_p_inv(T1 a, T2 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inv(T1 a, T2 p, const ``__Policy``&);
Returns a value x such that: `p = gamma_p(a, x);`
Requires: /a > 0/ and /1 >= p,q >= 0/.
template
- ``__sf_result`` gamma_q_inva(T1 x, T2 q);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inva(T1 x, T2 q);
template
- ``__sf_result`` gamma_q_inva(T1 x, T2 q, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_q_inva(T1 x, T2 q, const ``__Policy``&);
Returns a value a such that: `q = gamma_q(a, x);`
Requires: /x > 0/ and /1 >= p,q >= 0/.
template
- ``__sf_result`` gamma_p_inva(T1 x, T2 p);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inva(T1 x, T2 p);
template
- ``__sf_result`` gamma_p_inva(T1 x, T2 p, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` gamma_p_inva(T1 x, T2 p, const ``__Policy``&);
Returns a value a such that: `p = gamma_p(a, x);`
diff --git a/doc/sf/lgamma.qbk b/doc/sf/lgamma.qbk
index 5ea1a4e091..544485c7ca 100644
--- a/doc/sf/lgamma.qbk
+++ b/doc/sf/lgamma.qbk
@@ -9,16 +9,16 @@
namespace boost{ namespace math{
template
- ``__sf_result`` lgamma(T z);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma(T z);
template
- ``__sf_result`` lgamma(T z, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma(T z, const ``__Policy``&);
template
- ``__sf_result`` lgamma(T z, int* sign);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma(T z, int* sign);
template
- ``__sf_result`` lgamma(T z, int* sign, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` lgamma(T z, int* sign, const ``__Policy``&);
}} // namespaces
diff --git a/doc/sf/pow.qbk b/doc/sf/pow.qbk
index db021978e2..ecb762d711 100644
--- a/doc/sf/pow.qbk
+++ b/doc/sf/pow.qbk
@@ -10,10 +10,10 @@ power of a run-time base.
namespace boost { namespace math {
template
- constexpr ``__sf_result`` pow(T base);
+ BOOST_MATH_GPU_ENABLED constexpr ``__sf_result`` pow(T base);
template
- constexpr ``__sf_result`` pow(T base, const Policy& policy);
+ BOOST_MATH_GPU_ENABLED constexpr ``__sf_result`` pow(T base, const Policy& policy);
}}
diff --git a/doc/sf/sinc.qbk b/doc/sf/sinc.qbk
index b345c08cd7..a6042a7171 100644
--- a/doc/sf/sinc.qbk
+++ b/doc/sf/sinc.qbk
@@ -43,16 +43,16 @@ and [@http://mathworld.wolfram.com/Octonion.html octonions].
``
template
- ``__sf_result`` sinc_pi(const T x);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` sinc_pi(const T x);
template
- ``__sf_result`` sinc_pi(const T x, const ``__Policy``&);
+ BOOST_MATH_GPU_ENABLED ``__sf_result`` sinc_pi(const T x, const ``__Policy``&);
template class U>
- U