Logo ROOT  
Reference Guide
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 42 of file RooBatchCompute.cxx.

Public Member Functions

 RooBatchComputeClass ()
 
Architecture architecture () const override
 
std::string architectureName () const override
 
void compute (cudaStream_t *, Computer computer, RestrictArr output, size_t nEvents, const DataMap &varData, const VarVector &vars, const ArgVector &extraArgs) override
 Compute multiple values using optimized functions. More...
 
double sumReduce (cudaStream_t *, InputArr input, size_t n) override
 Return the sum of an input array. More...
 
- Public Member Functions inherited from RooBatchCompute::RooBatchComputeInterface
virtual ~RooBatchComputeInterface ()=default
 
virtual Architecture architecture () const =0
 
virtual std::string architectureName () const =0
 
virtual void compute (cudaStream_t *, Computer, RestrictArr, size_t, const DataMap &, const VarVector &, const ArgVector &={})=0
 
virtual float cudaEventElapsedTime (cudaEvent_t *, cudaEvent_t *)
 
virtual void cudaEventRecord (cudaEvent_t *, cudaStream_t *)
 
virtual void cudaFree (void *)
 
virtual void cudaFreeHost (void *)
 
virtual voidcudaMalloc (size_t)
 
virtual voidcudaMallocHost (size_t)
 
virtual void cudaStreamWaitEvent (cudaStream_t *, cudaEvent_t *)
 
virtual void deleteCudaEvent (cudaEvent_t *)
 
virtual void deleteCudaStream (cudaStream_t *)
 
virtual void init ()
 
virtual void memcpyToCPU (void *, const void *, size_t, cudaStream_t *=nullptr)
 
virtual void memcpyToCUDA (void *, const void *, size_t, cudaStream_t *=nullptr)
 
virtual cudaEvent_t * newCudaEvent (bool)
 
virtual cudaStream_t * newCudaStream ()
 
virtual bool streamIsActive (cudaStream_t *)
 
virtual double sumReduce (cudaStream_t *, InputArr input, size_t n)=0
 

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 47 of file RooBatchCompute.cxx.

Member Function Documentation

◆ architecture()

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 53 of file RooBatchCompute.cxx.

◆ architectureName()

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 54 of file RooBatchCompute.cxx.

◆ compute()

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::compute ( cudaStream_t *  ,
Computer  computer,
RestrictArr  output,
size_t  nEvents,
const DataMap varData,
const VarVector vars,
const 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.
varDataA std::map containing the values of the variables involved in the computation.
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 73 of file RooBatchCompute.cxx.

◆ sumReduce()

double RooBatchCompute::RF_ARCH::RooBatchComputeClass::sumReduce ( cudaStream_t *  ,
InputArr  input,
size_t  n 
)
inlineoverridevirtual

Return the sum of an input array.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 106 of file RooBatchCompute.cxx.

Member Data Documentation

◆ _computeFunctions

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

Definition at line 44 of file RooBatchCompute.cxx.


The documentation for this class was generated from the following file: