IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool > Struct Template Reference

Functor that is used for generating samples. More...

#include <InverseTransformSampling.h>

+ Collaboration diagram for ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >:

Public Types

using value_type = T
 

Public Member Functions

KOKKOS_FUNCTION fill_random (Distribution &dist_r, view_type &x_r, GeneratorPool &rand_pool_r, Vector< T, Dim > &umin_r, Vector< T, Dim > &umax_r, unsigned int &d_r)
 Constructor for the fill_random functor.
 
KOKKOS_INLINE_FUNCTION void operator() (const size_t i) const
 Operator to fill random values.
 

Public Attributes

Distribution targetdist_m
 
view_type sample_m
 
GeneratorPool pool_m
 
Vector< T, Dim > minbound_m
 
Vector< T, Dim > maxbound_m
 
unsigned int dim_m
 

Detailed Description

template<typename T, unsigned Dim, class DeviceType, class Distribution>
template<class GeneratorPool>
struct ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >

Functor that is used for generating samples.

Constructor & Destructor Documentation

◆ fill_random()

template<typename T , unsigned Dim, class DeviceType , class Distribution >
template<class GeneratorPool >
KOKKOS_FUNCTION ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::fill_random ( Distribution dist_r,
view_type &  x_r,
GeneratorPool &  rand_pool_r,
Vector< T, Dim > &  umin_r,
Vector< T, Dim > &  umax_r,
unsigned int &  d_r 
)
inline

Constructor for the fill_random functor.

Parameters
dist_The distribution to sample from.
x_The view to generate samples in.
rand_pool_The random number generator pool.
umin_Minimum cumulative distribution values.
umax_Maximum cumulative distribution values.

Member Function Documentation

◆ operator()()

template<typename T , unsigned Dim, class DeviceType , class Distribution >
template<class GeneratorPool >
KOKKOS_INLINE_FUNCTION void ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::fill_random< GeneratorPool >::operator() ( const size_t  i) const
inline

Operator to fill random values.

Parameters
iIndex for the random values.

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