Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute::CUDA::RooBatchComputeClass Class Reference

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

Definition at line 234 of file RooBatchCompute.cu.

Public Member Functions

 RooBatchComputeClass ()
 
Architecture architecture () const override
 
std::string architectureName () const override
 
void compute (RooBatchCompute::Config const &cfg, Computer computer, std::span< double > output, VarSpan vars, ArgSpan extraArgs) override
 Compute multiple values using cuda kernels.
 
std::unique_ptr< AbsBufferManagercreateBufferManager () const override
 
void deleteCudaStream (CudaInterface::CudaStream *stream) const override
 
CudaInterface::CudaStreamnewCudaStream () const 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 (RooBatchCompute::Config const &cfg, InputArr input, size_t n) override
 Return the sum of an input array.
 
void synchronizeCudaStream (CudaInterface::CudaStream *stream) const override
 Wait until all work that was enqueued on the stream has completed.
 

Private Member Functions

StreamScratch & scratch (CudaInterface::CudaStream *stream)
 

Private Attributes

const std::vector< void(*)(Batches &)> _computeFunctions
 
std::unordered_map< CudaInterface::CudaStream *, StreamScratch > _scratchMap
 
Inheritance diagram for RooBatchCompute::CUDA::RooBatchComputeClass:
[legend]

Constructor & Destructor Documentation

◆ RooBatchComputeClass()

RooBatchCompute::CUDA::RooBatchComputeClass::RooBatchComputeClass ( )
inline

Definition at line 237 of file RooBatchCompute.cu.

Member Function Documentation

◆ architecture()

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 242 of file RooBatchCompute.cu.

◆ architectureName()

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

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 243 of file RooBatchCompute.cu.

◆ compute()

void RooBatchCompute::CUDA::RooBatchComputeClass::compute ( RooBatchCompute::Config const & cfg,
Computer computer,
std::span< double > output,
VarSpan vars,
ArgSpan 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.
varsA std::span containing pointers to the variables involved in the computation.
extraArgsAn optional std::span containing extra double values that may participate in the computation.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 252 of file RooBatchCompute.cu.

◆ createBufferManager()

std::unique_ptr< AbsBufferManager > RooBatchCompute::CUDA::RooBatchComputeClass::createBufferManager ( ) const
overridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 786 of file RooBatchCompute.cu.

◆ deleteCudaStream()

void RooBatchCompute::CUDA::RooBatchComputeClass::deleteCudaStream ( CudaInterface::CudaStream * stream) const
inlineoverridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 317 of file RooBatchCompute.cu.

◆ newCudaStream()

CudaInterface::CudaStream * RooBatchCompute::CUDA::RooBatchComputeClass::newCudaStream ( ) const
inlineoverridevirtual

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 316 of file RooBatchCompute.cu.

◆ reduceNLL()

ReduceNLLOutput RooBatchCompute::CUDA::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 498 of file RooBatchCompute.cu.

◆ reduceSum()

double RooBatchCompute::CUDA::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 477 of file RooBatchCompute.cu.

◆ scratch()

StreamScratch & RooBatchCompute::CUDA::RooBatchComputeClass::scratch ( CudaInterface::CudaStream * stream)
inlineprivate

Definition at line 334 of file RooBatchCompute.cu.

◆ synchronizeCudaStream()

void RooBatchCompute::CUDA::RooBatchComputeClass::synchronizeCudaStream ( CudaInterface::CudaStream * ) const
inlineoverridevirtual

Wait until all work that was enqueued on the stream has completed.

Implements RooBatchCompute::RooBatchComputeInterface.

Definition at line 322 of file RooBatchCompute.cu.

Member Data Documentation

◆ _computeFunctions

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

Definition at line 336 of file RooBatchCompute.cu.

◆ _scratchMap

std::unordered_map<CudaInterface::CudaStream *, StreamScratch> RooBatchCompute::CUDA::RooBatchComputeClass::_scratchMap
mutableprivate

Definition at line 337 of file RooBatchCompute.cu.

  • roofit/batchcompute/src/RooBatchCompute.cu