Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute::RF_ARCH::RooBatchComputeClass Class Reference

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

Definition at line 187 of file RooBatchCompute.cxx.

Public Member Functions

 RooBatchComputeClass ()
 
Architecture architecture () const override
 
std::string architectureName () const override
 
void compute (Config const &, Computer computer, std::span< double > output, VarSpan vars, ArgSpan extraArgs) override
 Compute multiple values using optimized functions.
 
std::unique_ptr< AbsBufferManager > createBufferManager () const override
 
void deleteCudaStream (CudaInterface::CudaStream *) const override
 
CudaInterface::CudaStream * newCudaStream () const override
 
ReduceNLLOutput reduceNLL (Config const &, std::span< const double > probas, std::span< const double > weights, std::span< const double > offsetProbas, bool logProbas) override
 Reduce the probabilities to the negative log-likelihood.
 
double reduceSum (Config const &, InputArr input, size_t n) override
 
void synchronizeCudaStream (CudaInterface::CudaStream *) const override
 Wait until all work that was enqueued on the stream has completed.
 

Private Attributes

const std::vector< void(*)(Batches &)> _computeFunctions
 
Inheritance diagram for RooBatchCompute::RF_ARCH::RooBatchComputeClass:
[legend]

Constructor & Destructor Documentation

◆ RooBatchComputeClass()

RooBatchCompute::RF_ARCH::RooBatchComputeClass::RooBatchComputeClass ( )
inline

Definition at line 189 of file RooBatchCompute.cxx.

Member Function Documentation

◆ architecture()

Architecture RooBatchCompute::RF_ARCH::RooBatchComputeClass::architecture ( ) const
inlineoverridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 195 of file RooBatchCompute.cxx.

◆ architectureName()

std::string RooBatchCompute::RF_ARCH::RooBatchComputeClass::architectureName ( ) const
inlineoverridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 196 of file RooBatchCompute.cxx.

◆ compute()

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::compute ( Config const & cfg,
Computer computer,
std::span< double > output,
VarSpan vars,
ArgSpan extraArgs )
overridevirtual

Compute multiple values using optimized functions.

This method creates a Batches object and passes it to the correct compute function. If the configuration requests more than one thread and the batch is large enough, the events are processed in fixed-size chunks by parallel tasks.

Parameters
cfgConfiguration, steering among other things the number of threads.
computerAn enum specifying the compute function to be used.
outputThe array where the computation results are stored.
varsA std::span containing pointers to the variables involved in the computation.
extraArgsAn optional std::span containing extra double values that may participate in the computation.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 228 of file RooBatchCompute.cxx.

◆ createBufferManager()

std::unique_ptr< AbsBufferManager > RooBatchCompute::RF_ARCH::RooBatchComputeClass::createBufferManager ( ) const
overridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 543 of file RooBatchCompute.cxx.

◆ deleteCudaStream()

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::deleteCudaStream ( CudaInterface::CudaStream * ) const
inlineoverridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 212 of file RooBatchCompute.cxx.

◆ newCudaStream()

CudaInterface::CudaStream * RooBatchCompute::RF_ARCH::RooBatchComputeClass::newCudaStream ( ) const
inlineoverridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 211 of file RooBatchCompute.cxx.

◆ reduceNLL()

ReduceNLLOutput RooBatchCompute::RF_ARCH::RooBatchComputeClass::reduceNLL ( Config const & cfg,
std::span< const double > probas,
std::span< const double > weights,
std::span< const double > offsetProbas,
bool logProbas )
overridevirtual

Reduce the probabilities to the negative log-likelihood.

With logProbas, the probabilities are given as logarithms.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 382 of file RooBatchCompute.cxx.

◆ reduceSum()

double RooBatchCompute::RF_ARCH::RooBatchComputeClass::reduceSum ( Config const & cfg,
InputArr input,
size_t n )
overridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 309 of file RooBatchCompute.cxx.

◆ synchronizeCudaStream()

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::synchronizeCudaStream ( CudaInterface::CudaStream * ) const
inlineoverridevirtual

Wait until all work that was enqueued on the stream has completed.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 213 of file RooBatchCompute.cxx.

Member Data Documentation

◆ _computeFunctions

const std::vector<void (*)(Batches &)> RooBatchCompute::RF_ARCH::RooBatchComputeClass::_computeFunctions
private

Definition at line 216 of file RooBatchCompute.cxx.

  • roofit/batchcompute/src/RooBatchCompute.cxx