Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::Detail::CudaKernels Namespace Reference

Namespaces

namespace  Reducers
 Dedicated namespace for reduction kernels.
 

Typedefs

using Size_t = int
 The type for array size parameters.
 

Functions

template<class Num_t , class Den_t >
__global__ void DivideBy (Size_t arraySize, Den_t *__restrict__ num, Num_t const *__restrict__ den)
 Divides elements of the num array in-place by corresponding elements of the den array.
 
template<class Idx_t , class Elem_t >
__global__ void Lookup2D (Size_t arraySize, Idx_t n2, Idx_t const *__restrict__ x1, Idx_t const *__restrict__ x2, Elem_t const *__restrict__ lut, Elem_t *__restrict__ output)
 Fills an output array 'output' with values from a row-wise flattened two-dimensional lookup table lut based on input arrays x1 and x2:
 

Typedef Documentation

◆ Size_t

The type for array size parameters.

Definition at line 26 of file CudaKernels.cuh.

Function Documentation

◆ DivideBy()

template<class Num_t , class Den_t >
__global__ void RooFit::Detail::CudaKernels::DivideBy ( Size_t  arraySize,
Den_t *__restrict__  num,
Num_t const *__restrict__  den 
)

Divides elements of the num array in-place by corresponding elements of the den array.

Template Parameters
Num_tData type of the 'num' array elements.
Den_tData type of the 'den' array elements.
Parameters
[in]arraySizeSize of the input arrays.
[in,out]numNumerator array containing values to be divided.
[in]denDenominator array containing divisor values.

Definition at line 229 of file CudaKernels.cuh.

◆ Lookup2D()

template<class Idx_t , class Elem_t >
__global__ void RooFit::Detail::CudaKernels::Lookup2D ( Size_t  arraySize,
Idx_t  n2,
Idx_t const *__restrict__  x1,
Idx_t const *__restrict__  x2,
Elem_t const *__restrict__  lut,
Elem_t *__restrict__  output 
)

Fills an output array 'output' with values from a row-wise flattened two-dimensional lookup table lut based on input arrays x1 and x2:

output[ i ] = lut[ n2 * x1[i] + x2[i] ].

Each thread processes a portion of the input arrays using grid-stride looping.

Template Parameters
Idx_tData type of the indices.
Elem_tData type of the lookup table and output array elements.
Parameters
[in]arraySizeSize of the input and output arrays.
[in]n2Size of the second dimension of the lookup table.
[in]x1Input array containing indices for the first dimension of the lookup table.
[in]x2Input array containing indices for the second dimension of the lookup table.
[in]lutLookup table containing values.
[out]outputOutput array to be filled with values from the lookup table.

Definition at line 258 of file CudaKernels.cuh.