Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute::RooBatchComputeInterface Class Referenceabstract

The interface which should be implemented to provide optimised computation functions for implementations of RooAbsReal::evaluateSpan().

The class RooBatchComputeInterface provides the mechanism for external modules (like RooFit) to call functions from the library. The power lies in the virtual functions that can resolve to different implementations for the functionality; for example, calling a function through dispatchCuda will resolve to efficient cuda implementations.

This interface contains the signatures of the compute functions of every PDF that has an optimised implementation available. These are the functions that perform the actual computations in batches.

Several implementations of this interface may be provided, e.g. SSE, AVX, AVX2 etc. At run time, the fastest implementation of this interface is selected, and using a virtual call, the computation is dispatched to the best backend.

See also
RooBatchCompute::dispatch, RooBatchComputeClass, RF_ARCH

Definition at line 107 of file RooBatchCompute.h.

Public Member Functions

virtual ~RooBatchComputeInterface ()=default
 
virtual Architecture architecture () const =0
 
virtual std::string architectureName () const =0
 
virtual void compute (cudaStream_t *, Computer, RestrictArr, size_t, const VarVector &, ArgVector &)=0
 
void compute (cudaStream_t *stream, Computer comp, RestrictArr output, size_t size, const VarVector &vars)
 
virtual float cudaEventElapsedTime (cudaEvent_t *, cudaEvent_t *)
 
virtual void cudaEventRecord (cudaEvent_t *, cudaStream_t *)
 
virtual void cudaFree (void *)
 
virtual void cudaFreeHost (void *)
 
virtual void * cudaMalloc (size_t)
 
virtual void * cudaMallocHost (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 ReduceNLLOutput reduceNLL (cudaStream_t *, RooSpan< const double > probas, RooSpan< const double > weightSpan, RooSpan< const double > weights, double weightSum, RooSpan< const double > binVolumes)=0
 
virtual double reduceSum (cudaStream_t *, InputArr input, size_t n)=0
 
virtual bool streamIsActive (cudaStream_t *)
 

#include <RooBatchCompute.h>

Inheritance diagram for RooBatchCompute::RooBatchComputeInterface:
[legend]

Constructor & Destructor Documentation

◆ ~RooBatchComputeInterface()

virtual RooBatchCompute::RooBatchComputeInterface::~RooBatchComputeInterface ( )
virtualdefault

Member Function Documentation

◆ architecture()

virtual Architecture RooBatchCompute::RooBatchComputeInterface::architecture ( ) const
pure virtual

◆ architectureName()

virtual std::string RooBatchCompute::RooBatchComputeInterface::architectureName ( ) const
pure virtual

◆ compute() [1/2]

virtual void RooBatchCompute::RooBatchComputeInterface::compute ( cudaStream_t *  ,
Computer  ,
RestrictArr  ,
size_t  ,
const VarVector ,
ArgVector  
)
pure virtual

◆ compute() [2/2]

void RooBatchCompute::RooBatchComputeInterface::compute ( cudaStream_t *  stream,
Computer  comp,
RestrictArr  output,
size_t  size,
const VarVector vars 
)
inline

Definition at line 111 of file RooBatchCompute.h.

◆ cudaEventElapsedTime()

virtual float RooBatchCompute::RooBatchComputeInterface::cudaEventElapsedTime ( cudaEvent_t *  ,
cudaEvent_t *   
)
inlinevirtual

Definition at line 137 of file RooBatchCompute.h.

◆ cudaEventRecord()

virtual void RooBatchCompute::RooBatchComputeInterface::cudaEventRecord ( cudaEvent_t *  ,
cudaStream_t *   
)
inlinevirtual

Definition at line 135 of file RooBatchCompute.h.

◆ cudaFree()

virtual void RooBatchCompute::RooBatchComputeInterface::cudaFree ( void *  )
inlinevirtual

Definition at line 127 of file RooBatchCompute.h.

◆ cudaFreeHost()

virtual void RooBatchCompute::RooBatchComputeInterface::cudaFreeHost ( void *  )
inlinevirtual

Definition at line 129 of file RooBatchCompute.h.

◆ cudaMalloc()

virtual void * RooBatchCompute::RooBatchComputeInterface::cudaMalloc ( size_t  )
inlinevirtual

Definition at line 126 of file RooBatchCompute.h.

◆ cudaMallocHost()

virtual void * RooBatchCompute::RooBatchComputeInterface::cudaMallocHost ( size_t  )
inlinevirtual

Definition at line 128 of file RooBatchCompute.h.

◆ cudaStreamWaitEvent()

virtual void RooBatchCompute::RooBatchComputeInterface::cudaStreamWaitEvent ( cudaStream_t *  ,
cudaEvent_t *   
)
inlinevirtual

Definition at line 136 of file RooBatchCompute.h.

◆ deleteCudaEvent()

virtual void RooBatchCompute::RooBatchComputeInterface::deleteCudaEvent ( cudaEvent_t *  )
inlinevirtual

Definition at line 131 of file RooBatchCompute.h.

◆ deleteCudaStream()

virtual void RooBatchCompute::RooBatchComputeInterface::deleteCudaStream ( cudaStream_t *  )
inlinevirtual

Definition at line 133 of file RooBatchCompute.h.

◆ memcpyToCPU()

virtual void RooBatchCompute::RooBatchComputeInterface::memcpyToCPU ( void *  ,
const void *  ,
size_t  ,
cudaStream_t *  = nullptr 
)
inlinevirtual

Definition at line 139 of file RooBatchCompute.h.

◆ memcpyToCUDA()

virtual void RooBatchCompute::RooBatchComputeInterface::memcpyToCUDA ( void *  ,
const void *  ,
size_t  ,
cudaStream_t *  = nullptr 
)
inlinevirtual

Definition at line 138 of file RooBatchCompute.h.

◆ newCudaEvent()

virtual cudaEvent_t * RooBatchCompute::RooBatchComputeInterface::newCudaEvent ( bool  )
inlinevirtual

Definition at line 130 of file RooBatchCompute.h.

◆ newCudaStream()

virtual cudaStream_t * RooBatchCompute::RooBatchComputeInterface::newCudaStream ( )
inlinevirtual

Definition at line 132 of file RooBatchCompute.h.

◆ reduceNLL()

virtual ReduceNLLOutput RooBatchCompute::RooBatchComputeInterface::reduceNLL ( cudaStream_t *  ,
RooSpan< const double probas,
RooSpan< const double weightSpan,
RooSpan< const double weights,
double  weightSum,
RooSpan< const double binVolumes 
)
pure virtual

◆ reduceSum()

virtual double RooBatchCompute::RooBatchComputeInterface::reduceSum ( cudaStream_t *  ,
InputArr  input,
size_t  n 
)
pure virtual

◆ streamIsActive()

virtual bool RooBatchCompute::RooBatchComputeInterface::streamIsActive ( cudaStream_t *  )
inlinevirtual

Definition at line 134 of file RooBatchCompute.h.


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