18
18
19
19
// For cuda we would rather use builtin nextafter than unsupported boost::math::nextafter
20
20
// NVRTC does not support the forward declarations header
21
- #ifndef BOOST_MATH_ENABLE_CUDA
21
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
22
22
# include < boost/math/special_functions/next.hpp>
23
23
# ifndef BOOST_MATH_HAS_NVRTC
24
24
# include < utility>
@@ -31,7 +31,7 @@ namespace math {
31
31
32
32
namespace detail {
33
33
34
- #ifndef BOOST_MATH_ENABLE_CUDA
34
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
35
35
36
36
template <typename T>
37
37
using fma_t = decltype(fma(std::declval<T>(), std::declval<T>(), std::declval<T>()));
@@ -52,7 +52,7 @@ BOOST_MATH_FORCEINLINE BOOST_MATH_GPU_ENABLED T local_fma(const T x, const T y,
52
52
return x * y + z;
53
53
}
54
54
55
- #endif // BOOST_MATH_ENABLE_CUDA
55
+ #endif // BOOST_MATH_HAS_GPU_SUPPORT
56
56
57
57
template <typename T, typename Policy>
58
58
BOOST_MATH_GPU_ENABLED T pow1p_imp (const T x, const T y, const Policy& pol)
@@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED T pow1p_imp(const T x, const T y, const Policy& pol)
150
150
t = x - (s - T (1 ));
151
151
if (t > 0 )
152
152
{
153
- #ifdef BOOST_MATH_ENABLE_CUDA
153
+ #ifdef BOOST_MATH_HAS_GPU_SUPPORT
154
154
s = ::nextafter (s, T (1 ));
155
155
#else
156
156
s = boost::math::nextafter (s, T (1 ));
@@ -165,7 +165,7 @@ BOOST_MATH_GPU_ENABLED T pow1p_imp(const T x, const T y, const Policy& pol)
165
165
t = x - (s - T (1 ));
166
166
if (t < 0 )
167
167
{
168
- #ifdef BOOST_MATH_ENABLE_CUDA
168
+ #ifdef BOOST_MATH_HAS_GPU_SUPPORT
169
169
s = ::nextafter (s, T (0 ));
170
170
#else
171
171
s = boost::math::nextafter (s, T (0 ));
@@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED T pow1p_imp(const T x, const T y, const Policy& pol)
180
180
t = T (1 ) - (s - x);
181
181
if (t < 0 )
182
182
{
183
- #ifdef BOOST_MATH_ENABLE_CUDA
183
+ #ifdef BOOST_MATH_HAS_GPU_SUPPORT
184
184
s = ::nextafter (s, T (0 ));
185
185
#else
186
186
s = boost::math::nextafter (s, T (0 ));
@@ -207,7 +207,7 @@ BOOST_MATH_GPU_ENABLED T pow1p_imp(const T x, const T y, const Policy& pol)
207
207
// Then exp(y*u) == exp(z)*exp(w).
208
208
T z = y * u;
209
209
210
- #ifdef BOOST_MATH_ENABLE_CUDA
210
+ #ifdef BOOST_MATH_HAS_GPU_SUPPORT
211
211
T w = fma (y, u, -z);
212
212
#else
213
213
T w = local_fma (y, u, -z);
0 commit comments