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

GPU integrator for the integration of a function with one angle with CUDA. Calculates. More...

#include <integrator_angle_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

 IntegratorAngleGPU (QuadratureProvider &quadrature_provider, const std::array< uint, 2 > grid_sizes, const ctype x_extent, const JSONValue &json)
 
 IntegratorAngleGPU (QuadratureProvider &quadrature_provider, std::array< uint, 2 > grid_sizes, const ctype x_extent, const uint max_block_size=256)
 
 IntegratorAngleGPU (const IntegratorAngleGPU &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, 2 > grid_sizes
 
std::array< uint, 2 > 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 ctype x_extent
 
dim3 num_blocks
 
dim3 threads_per_block
 
PoolMR pool
 
const rmm::cuda_stream_pool cuda_stream_pool
 

Detailed Description

template<int d, typename NT, typename KERNEL>
class DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >

GPU integrator for the integration of a function with one angle with CUDA. Calculates.

\[ \int dp\, d\text{cos}\, \frac{1}{(2\pi)^d} f(p, \text{cos}, ...) + c \]

with \( p^2 \) bounded by \( \text{x_extent} * k^2 \).

Template Parameters
NTThe numerical type of the result.
KERNELThe kernel to integrate.

Member Typedef Documentation

◆ ctype

template<int d, typename NT , typename KERNEL >
using DiFfRG::IntegratorAngleGPU< d, 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<int d, typename NT , typename KERNEL >
using DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::PoolMR = rmm::mr::pool_memory_resource<rmm::mr::device_memory_resource>
private

Constructor & Destructor Documentation

◆ IntegratorAngleGPU() [1/3]

template<int d, typename NT , typename KERNEL >
DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::IntegratorAngleGPU ( QuadratureProvider & quadrature_provider,
const std::array< uint, 2 > grid_sizes,
const ctype x_extent,
const JSONValue & json )
inline

◆ IntegratorAngleGPU() [2/3]

template<int d, typename NT , typename KERNEL >
DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::IntegratorAngleGPU ( QuadratureProvider & quadrature_provider,
std::array< uint, 2 > grid_sizes,
const ctype x_extent,
const uint max_block_size = 256 )
inline

◆ IntegratorAngleGPU() [3/3]

template<int d, typename NT , typename KERNEL >
DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::IntegratorAngleGPU ( const IntegratorAngleGPU< d, NT, KERNEL > & other)
inline

Member Function Documentation

◆ get()

template<int d, typename NT , typename KERNEL >
template<typename... T>
NT DiFfRG::IntegratorAngleGPU< d, 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<int d, typename NT , typename KERNEL >
template<typename... T>
std::future< NT > DiFfRG::IntegratorAngleGPU< d, 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<int d, typename NT , typename KERNEL >
std::array<uint, 2> DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::block_sizes
private

◆ cuda_stream_pool

template<int d, typename NT , typename KERNEL >
const rmm::cuda_stream_pool DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::cuda_stream_pool
private

◆ device_data_size

template<int d, typename NT , typename KERNEL >
const uint DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::device_data_size
private

◆ grid_sizes

template<int d, typename NT , typename KERNEL >
const std::array<uint, 2> DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::grid_sizes
private

◆ num_blocks

template<int d, typename NT , typename KERNEL >
dim3 DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::num_blocks
private

◆ pool

template<int d, typename NT , typename KERNEL >
PoolMR DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::pool
mutableprivate

◆ ptr_ang_quadrature_p

template<int d, typename NT , typename KERNEL >
const ctype* DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::ptr_ang_quadrature_p
private

◆ ptr_ang_quadrature_w

template<int d, typename NT , typename KERNEL >
const ctype* DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::ptr_ang_quadrature_w
private

◆ ptr_x_quadrature_p

template<int d, typename NT , typename KERNEL >
const ctype* DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::ptr_x_quadrature_p
private

◆ ptr_x_quadrature_w

template<int d, typename NT , typename KERNEL >
const ctype* DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::ptr_x_quadrature_w
private

◆ threads_per_block

template<int d, typename NT , typename KERNEL >
dim3 DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::threads_per_block
private

◆ x_extent

template<int d, typename NT , typename KERNEL >
const ctype DiFfRG::IntegratorAngleGPU< d, NT, KERNEL >::x_extent
private

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