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 cuda specific implementation of the library.

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

Definition at line 92 of file RooBatchCompute.cu.

Public Member Functions

 RooBatchComputeClass ()
 
 RooBatchComputeClass ()
 
Architecture architecture () const override
 
Architecture architecture () const override
 
std::string architectureName () const override
 
std::string architectureName () const override
 
void compute (Config const &, Computer computer, RestrictArr output, size_t nEvents, const VarVector &vars, ArgVector &extraArgs) override
 Compute multiple values using optimized functions.
 
void compute (RooBatchCompute::Config const &cfg, Computer computer, RestrictArr output, size_t nEvents, const VarVector &vars, ArgVector &extraArgs) override
 Compute multiple values using cuda kernels.
 
ReduceNLLOutput reduceNLL (Config const &, std::span< const double > probas, std::span< const double > weights, std::span< const double > offsetProbas) override
 
ReduceNLLOutput reduceNLL (RooBatchCompute::Config const &cfg, std::span< const double > probas, std::span< const double > weights, std::span< const double > offsetProbas) override
 
double reduceSum (Config const &, InputArr input, size_t n) override
 Return the sum of an input array.
 
double reduceSum (RooBatchCompute::Config const &cfg, InputArr input, size_t n) override
 Return the sum of an input array.
 
- Public Member Functions inherited from RooBatchCompute::RooBatchComputeInterface
virtual ~RooBatchComputeInterface ()=default
 
void compute (Config const &cfg, Computer comp, RestrictArr output, size_t size, const VarVector &vars)
 

Private Attributes

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

Constructor & Destructor Documentation

◆ RooBatchComputeClass() [1/2]

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

Definition at line 97 of file RooBatchCompute.cu.

◆ RooBatchComputeClass() [2/2]

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

Definition at line 81 of file RooBatchCompute.cxx.

Member Function Documentation

◆ architecture() [1/2]

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 102 of file RooBatchCompute.cu.

◆ architecture() [2/2]

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 87 of file RooBatchCompute.cxx.

◆ architectureName() [1/2]

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 103 of file RooBatchCompute.cu.

◆ architectureName() [2/2]

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 88 of file RooBatchCompute.cxx.

◆ compute() [1/2]

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::compute ( Config const &  ,
Computer  computer,
RestrictArr  output,
size_t  nEvents,
const VarVector vars,
ArgVector extraArgs 
)
inlineoverridevirtual

Compute multiple values using optimized functions.

This method creates a Batches object and passes it to the correct compute function. In case Implicit Multithreading is enabled, the events to be processed are equally divided among the tasks to be generated and computed in parallel.

Parameters
computerAn enum specifying the compute function to be used.
outputThe array where the computation results are stored.
nEventsThe number of events to be processed.
varsA std::vector containing pointers to the variables involved in the computation.
extraArgsAn optional std::vector containing extra double values that may participate in the computation.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 111 of file RooBatchCompute.cxx.

◆ compute() [2/2]

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::compute ( RooBatchCompute::Config const &  cfg,
Computer  computer,
RestrictArr  output,
size_t  nEvents,
const VarVector vars,
ArgVector extraArgs 
)
inlineoverridevirtual

Compute multiple values using cuda kernels.

This method creates a Batches object and passes it to the correct compute function. The compute function is launched as a cuda kernel.

Parameters
computerAn enum specifying the compute function to be used.
outputThe array where the computation results are stored.
nEventsThe number of events to be processed.
varsA std::vector containing pointers to the variables involved in the computation.
extraArgsAn optional std::vector containing extra double values that may participate in the computation.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 119 of file RooBatchCompute.cu.

◆ reduceNLL() [1/2]

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

◆ reduceNLL() [2/2]

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 276 of file RooBatchCompute.cu.

◆ reduceSum() [1/2]

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

Return the sum of an input array.

Implements RooBatchCompute::RooBatchComputeInterface.

◆ reduceSum() [2/2]

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

Return the sum of an input array.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 261 of file RooBatchCompute.cu.

Member Data Documentation

◆ _computeFunctions

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

Definition at line 94 of file RooBatchCompute.cu.

  • roofit/batchcompute/src/RooBatchCompute.cu
  • roofit/batchcompute/src/RooBatchCompute.cxx