File indexing completed on 2025-10-17 08:29:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BOOST_MATH_QUADRATURE_SINH_SINH_HPP
0017 #define BOOST_MATH_QUADRATURE_SINH_SINH_HPP
0018
0019 #include <boost/math/tools/config.hpp>
0020 #include <boost/math/tools/precision.hpp>
0021 #include <boost/math/tools/cstdint.hpp>
0022 #include <boost/math/quadrature/detail/sinh_sinh_detail.hpp>
0023 #include <boost/math/policies/error_handling.hpp>
0024
0025 #ifndef BOOST_MATH_HAS_NVRTC
0026
0027 #include <cmath>
0028 #include <limits>
0029 #include <memory>
0030
0031 namespace boost{ namespace math{ namespace quadrature {
0032
0033 template<class Real, class Policy = boost::math::policies::policy<> >
0034 class sinh_sinh
0035 {
0036 public:
0037 sinh_sinh(size_t max_refinements = 9)
0038 : m_imp(std::make_shared<detail::sinh_sinh_detail<Real, Policy> >(max_refinements)) {}
0039
0040 template<class F>
0041 auto integrate(const F f, Real tol = boost::math::tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, std::size_t* levels = nullptr) const ->decltype(std::declval<F>()(std::declval<Real>()))
0042 {
0043 return m_imp->integrate(f, tol, error, L1, levels);
0044 }
0045
0046 private:
0047 std::shared_ptr<detail::sinh_sinh_detail<Real, Policy>> m_imp;
0048 };
0049
0050 }}}
0051
0052 #endif
0053
0054 #ifdef BOOST_MATH_ENABLE_CUDA
0055
0056 namespace boost {
0057 namespace math {
0058 namespace quadrature {
0059
0060 template <class F, class Real, class Policy = boost::math::policies::policy<> >
0061 __device__ auto sinh_sinh_integrate(const F& f, Real tol = boost::math::tools::root_epsilon<Real>(), Real* error = nullptr, Real* L1 = nullptr, boost::math::size_t* levels = nullptr)
0062 {
0063 return detail::sinh_sinh_integrate_impl(f, tol, error, L1, levels);
0064 }
0065
0066 }
0067 }
0068 }
0069
0070 #endif
0071
0072 #endif