Analysis-Utilities 26.9.9
C++/ROOT utilities for nuclear measurement data analysis
Loading...
Searching...
No Matches
RooFitPhotopeakKernels.hpp File Reference

Host-callable launch wrappers for the photopeak PDF CUDA kernels. More...

#include <cstddef>
Include dependency graph for RooFitPhotopeakKernels.hpp:

Go to the source code of this file.

Functions

void RooLowExpTail_launchKernel (double *output, const double *x_vals, double mu, double inv_tau, double inv_sqrt2_sigma, size_t n)
 Launch the low-energy exponential tail kernel.
void RooStepShelf_launchKernel (double *output, const double *x_vals, double mu, double inv_sigma, size_t n)
 Launch the resolution-smeared step-shelf kernel.
void RooLowLinTail_launchKernel (double *output, const double *x_vals, double mu, double slope, double inv_sqrt2_sigma, size_t n)
 Launch the low-energy linear tail kernel.
void RooHighExpTail_launchKernel (double *output, const double *x_vals, double mu, double inv_tau, double inv_sqrt2_sigma, size_t n)
 Launch the high-energy exponential tail kernel.

Detailed Description

Host-callable launch wrappers for the photopeak PDF CUDA kernels.

Each launcher takes device pointers plus the constants hoisted once per Minuit evaluation — reciprocals are passed in already inverted so the kernel multiplies rather than divides per element — dispatches the kernel, and returns as soon as the stream has accepted the launch.

These are declared unconditionally, but only defined when the library is built with -DAU_USE_CUDA=ON. The CPU build never compiles gpu/*.cu, so calling one of these in a CPU build is a link error. The custom PDFs reach them only from a doEval path already guarded by canComputeBatchWithCuda().

Warning
Every pointer argument must be device-resident. The callers obtain them from RooFit's evaluation context and check with cudaPointerGetAttributes before dispatching.
Note
No implicit synchronisation: the launch is asynchronous and the caller is responsible for any synchronisation the surrounding evaluation needs.

Definition in file RooFitPhotopeakKernels.hpp.

Function Documentation

◆ RooHighExpTail_launchKernel()

void RooHighExpTail_launchKernel ( double * output,
const double * x_vals,
double mu,
double inv_tau,
double inv_sqrt2_sigma,
size_t n )

Launch the high-energy exponential tail kernel.

Parameters
outputDevice buffer for n PDF values.
x_valsDevice buffer of n observable values.
muPeak centroid, in the observable's units.
inv_tauReciprocal of the tail decay constant.
inv_sqrt2_sigma1 / (sqrt(2) * sigma), the resolution factor.
nNumber of elements.

Definition at line 37 of file RooHighExpTail.cu.

Referenced by RooHighExpTail::doEval().

◆ RooLowExpTail_launchKernel()

void RooLowExpTail_launchKernel ( double * output,
const double * x_vals,
double mu,
double inv_tau,
double inv_sqrt2_sigma,
size_t n )

Launch the low-energy exponential tail kernel.

Parameters
outputDevice buffer for n PDF values.
x_valsDevice buffer of n observable values.
muPeak centroid, in the observable's units.
inv_tauReciprocal of the tail decay constant.
inv_sqrt2_sigma1 / (sqrt(2) * sigma), the resolution factor.
nNumber of elements.

Definition at line 37 of file RooLowExpTail.cu.

Referenced by RooLowExpTail::doEval().

◆ RooLowLinTail_launchKernel()

void RooLowLinTail_launchKernel ( double * output,
const double * x_vals,
double mu,
double slope,
double inv_sqrt2_sigma,
size_t n )

Launch the low-energy linear tail kernel.

Parameters
outputDevice buffer for n PDF values.
x_valsDevice buffer of n observable values.
muPeak centroid, in the observable's units.
slopeLinear tail slope s in the (1 + s*(x - mu)) factor, which is floored at zero to keep the PDF non-negative.
inv_sqrt2_sigma1 / (sqrt(2) * sigma), the resolution factor.
nNumber of elements.

Definition at line 24 of file RooLowLinTail.cu.

Referenced by RooLowLinTail::doEval().

◆ RooStepShelf_launchKernel()

void RooStepShelf_launchKernel ( double * output,
const double * x_vals,
double mu,
double inv_sigma,
size_t n )

Launch the resolution-smeared step-shelf kernel.

Parameters
outputDevice buffer for n PDF values.
x_valsDevice buffer of n observable values.
muPeak centroid, in the observable's units.
inv_sigmaReciprocal of the Gaussian resolution.
nNumber of elements.

Definition at line 27 of file RooStepShelf.cu.

Referenced by RooStepShelf::doEval().