Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooBatchCompute::RF_ARCH::Batches Class Reference

Definition at line 69 of file Batches.h.

Public Member Functions

 Batches (Batches &&)=delete
 
 Batches (const Batches &)=delete
 
 Batches (RestrictArr output, size_t nEvents, const VarVector &vars, const ArgVector &extraArgs={}, double *buffer=nullptr)
 Construct a Batches object.
 
void advance (size_t nEvents)
 
__roodevice__ double extraArg (uint8_t i) const
 
__roodevice__ size_t getNEvents () const
 
__roodevice__ uint8_t getNExtraArgs () const
 
Batchesoperator= (Batches &&)=delete
 
Batchesoperator= (const Batches &)=delete
 
__roodevice__ Batch operator[] (int batchIdx) const
 
__roodevice__ void setExtraArg (uint8_t i, double val)
 
void setNEvents (size_t n)
 

Public Attributes

RestrictArr _output = nullptr
 

Private Attributes

std::vector< Batch_arrays
 
std::vector< double_extraArgs
 
uint8_t _nBatches = 0
 
size_t _nEvents = 0
 
uint8_t _nExtraArgs = 0
 

#include </home/sftnight/build/workspace/root-makedoc-v626/rootspi/rdoc/src/v6-26-00-patches/roofit/batchcompute/src/Batches.h>

Constructor & Destructor Documentation

◆ Batches() [1/3]

Batches::Batches ( RestrictArr  output,
size_t  nEvents,
const VarVector vars,
const ArgVector extraArgs = {},
double buffer = nullptr 
)

Construct a Batches object.

Parameters
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.
bufferA 2D array that is used as a buffer for scalar variables. For every scalar parameter a buffer (one row of the buffer) is filled with copies of the scalar value, so that it behaves as a batch and facilitates auto-vectorization. The Batches object can be passed by value to a compute function to perform efficient computations.

Definition at line 160 of file RooBatchCompute.cxx.

◆ Batches() [2/3]

RooBatchCompute::RF_ARCH::Batches::Batches ( const Batches )
delete

◆ Batches() [3/3]

RooBatchCompute::RF_ARCH::Batches::Batches ( Batches &&  )
delete

Member Function Documentation

◆ advance()

void RooBatchCompute::RF_ARCH::Batches::advance ( size_t  nEvents)
inline

Definition at line 105 of file Batches.h.

◆ extraArg()

__roodevice__ double RooBatchCompute::RF_ARCH::Batches::extraArg ( uint8_t  i) const
inline

Definition at line 101 of file Batches.h.

◆ getNEvents()

__roodevice__ size_t RooBatchCompute::RF_ARCH::Batches::getNEvents ( ) const
inline

Definition at line 99 of file Batches.h.

◆ getNExtraArgs()

__roodevice__ uint8_t RooBatchCompute::RF_ARCH::Batches::getNExtraArgs ( ) const
inline

Definition at line 100 of file Batches.h.

◆ operator=() [1/2]

Batches & RooBatchCompute::RF_ARCH::Batches::operator= ( Batches &&  )
delete

◆ operator=() [2/2]

Batches & RooBatchCompute::RF_ARCH::Batches::operator= ( const Batches )
delete

◆ operator[]()

__roodevice__ Batch RooBatchCompute::RF_ARCH::Batches::operator[] ( int  batchIdx) const
inline

Definition at line 103 of file Batches.h.

◆ setExtraArg()

__roodevice__ void RooBatchCompute::RF_ARCH::Batches::setExtraArg ( uint8_t  i,
double  val 
)
inline

Definition at line 102 of file Batches.h.

◆ setNEvents()

void RooBatchCompute::RF_ARCH::Batches::setNEvents ( size_t  n)
inline

Definition at line 104 of file Batches.h.

Member Data Documentation

◆ _arrays

std::vector<Batch> RooBatchCompute::RF_ARCH::Batches::_arrays
private

Definition at line 76 of file Batches.h.

◆ _extraArgs

std::vector<double> RooBatchCompute::RF_ARCH::Batches::_extraArgs
private

Definition at line 77 of file Batches.h.

◆ _nBatches

uint8_t RooBatchCompute::RF_ARCH::Batches::_nBatches = 0
private

Definition at line 80 of file Batches.h.

◆ _nEvents

size_t RooBatchCompute::RF_ARCH::Batches::_nEvents = 0
private

Definition at line 79 of file Batches.h.

◆ _nExtraArgs

uint8_t RooBatchCompute::RF_ARCH::Batches::_nExtraArgs = 0
private

Definition at line 81 of file Batches.h.

◆ _output

RestrictArr RooBatchCompute::RF_ARCH::Batches::_output = nullptr

Definition at line 84 of file Batches.h.

  • roofit/batchcompute/src/Batches.h
  • roofit/batchcompute/src/RooBatchCompute.cxx