13#ifndef ROOFIT_BATCHCOMPUTE_ROOBATCHCOMPUTE_H
14#define ROOFIT_BATCHCOMPUTE_ROOBATCHCOMPUTE_H
45typedef std::vector<std::span<const double>>
VarVector;
57 bool useCuda()
const {
return _cudaStream !=
nullptr; }
152 std::span<const double> offsetProbas) = 0;
207 std::span<const double> offsetProbas)
211 return dispatch->
reduceNLL(cfg, probas, weights, offsetProbas);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Minimal configuration struct to steer the evaluation of a single node with the RooBatchCompute librar...
The interface which should be implemented to provide optimised computation functions for implementati...
virtual double reduceSum(Config const &cfg, InputArr input, size_t n)=0
void compute(Config const &cfg, Computer comp, RestrictArr output, size_t size, const VarVector &vars)
virtual std::string architectureName() const =0
virtual void compute(Config const &cfg, Computer, RestrictArr, size_t, const VarVector &, ArgVector &)=0
virtual Architecture architecture() const =0
virtual ReduceNLLOutput reduceNLL(Config const &cfg, std::span< const double > probas, std::span< const double > weights, std::span< const double > offsetProbas)=0
virtual ~RooBatchComputeInterface()=default
Namespace for dispatching RooFit computations to various backends.
R__EXTERN RooBatchComputeInterface * dispatchCUDA
std::string cpuArchitectureName()
R__EXTERN RooBatchComputeInterface * dispatchCPU
This dispatch pointer points to an implementation of the compute library, provided one has been loade...
std::vector< std::span< const double > > VarVector
double reduceSum(Config cfg, InputArr input, size_t n)
ReduceNLLOutput reduceNLL(Config cfg, std::span< const double > probas, std::span< const double > weights, std::span< const double > offsetProbas)
Architecture cpuArchitecture()
const double *__restrict InputArr
void init()
Inspect hardware capabilities, and load the optimal library for RooFit computations.
std::vector< double > ArgVector
void compute(Config cfg, Computer comp, RestrictArr output, size_t size, const VarVector &vars, ArgVector &extraArgs)
double *__restrict RestrictArr
std::size_t nNonPositiveValues