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 43 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 VarVector &vars, const ArgVector &extraArgs) override
 Compute multiple values using optimized functions.
 
double sumReduce (cudaStream_t *, InputArr input, size_t n) override
 Return the sum of an input array.
 
- Public Member Functions inherited from RooBatchCompute::RooBatchComputeInterface
virtual ~RooBatchComputeInterface ()=default
 
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 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 *)
 

Private Attributes

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

Constructor & Destructor Documentation

◆ RooBatchComputeClass()

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

Definition at line 48 of file RooBatchCompute.cxx.

Member Function Documentation

◆ architecture()

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 54 of file RooBatchCompute.cxx.

◆ architectureName()

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 55 of file RooBatchCompute.cxx.

◆ compute()

void RooBatchCompute::RF_ARCH::RooBatchComputeClass::compute ( cudaStream_t *  ,
Computer  computer,
RestrictArr  output,
size_t  nEvents,
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.
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 78 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 139 of file RooBatchCompute.cxx.

Member Data Documentation

◆ _computeFunctions

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

Definition at line 45 of file RooBatchCompute.cxx.

  • roofit/batchcompute/src/RooBatchCompute.cxx