22 const uint max_block_size = 0)
34 const uint max_block_size = 0)
51 template <
typename... T> NT
get(
const ctype k,
const T &...t)
const
56 return KERNEL::constant(k, t...) +
58 tbb::blocked_range<uint>(0,
grid_size), NT(0),
59 [&](
const tbb::blocked_range<uint> &r, NT value) -> NT {
60 for (
uint idx_x = r.begin(); idx_x != r.end(); ++idx_x) {
66 value += int_element * weight * KERNEL::kernel(q, k, t...);
70 [&](NT x, NT y) -> NT {
return x + y; });
83 template <
typename... T> std::future<NT>
request(
const ctype k,
const T &...t)
const
85 return std::async(std::launch::deferred, [=,
this]() {
return get(k, t...); });
Definition integrator_cpu.hh:15
const std::vector< ctype > & x_quadrature_p
Definition integrator_cpu.hh:93
typename get_type::ctype< NT > ctype
Numerical type to be used for integration tasks e.g. the argument or possible jacobians.
Definition integrator_cpu.hh:20
NT get(const ctype k, const T &...t) const
Get the integral of the kernel.
Definition integrator_cpu.hh:51
IntegratorTBB(QuadratureProvider &quadrature_provider, const std::array< uint, 1 > grid_size, const ctype x_extent, const uint max_block_size=0)
Definition integrator_cpu.hh:21
const std::vector< ctype > & x_quadrature_w
Definition integrator_cpu.hh:94
IntegratorTBB(QuadratureProvider &quadrature_provider, const uint grid_size, const ctype x_extent, const uint max_block_size=0)
Definition integrator_cpu.hh:33
const uint grid_size
Definition integrator_cpu.hh:89
std::future< NT > request(const ctype k, const T &...t) const
Request a future for the integral of the kernel.
Definition integrator_cpu.hh:83
const ctype x_extent
Definition integrator_cpu.hh:91
IntegratorTBB(QuadratureProvider &quadrature_provider, const std::array< uint, 1 > grid_size, const ctype x_extent, const JSONValue &)
Definition integrator_cpu.hh:27
A wrapper around the boost json value class.
Definition json.hh:19
A class that provides quadrature points and weights, in host and device memory. The quadrature points...
Definition quadrature_provider.hh:139
typename internal::_ctype< CT >::value ctype
Definition types.hh:106
Definition complex_math.hh:14
constexpr __forceinline__ __host__ __device__ NumberType powr(const NumberType x)
A compile-time evaluatable power function for whole number exponents.
Definition math.hh:45
constexpr __forceinline__ __host__ __device__ double S_d(NT d)
Surface of a d-dimensional sphere.
Definition math.hh:91
consteval NT S_d_prec(uint d)
Surface of a d-dimensional sphere (precompiled)
Definition math.hh:104
unsigned int uint
Definition utils.hh:22