DiFfRG
Loading...
Searching...
No Matches
DiFfRG::Integrator2Dpx0GPU< NT, KERNEL > Class Template Reference

Integrator for 2+1D integrals over p, x0 and an angle using the GPU. Calculates. More...

#include <integrator_2Dpx0_gpu.hh>

Public Types

using ctype = typename get_type::ctype<NT>
 Numerical type to be used for integration tasks e.g. the argument or possible jacobians.
 

Public Member Functions

 Integrator2Dpx0GPU (QuadratureProvider &quadrature_provider, const std::array< uint, 3 > grid_sizes, const ctype x_extent, const ctype x0_extent, const JSONValue &json)
 Construct a new Integrator2Dpx0GPU object.
 
 Integrator2Dpx0GPU (QuadratureProvider &quadrature_provider, std::array< uint, 3 > grid_sizes, const ctype x_extent, const ctype x0_extent, const uint max_block_size=256)
 Construct a new Integrator2Dpx0GPU object.
 
 Integrator2Dpx0GPU (const Integrator2Dpx0GPU &other)
 
template<typename... T>
NT get (const ctype k, const T &...t) const
 Get the integral of the kernel.
 
template<typename... T>
std::future< NT > request (const ctype k, const T &...t) const
 Request a future for the integral of the kernel.
 

Private Types

using PoolMR = rmm::mr::pool_memory_resource<rmm::mr::device_memory_resource>
 

Private Attributes

const std::array< uint, 3 > grid_sizes
 
std::array< uint, 3 > block_sizes
 
const uint device_data_size
 
const ctypeptr_x_quadrature_p
 
const ctypeptr_x_quadrature_w
 
const ctypeptr_ang_quadrature_p
 
const ctypeptr_ang_quadrature_w
 
const ctypeptr_x0_quadrature_p
 
const ctypeptr_x0_quadrature_w
 
const ctype x_extent
 
const ctype x0_extent
 
dim3 num_blocks
 
dim3 threads_per_block
 
PoolMR pool
 
const rmm::cuda_stream_pool cuda_stream_pool
 

Detailed Description

template<typename NT, typename KERNEL>
class DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >

Integrator for 2+1D integrals over p, x0 and an angle using the GPU. Calculates.

\[ \int dp dcos dx0 f(p, cos, x0) + c \]

Template Parameters
NTNumerical type.
KERNELKernel to integrate. Must have a static constant member function constant which supplies c and a static member function kernel which supplies the integrand.

Member Typedef Documentation

◆ ctype

template<typename NT , typename KERNEL >
using DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ctype = typename get_type::ctype<NT>

Numerical type to be used for integration tasks e.g. the argument or possible jacobians.

◆ PoolMR

template<typename NT , typename KERNEL >
using DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::PoolMR = rmm::mr::pool_memory_resource<rmm::mr::device_memory_resource>
private

Constructor & Destructor Documentation

◆ Integrator2Dpx0GPU() [1/3]

template<typename NT , typename KERNEL >
DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::Integrator2Dpx0GPU ( QuadratureProvider & quadrature_provider,
const std::array< uint, 3 > grid_sizes,
const ctype x_extent,
const ctype x0_extent,
const JSONValue & json )
inline

Construct a new Integrator2Dpx0GPU object.

Parameters
quadrature_providerQuadratureProvider object.
grid_sizesGrid sizes for the integrator.
x_extentExtent of the x-quadrature.
x0_extentExtent of the x0-quadrature.
jsonJSON object.

◆ Integrator2Dpx0GPU() [2/3]

template<typename NT , typename KERNEL >
DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::Integrator2Dpx0GPU ( QuadratureProvider & quadrature_provider,
std::array< uint, 3 > grid_sizes,
const ctype x_extent,
const ctype x0_extent,
const uint max_block_size = 256 )
inline

Construct a new Integrator2Dpx0GPU object.

Parameters
quadrature_providerQuadratureProvider object.
grid_sizesGrid sizes for the integrator.
x_extentExtent of the x-quadrature.
x0_extentExtent of the x0-quadrature.
max_block_sizeMaximum block size for CUDA computation.

◆ Integrator2Dpx0GPU() [3/3]

template<typename NT , typename KERNEL >
DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::Integrator2Dpx0GPU ( const Integrator2Dpx0GPU< NT, KERNEL > & other)
inline

Member Function Documentation

◆ get()

template<typename NT , typename KERNEL >
template<typename... T>
NT DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::get ( const ctype k,
const T &... t ) const
inline

Get the integral of the kernel.

Template Parameters
TTypes of the parameters for the kernel.
Parameters
kRG-scale.
tParameters forwarded to the kernel.
Returns
NT Integral of the kernel plus the constant part.

◆ request()

template<typename NT , typename KERNEL >
template<typename... T>
std::future< NT > DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::request ( const ctype k,
const T &... t ) const
inline

Request a future for the integral of the kernel.

Template Parameters
TTypes of the parameters for the kernel.
Parameters
kRG-scale.
tParameters forwarded to the kernel.
Returns
std::future<NT> future holding the integral of the kernel plus the constant part.

Member Data Documentation

◆ block_sizes

template<typename NT , typename KERNEL >
std::array<uint, 3> DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::block_sizes
private

◆ cuda_stream_pool

template<typename NT , typename KERNEL >
const rmm::cuda_stream_pool DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::cuda_stream_pool
private

◆ device_data_size

template<typename NT , typename KERNEL >
const uint DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::device_data_size
private

◆ grid_sizes

template<typename NT , typename KERNEL >
const std::array<uint, 3> DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::grid_sizes
private

◆ num_blocks

template<typename NT , typename KERNEL >
dim3 DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::num_blocks
private

◆ pool

template<typename NT , typename KERNEL >
PoolMR DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::pool
mutableprivate

◆ ptr_ang_quadrature_p

template<typename NT , typename KERNEL >
const ctype* DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ptr_ang_quadrature_p
private

◆ ptr_ang_quadrature_w

template<typename NT , typename KERNEL >
const ctype* DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ptr_ang_quadrature_w
private

◆ ptr_x0_quadrature_p

template<typename NT , typename KERNEL >
const ctype* DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ptr_x0_quadrature_p
private

◆ ptr_x0_quadrature_w

template<typename NT , typename KERNEL >
const ctype* DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ptr_x0_quadrature_w
private

◆ ptr_x_quadrature_p

template<typename NT , typename KERNEL >
const ctype* DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ptr_x_quadrature_p
private

◆ ptr_x_quadrature_w

template<typename NT , typename KERNEL >
const ctype* DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::ptr_x_quadrature_w
private

◆ threads_per_block

template<typename NT , typename KERNEL >
dim3 DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::threads_per_block
private

◆ x0_extent

template<typename NT , typename KERNEL >
const ctype DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::x0_extent
private

◆ x_extent

template<typename NT , typename KERNEL >
const ctype DiFfRG::Integrator2Dpx0GPU< NT, KERNEL >::x_extent
private

The documentation for this class was generated from the following file: