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 61 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 &, 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 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
 

#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()

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

◆ cudaEventElapsedTime()

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

Definition at line 81 of file RooBatchCompute.h.

◆ cudaEventRecord()

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

Definition at line 79 of file RooBatchCompute.h.

◆ cudaFree()

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

Definition at line 71 of file RooBatchCompute.h.

◆ cudaFreeHost()

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

Definition at line 73 of file RooBatchCompute.h.

◆ cudaMalloc()

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

Definition at line 70 of file RooBatchCompute.h.

◆ cudaMallocHost()

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

Definition at line 72 of file RooBatchCompute.h.

◆ cudaStreamWaitEvent()

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

Definition at line 80 of file RooBatchCompute.h.

◆ deleteCudaEvent()

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

Definition at line 75 of file RooBatchCompute.h.

◆ deleteCudaStream()

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

Definition at line 77 of file RooBatchCompute.h.

◆ memcpyToCPU()

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

Definition at line 83 of file RooBatchCompute.h.

◆ memcpyToCUDA()

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

Definition at line 82 of file RooBatchCompute.h.

◆ newCudaEvent()

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

Definition at line 74 of file RooBatchCompute.h.

◆ newCudaStream()

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

Definition at line 76 of file RooBatchCompute.h.

◆ streamIsActive()

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

Definition at line 78 of file RooBatchCompute.h.

◆ sumReduce()

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

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