Skip to content

Commit

Permalink
Add missing pieces
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Sep 11, 2024
1 parent 91cceeb commit 9d50451
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions include/boost/math/quadrature/tanh_sinh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#include <boost/math/tools/config.hpp>
#include <boost/math/tools/cstdint.hpp>
#include <boost/math/tools/precision.hpp>
#include <boost/math/policies/policy.hpp>
#include <boost/math/quadrature/detail/tanh_sinh_detail.hpp>

Expand Down Expand Up @@ -298,22 +299,29 @@ auto tanh_sinh<Real, Policy>::integrate(const F f, Real tolerance, Real* error,

#ifdef BOOST_MATH_ENABLE_CUDA

namespace boost {
namespace math {
namespace quadrature {

template <class F, class Real, class Policy = boost::math::policies::policy<> >
__device__ auto tanh_sinh_integrate(const F& f, Real a, Real b, Real tolerance = tools::root_epsilon<Real>(), Real* error == nullptr, Real* L1 = nullptr, boost::math::size_t* levels = nullptr)
__device__ auto tanh_sinh_integrate(const F& f, Real a, Real b, Real tolerance = boost::math::tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, boost::math::size_t* levels = nullptr)
{
constexpr auto function = "tanh_sinh<%1%>::integrate";
return detail::tanh_sinh_integrate_impl(f, error, L1, function, a, b, tolerance, levels);
}

template <class F, class Real, class Policy = boost::math::policies::policy<> >
__device__ auto tanh_sinh_integrate(const F& f, Real tolerance = tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, boost::math::size_t* levels = nullptr)
__device__ auto tanh_sinh_integrate(const F& f, Real tolerance = boost::math::tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, boost::math::size_t* levels = nullptr)
{
constexpr auto function = "tanh_sinh<%1%>::integrate";
const Real min_complement = tools::min_value<Real>() * 4;
return detail::tanh_sinh_integrate_impl(f, error, L1, function, min_complement, min_complement, tolerance, levels);
}

} // namespace quadrature
} // namespace math
} // namespace boost

#endif // BOOST_MATH_ENABLE_CUDA

#endif

0 comments on commit 9d50451

Please sign in to comment.