Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ComputeFunctions.cxx File Reference
#include "RooBatchCompute.h"
#include "RooNaNPacker.h"
#include "RooVDTHeaders.h"
#include "Batches.h"
#include <TMath.h>
#include <RooHeterogeneousMath.h>
#include <algorithm>
#include <limits>
#include <vector>
Include dependency graph for ComputeFunctions.cxx:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  RooBatchCompute
 Namespace for dispatching RooFit computations to various backends.
 
namespace  RooBatchCompute::CUDA
 

Macros

#define BEGIN   0
 
#define STEP   1
 

Functions

__roodevice__ void RooBatchCompute::CUDA::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 RooBatchCompute::CUDA::computeAddPdf (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeArgusBG (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeBernstein (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeBifurGauss (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeBMixDecay (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeBreitWigner (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeBukin (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeCBShape (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeChebychev (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeChiSquare (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeDeltaFunction (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeDstD0BG (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeExponential (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeExponentialNeg (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeExpPoly (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeGamma (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeGaussian (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeGaussModelExpBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeIdentity (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeJohnson (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeLandau (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeLogGaussian (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeLognormal (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeLogNormalizedPdf (Batches &batches)
 Like computeNormalizedPdf(), but outputs the logarithm.
 
template<bool NumIsLog, bool ScalarDen>
__roodevice__ void RooBatchCompute::CUDA::computeLogNormalizedPdfImpl (Batches &batches)
 The input modes are template parameters, so that no logarithms are evaluated speculatively.
 
__rooglobal__ void RooBatchCompute::CUDA::computeLognormalStandard (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeLogProdPdf (Batches &batches)
 Logarithm of a product.
 
__rooglobal__ void RooBatchCompute::CUDA::computeNegativeLogarithms (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeNormalizedPdf (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeNovosibirsk (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computePoisson (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computePolynomial (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computePower (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeProdPdf (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeRatio (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelCosBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelCoshBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelExpBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelLinBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelQuadBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelSinBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeTruthModelSinhBasis (Batches &batches)
 
__rooglobal__ void RooBatchCompute::CUDA::computeVoigtian (Batches &batches)
 
std::vector< void(*)(Batches &)> RooBatchCompute::CUDA::getFunctions ()
 Returns a std::vector of pointers to the compute functions in this file.
 
template<bool NumIsLog>
__roodevice__ double RooBatchCompute::CUDA::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 RooBatchCompute::CUDA::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.
 

Detailed Description

This file contains vectorizable computation functions for PDFs and other Roofit objects.

The same source file can also be compiled with nvcc. All functions have a single Batches object as an argument passed by value, which contains all the information necessary for the computation. In case of cuda computations, the loops have a step (stride) the size of the grid which allows for reusing the same code as the cpu implementations, easier debugging and in terms of performance, maximum memory coalescing. For more details, see https://developer.nvidia.com/blog/cuda-pro-tip-write-flexible-kernels-grid-stride-loops/

Definition in file ComputeFunctions.cxx.

Macro Definition Documentation

◆ BEGIN

#define BEGIN   0

Definition at line 42 of file ComputeFunctions.cxx.

◆ STEP

#define STEP   1

Definition at line 43 of file ComputeFunctions.cxx.