Definition at line 26 of file BatchData.h.
|
using | Map_t = std::unordered_map< std::size_t, Batch > |
|
#include <BatchData.h>
◆ Map_t
◆ Status_t
Status of the batch.
Make sure that everything that is readable has a status >= kReady.
Enumerator |
---|
kNoBatch | |
kDirty | |
kWriting | |
kReady | |
kReadyAndConstant | |
Definition at line 30 of file BatchData.h.
◆ BatchData()
BatchHelpers::BatchData::BatchData |
( |
| ) |
|
|
inline |
◆ attachForeignStorage()
void BatchHelpers::BatchData::attachForeignStorage |
( |
const std::vector< double > & |
vec | ) |
|
Attach a foreign storage. Batches coming from this storage will be read only.
Definition at line 94 of file BatchData.cxx.
◆ clear()
void BatchHelpers::BatchData::clear |
( |
| ) |
|
|
inline |
◆ findEnclosingBatch()
Map_t::const_iterator BatchHelpers::BatchData::findEnclosingBatch |
( |
std::size_t |
evt | ) |
const |
|
inlineprivate |
◆ findSpanInsideExistingBatch()
RooSpan< const double > BatchHelpers::BatchData::findSpanInsideExistingBatch |
( |
std::size_t |
begin, |
|
|
std::size_t |
batchSize |
|
) |
| const |
|
inlineprivate |
◆ getBatch()
RooSpan< const double > BatchHelpers::BatchData::getBatch |
( |
std::size_t |
begin, |
|
|
std::size_t |
batchSize |
|
) |
| const |
◆ makeWritableBatchInit()
RooSpan< double > BatchHelpers::BatchData::makeWritableBatchInit |
( |
std::size_t |
begin, |
|
|
std::size_t |
batchSize, |
|
|
double |
value |
|
) |
| |
Make a batch and return a span pointing to the pdf-local memory.
Calls makeWritableBatchUnInit() and initialises the memory.
- Parameters
-
[in] | begin | Begin of the batch. |
[in] | batchSize | End of the batch (not included) |
[in] | value | Value to initialise with (defaults to 0.). |
- Returns
- An initialised RooSpan starting at event
begin
.
Definition at line 83 of file BatchData.cxx.
◆ makeWritableBatchUnInit()
RooSpan< double > BatchHelpers::BatchData::makeWritableBatchUnInit |
( |
std::size_t |
begin, |
|
|
std::size_t |
batchSize |
|
) |
| |
Make a batch and return a span pointing to the pdf-local memory.
The batch status is switched to kWriting
, but the batch is not initialised. If a batch at this start point exists, the storage will be resized to fit the required size.
- Parameters
-
[in] | begin | Begin of the batch. |
[in] | batchSize | Size of the batch. |
- Returns
- An uninitialised RooSpan starting at event
begin
.
Definition at line 58 of file BatchData.cxx.
◆ markDirty()
void BatchHelpers::BatchData::markDirty |
( |
| ) |
|
|
inline |
Mark all batches dirty. This will trigger recomputations.
Definition at line 97 of file BatchData.h.
◆ print()
void BatchHelpers::BatchData::print |
( |
std::ostream & |
os, |
|
|
const std::string & |
indent |
|
) |
| const |
◆ setStatus()
bool BatchHelpers::BatchData::setStatus |
( |
std::size_t |
begin, |
|
|
std::size_t |
size, |
|
|
Status_t |
stat |
|
) |
| |
|
inline |
Set the status of a batch with the given start point and size.
The status of foreign read-only data will never change.
- Returns
- True if status successfully set, false if no such batch / not writable.
Definition at line 84 of file BatchData.h.
◆ status()
Status_t BatchHelpers::BatchData::status |
( |
std::size_t |
begin, |
|
|
std::size_t |
size |
|
) |
| const |
|
inline |
Return the status of the batch starting at begin
.
- Parameters
-
[in] | begin | Start of the batch. |
[in] | size | Size of the batch. This is used to check if the size of an existing batch matches the requested size. Asking for a too large size will be signalled by kNoBatch. |
Definition at line 48 of file BatchData.h.
◆ validRange()
bool BatchHelpers::BatchData::validRange |
( |
std::size_t |
begin, |
|
|
std::size_t |
size |
|
) |
| const |
|
inlineprivate |
◆ _foreignData
const std::vector<double>* BatchHelpers::BatchData::_foreignData |
|
private |
◆ _ownedBatches
Map_t BatchHelpers::BatchData::_ownedBatches |
|
private |
[legend]
The documentation for this class was generated from the following files: