Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute::CUDA Namespace Reference

Classes

class  RooBatchComputeClass
 This class overrides some RooBatchComputeInterface functions, for the purpose of providing a cuda specific implementation of the library. More...
 

Functions

__roodevice__ void addEvalErrorCounts (Batches &batches, int nType0, int nType1, int nType2)
 Add the evaluation error counts of the normalization compute functions to the first three extra args.
 
__rooglobal__ void computeAddPdf (Batches &batches)
 
__rooglobal__ void computeArgusBG (Batches &batches)
 
__rooglobal__ void computeBernstein (Batches &batches)
 
__rooglobal__ void computeBifurGauss (Batches &batches)
 
__rooglobal__ void computeBMixDecay (Batches &batches)
 
__rooglobal__ void computeBreitWigner (Batches &batches)
 
__rooglobal__ void computeBukin (Batches &batches)
 
__rooglobal__ void computeCBShape (Batches &batches)
 
__rooglobal__ void computeChebychev (Batches &batches)
 
__rooglobal__ void computeChiSquare (Batches &batches)
 
__rooglobal__ void computeDeltaFunction (Batches &batches)
 
__rooglobal__ void computeDstD0BG (Batches &batches)
 
__rooglobal__ void computeExponential (Batches &batches)
 
__rooglobal__ void computeExponentialNeg (Batches &batches)
 
__rooglobal__ void computeExpPoly (Batches &batches)
 
__rooglobal__ void computeGamma (Batches &batches)
 
__rooglobal__ void computeGaussian (Batches &batches)
 
__rooglobal__ void computeGaussModelExpBasis (Batches &batches)
 
__rooglobal__ void computeIdentity (Batches &batches)
 
__rooglobal__ void computeJohnson (Batches &batches)
 
__rooglobal__ void computeLandau (Batches &batches)
 
__rooglobal__ void computeLogGaussian (Batches &batches)
 
__rooglobal__ void computeLognormal (Batches &batches)
 
__rooglobal__ void computeLogNormalizedPdf (Batches &batches)
 Like computeNormalizedPdf(), but outputs the logarithm.
 
template<bool NumIsLog, bool ScalarDen>
__roodevice__ void computeLogNormalizedPdfImpl (Batches &batches)
 The input modes are template parameters, so that no logarithms are evaluated speculatively.
 
__rooglobal__ void computeLognormalStandard (Batches &batches)
 
__rooglobal__ void computeLogProdPdf (Batches &batches)
 Logarithm of a product.
 
__rooglobal__ void computeNegativeLogarithms (Batches &batches)
 
__rooglobal__ void computeNormalizedPdf (Batches &batches)
 
__rooglobal__ void computeNovosibirsk (Batches &batches)
 
__rooglobal__ void computePoisson (Batches &batches)
 
__rooglobal__ void computePolynomial (Batches &batches)
 
__rooglobal__ void computePower (Batches &batches)
 
__rooglobal__ void computeProdPdf (Batches &batches)
 
__rooglobal__ void computeRatio (Batches &batches)
 
__rooglobal__ void computeTruthModelCosBasis (Batches &batches)
 
__rooglobal__ void computeTruthModelCoshBasis (Batches &batches)
 
__rooglobal__ void computeTruthModelExpBasis (Batches &batches)
 
__rooglobal__ void computeTruthModelLinBasis (Batches &batches)
 
__rooglobal__ void computeTruthModelQuadBasis (Batches &batches)
 
__rooglobal__ void computeTruthModelSinBasis (Batches &batches)
 
__rooglobal__ void computeTruthModelSinhBasis (Batches &batches)
 
__rooglobal__ void computeVoigtian (Batches &batches)
 
std::vector< void(*)(Batches &)> getFunctions ()
 Returns a std::vector of pointers to the compute functions in this file.
 
__global__ void kahanSum (const double *__restrict__ input, const double *__restrict__ carries, size_t n, double *__restrict__ result, bool nll)
 
__device__ void kahanSumReduction (double *shared, size_t n, double *__restrict__ result, int carry_index)
 
__device__ void kahanSumUpdate (double &sum, double &carry, double a, double otherCarry)
 
template<bool NumIsLog>
__roodevice__ double logNormalizedPdf (double num, double den, double logDen, int *nEvalErrors)
 Logarithm of the normalized pdf for one event, with the same evaluation errors as computeNormalizedPdf().
 
__roodevice__ double logOfProduct (Batches const &batches, std::size_t begin, std::size_t end, std::size_t i)
 Logarithm of the product of the factors [begin, end) for event i.
 
__global__ void nllSumKernel (const double *__restrict__ probas, const double *__restrict__ weights, const double *__restrict__ offsetProbas, size_t nProbas, double scalarProba, bool logProbas, size_t nWeights, double *__restrict__ result, double *__restrict__ stats)
 Computes the negative log likelihood sum with the same semantics as the CPU implementation of RooBatchComputeInterface::reduceNLL(): zero-weight events are skipped, and evaluation problems are counted and accumulated into a "badness" value that the host can pack into a NaN for the error recovery in the minimizer.
 

Variables

constexpr int blockSize = 512
 
static RooBatchComputeClass computeObj
 Static object to trigger the constructor which overwrites the dispatch pointer.
 

Function Documentation

◆ addEvalErrorCounts()

__roodevice__ void RooBatchCompute::CUDA::addEvalErrorCounts ( Batches & batches,
int nType0,
int nType1,
int nType2 )
inline

Add the evaluation error counts of the normalization compute functions to the first three extra args.

Definition at line 649 of file ComputeFunctions.cxx.

◆ computeAddPdf()

__rooglobal__ void RooBatchCompute::CUDA::computeAddPdf ( Batches & batches)

Definition at line 49 of file ComputeFunctions.cxx.

◆ computeArgusBG()

__rooglobal__ void RooBatchCompute::CUDA::computeArgusBG ( Batches & batches)

Definition at line 62 of file ComputeFunctions.cxx.

◆ computeBernstein()

__rooglobal__ void RooBatchCompute::CUDA::computeBernstein ( Batches & batches)

Definition at line 97 of file ComputeFunctions.cxx.

◆ computeBifurGauss()

__rooglobal__ void RooBatchCompute::CUDA::computeBifurGauss ( Batches & batches)

Definition at line 169 of file ComputeFunctions.cxx.

◆ computeBMixDecay()

__rooglobal__ void RooBatchCompute::CUDA::computeBMixDecay ( Batches & batches)

Definition at line 82 of file ComputeFunctions.cxx.

◆ computeBreitWigner()

__rooglobal__ void RooBatchCompute::CUDA::computeBreitWigner ( Batches & batches)

Definition at line 186 of file ComputeFunctions.cxx.

◆ computeBukin()

__rooglobal__ void RooBatchCompute::CUDA::computeBukin ( Batches & batches)

Definition at line 197 of file ComputeFunctions.cxx.

◆ computeCBShape()

__rooglobal__ void RooBatchCompute::CUDA::computeCBShape ( Batches & batches)

Definition at line 246 of file ComputeFunctions.cxx.

◆ computeChebychev()

__rooglobal__ void RooBatchCompute::CUDA::computeChebychev ( Batches & batches)

Definition at line 268 of file ComputeFunctions.cxx.

◆ computeChiSquare()

__rooglobal__ void RooBatchCompute::CUDA::computeChiSquare ( Batches & batches)

Definition at line 313 of file ComputeFunctions.cxx.

◆ computeDeltaFunction()

__rooglobal__ void RooBatchCompute::CUDA::computeDeltaFunction ( Batches & batches)

Definition at line 328 of file ComputeFunctions.cxx.

◆ computeDstD0BG()

__rooglobal__ void RooBatchCompute::CUDA::computeDstD0BG ( Batches & batches)

Definition at line 335 of file ComputeFunctions.cxx.

◆ computeExponential()

__rooglobal__ void RooBatchCompute::CUDA::computeExponential ( Batches & batches)

Definition at line 372 of file ComputeFunctions.cxx.

◆ computeExponentialNeg()

__rooglobal__ void RooBatchCompute::CUDA::computeExponentialNeg ( Batches & batches)

Definition at line 381 of file ComputeFunctions.cxx.

◆ computeExpPoly()

__rooglobal__ void RooBatchCompute::CUDA::computeExpPoly ( Batches & batches)

Definition at line 355 of file ComputeFunctions.cxx.

◆ computeGamma()

__rooglobal__ void RooBatchCompute::CUDA::computeGamma ( Batches & batches)

Definition at line 390 of file ComputeFunctions.cxx.

◆ computeGaussian()

__rooglobal__ void RooBatchCompute::CUDA::computeGaussian ( Batches & batches)

Definition at line 458 of file ComputeFunctions.cxx.

◆ computeGaussModelExpBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeGaussModelExpBasis ( Batches & batches)

Definition at line 420 of file ComputeFunctions.cxx.

◆ computeIdentity()

__rooglobal__ void RooBatchCompute::CUDA::computeIdentity ( Batches & batches)

Definition at line 482 of file ComputeFunctions.cxx.

◆ computeJohnson()

__rooglobal__ void RooBatchCompute::CUDA::computeJohnson ( Batches & batches)

Definition at line 500 of file ComputeFunctions.cxx.

◆ computeLandau()

__rooglobal__ void RooBatchCompute::CUDA::computeLandau ( Batches & batches)

Definition at line 530 of file ComputeFunctions.cxx.

◆ computeLogGaussian()

__rooglobal__ void RooBatchCompute::CUDA::computeLogGaussian ( Batches & batches)

Definition at line 470 of file ComputeFunctions.cxx.

◆ computeLognormal()

__rooglobal__ void RooBatchCompute::CUDA::computeLognormal ( Batches & batches)

Definition at line 613 of file ComputeFunctions.cxx.

◆ computeLogNormalizedPdf()

__rooglobal__ void RooBatchCompute::CUDA::computeLogNormalizedPdf ( Batches & batches)

Like computeNormalizedPdf(), but outputs the logarithm.

The pdf values are given as logarithms if extra[3] is nonzero.

Definition at line 759 of file ComputeFunctions.cxx.

◆ computeLogNormalizedPdfImpl()

template<bool NumIsLog, bool ScalarDen>
__roodevice__ void RooBatchCompute::CUDA::computeLogNormalizedPdfImpl ( Batches & batches)
inline

The input modes are template parameters, so that no logarithms are evaluated speculatively.

Definition at line 726 of file ComputeFunctions.cxx.

◆ computeLognormalStandard()

__rooglobal__ void RooBatchCompute::CUDA::computeLognormalStandard ( Batches & batches)

Definition at line 630 of file ComputeFunctions.cxx.

◆ computeLogProdPdf()

__rooglobal__ void RooBatchCompute::CUDA::computeLogProdPdf ( Batches & batches)

Logarithm of a product.

The first extra[0] factors are given as logarithms and are summed, the others are multiplied.

Definition at line 912 of file ComputeFunctions.cxx.

◆ computeNegativeLogarithms()

__rooglobal__ void RooBatchCompute::CUDA::computeNegativeLogarithms ( Batches & batches)

Definition at line 489 of file ComputeFunctions.cxx.

◆ computeNormalizedPdf()

__rooglobal__ void RooBatchCompute::CUDA::computeNormalizedPdf ( Batches & batches)

Definition at line 668 of file ComputeFunctions.cxx.

◆ computeNovosibirsk()

__rooglobal__ void RooBatchCompute::CUDA::computeNovosibirsk ( Batches & batches)

Definition at line 782 of file ComputeFunctions.cxx.

◆ computePoisson()

__rooglobal__ void RooBatchCompute::CUDA::computePoisson ( Batches & batches)

Definition at line 806 of file ComputeFunctions.cxx.

◆ computePolynomial()

__rooglobal__ void RooBatchCompute::CUDA::computePolynomial ( Batches & batches)

Definition at line 835 of file ComputeFunctions.cxx.

◆ computePower()

__rooglobal__ void RooBatchCompute::CUDA::computePower ( Batches & batches)

Definition at line 854 of file ComputeFunctions.cxx.

◆ computeProdPdf()

__rooglobal__ void RooBatchCompute::CUDA::computeProdPdf ( Batches & batches)

Definition at line 867 of file ComputeFunctions.cxx.

◆ computeRatio()

__rooglobal__ void RooBatchCompute::CUDA::computeRatio ( Batches & batches)

Definition at line 956 of file ComputeFunctions.cxx.

◆ computeTruthModelCosBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelCosBasis ( Batches & batches)

Definition at line 989 of file ComputeFunctions.cxx.

◆ computeTruthModelCoshBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelCoshBasis ( Batches & batches)

Definition at line 1049 of file ComputeFunctions.cxx.

◆ computeTruthModelExpBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelExpBasis ( Batches & batches)

Definition at line 963 of file ComputeFunctions.cxx.

◆ computeTruthModelLinBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelLinBasis ( Batches & batches)

Definition at line 1002 of file ComputeFunctions.cxx.

◆ computeTruthModelQuadBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelQuadBasis ( Batches & batches)

Definition at line 1019 of file ComputeFunctions.cxx.

◆ computeTruthModelSinBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelSinBasis ( Batches & batches)

Definition at line 976 of file ComputeFunctions.cxx.

◆ computeTruthModelSinhBasis()

__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelSinhBasis ( Batches & batches)

Definition at line 1036 of file ComputeFunctions.cxx.

◆ computeVoigtian()

__rooglobal__ void RooBatchCompute::CUDA::computeVoigtian ( Batches & batches)

Definition at line 1062 of file ComputeFunctions.cxx.

◆ getFunctions()

std::vector< void(*)(Batches &)> RooBatchCompute::CUDA::getFunctions ( )

Returns a std::vector of pointers to the compute functions in this file.

Definition at line 1095 of file ComputeFunctions.cxx.

◆ kahanSum()

__global__ void RooBatchCompute::CUDA::kahanSum ( const double *__restrict__ input,
const double *__restrict__ carries,
size_t n,
double *__restrict__ result,
bool nll )

Definition at line 374 of file RooBatchCompute.cu.

◆ kahanSumReduction()

__device__ void RooBatchCompute::CUDA::kahanSumReduction ( double * shared,
size_t n,
double *__restrict__ result,
int carry_index )
inline

Definition at line 357 of file RooBatchCompute.cu.

◆ kahanSumUpdate()

__device__ void RooBatchCompute::CUDA::kahanSumUpdate ( double & sum,
double & carry,
double a,
double otherCarry )
inline

Definition at line 343 of file RooBatchCompute.cu.

◆ logNormalizedPdf()

template<bool NumIsLog>
__roodevice__ double RooBatchCompute::CUDA::logNormalizedPdf ( double num,
double den,
double logDen,
int * nEvalErrors )
inline

Logarithm of the normalized pdf for one event, with the same evaluation errors as computeNormalizedPdf().

Definition at line 704 of file ComputeFunctions.cxx.

◆ logOfProduct()

__roodevice__ double RooBatchCompute::CUDA::logOfProduct ( Batches const & batches,
std::size_t begin,
std::size_t end,
std::size_t i )
inline

Logarithm of the product of the factors [begin, end) for event i.

The binary exponent is kept separate, so that the product can't underflow.

Definition at line 882 of file ComputeFunctions.cxx.

◆ nllSumKernel()

__global__ void RooBatchCompute::CUDA::nllSumKernel ( const double *__restrict__ probas,
const double *__restrict__ weights,
const double *__restrict__ offsetProbas,
size_t nProbas,
double scalarProba,
bool logProbas,
size_t nWeights,
double *__restrict__ result,
double *__restrict__ stats )

Computes the negative log likelihood sum with the same semantics as the CPU implementation of RooBatchComputeInterface::reduceNLL(): zero-weight events are skipped, and evaluation problems are counted and accumulated into a "badness" value that the host can pack into a NaN for the error recovery in the minimizer.

The stats output has the layout [badness, nNonPositive, nNaN, nInfinite] and must be zero-initialized. With logProbas, the probabilities are given as logarithms.

Definition at line 411 of file RooBatchCompute.cu.

Variable Documentation

◆ blockSize

constexpr int RooBatchCompute::CUDA::blockSize = 512
constexpr

Definition at line 39 of file RooBatchCompute.cu.

◆ computeObj

RooBatchComputeClass RooBatchCompute::CUDA::computeObj
static

Static object to trigger the constructor which overwrites the dispatch pointer.

Definition at line 806 of file RooBatchCompute.cu.