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

Integration of an arbitrary 1D function from qx_min to qx_max using CUDA. More...

#include <integrator_1D_cartesian_gpu.hh>

Classes

struct  functor
 Custom functor for the thrust::transform_reduce function. More...
 

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

 Integrator1DCartesianGPU (QuadratureProvider &quadrature_provider, const std::array< uint, 1 > grid_size, const ctype x_extent=0., const uint max_block_size=0, const ctype qx_min=-M_PI, const ctype qx_max=M_PI)
 Construct a new Integrator1DCartesianGPU object.
 
 Integrator1DCartesianGPU (QuadratureProvider &quadrature_provider, const std::array< uint, 1 > grid_size, const JSONValue &json)
 Construct a new Integrator1DCartesianGPU object.
 
 Integrator1DCartesianGPU (QuadratureProvider &quadrature_provider, const std::array< uint, 1 > grid_size, const ctype x_extent, const JSONValue &json)
 Construct a new Integrator1DCartesianGPU object.
 
 Integrator1DCartesianGPU (QuadratureProvider &quadrature_provider, const uint grid_size, const ctype x_extent=0., const ctype qx_min=-M_PI, const ctype qx_max=M_PI)
 Construct a new Integrator1DCartesianGPU object.
 
 Integrator1DCartesianGPU (const Integrator1DCartesianGPU &other)
 Construct a copy of an existing Integrator1DCartesianGPU object.
 
void set_qx_min (const ctype qx_min)
 Set the minimum value of the qx integration range.
 
void set_qx_max (const ctype qx_max)
 Set the maximum value of the qx integration range.
 
template<typename... T>
NT get (const ctype k, const T &...t) const
 Get the result of the integration.
 
template<typename... T>
std::future< NT > request (const ctype k, const T &...t) const
 Get the result of the integration asynchronously.
 

Private Attributes

const uint grid_size
 
ctype qx_min = -M_PI
 
ctype qx_extent = 2. * M_PI
 
const ctypeptr_x_quadrature_p
 
const ctypeptr_x_quadrature_w
 

Detailed Description

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

Integration of an arbitrary 1D function from qx_min to qx_max using CUDA.

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

Member Typedef Documentation

◆ ctype

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

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

Constructor & Destructor Documentation

◆ Integrator1DCartesianGPU() [1/5]

template<typename NT , typename KERNEL >
DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::Integrator1DCartesianGPU ( QuadratureProvider & quadrature_provider,
const std::array< uint, 1 > grid_size,
const ctype x_extent = 0.,
const uint max_block_size = 0,
const ctype qx_min = -M_PI,
const ctype qx_max = M_PI )
inline

Construct a new Integrator1DCartesianGPU object.

Parameters
quadrature_providerThe quadrature provider to use.
grid_sizeThe number of grid points to use.
x_extentThis argument is not used, but kept for compatibility with flow classes.
max_block_sizeThe maximum block size to use on GPU.
qx_minThe minimum value of the qx integration range.
qx_maxThe maximum value of the qx integration range.

◆ Integrator1DCartesianGPU() [2/5]

template<typename NT , typename KERNEL >
DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::Integrator1DCartesianGPU ( QuadratureProvider & quadrature_provider,
const std::array< uint, 1 > grid_size,
const JSONValue & json )
inline

Construct a new Integrator1DCartesianGPU object.

Parameters
quadrature_providerThe quadrature provider to use.
grid_sizeThe number of grid points to use.
jsonThe JSON object to read additional parameters from.

◆ Integrator1DCartesianGPU() [3/5]

template<typename NT , typename KERNEL >
DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::Integrator1DCartesianGPU ( QuadratureProvider & quadrature_provider,
const std::array< uint, 1 > grid_size,
const ctype x_extent,
const JSONValue & json )
inline

Construct a new Integrator1DCartesianGPU object.

Parameters
quadrature_providerThe quadrature provider to use.
grid_sizeThe number of grid points to use.
x_extentThis argument is not used, but kept for compatibility with flow classes.
jsonThe JSON object to read additional parameters from.

◆ Integrator1DCartesianGPU() [4/5]

template<typename NT , typename KERNEL >
DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::Integrator1DCartesianGPU ( QuadratureProvider & quadrature_provider,
const uint grid_size,
const ctype x_extent = 0.,
const ctype qx_min = -M_PI,
const ctype qx_max = M_PI )
inline

Construct a new Integrator1DCartesianGPU object.

Parameters
quadrature_providerThe quadrature provider to use.
grid_sizeThe number of grid points to use.
x_extentThis argument is not used, but kept for compatibility with flow classes.
qx_minThe minimum value of the qx integration range.
qx_maxThe maximum value of the qx integration range.

◆ Integrator1DCartesianGPU() [5/5]

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

Construct a copy of an existing Integrator1DCartesianGPU object.

Parameters
otherThe object to copy.

Member Function Documentation

◆ get()

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

Get the result of the integration.

Template Parameters
TThe types of the additional arguments to the kernel.
Parameters
kThe current RG scale.
tThe additional arguments of the kernel.
Returns
The result of the integration.

◆ request()

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

Get the result of the integration asynchronously.

Template Parameters
TThe types of the additional arguments to the kernel.
Parameters
kThe current RG scale.
tThe additional arguments of the kernel.
Returns
An std::future<NT> which returns the result of the integration.

◆ set_qx_max()

template<typename NT , typename KERNEL >
void DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::set_qx_max ( const ctype qx_max)
inline

Set the maximum value of the qx integration range.

◆ set_qx_min()

template<typename NT , typename KERNEL >
void DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::set_qx_min ( const ctype qx_min)
inline

Set the minimum value of the qx integration range.

Member Data Documentation

◆ grid_size

template<typename NT , typename KERNEL >
const uint DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::grid_size
private

◆ ptr_x_quadrature_p

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

◆ ptr_x_quadrature_w

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

◆ qx_extent

template<typename NT , typename KERNEL >
ctype DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::qx_extent = 2. * M_PI
private

◆ qx_min

template<typename NT , typename KERNEL >
ctype DiFfRG::Integrator1DCartesianGPU< NT, KERNEL >::qx_min = -M_PI
private

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