15#ifndef TMVA_RBATCHLOADER
16#define TMVA_RBATCHLOADER
25#include <condition_variable>
170 std::vector<std::unique_ptr<RFlat2DMatrix>>
batches;
173 for (std::size_t i = 0; i <
Batches; i++) {
199 batches.emplace_back(std::move(copy));
224 batches.emplace_back(std::move(copy));
240 batches.emplace_back(std::move(copy));
248 for (std::size_t i = 0; i <
batches.size(); i++) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
These classes encapsulate the necessary data for the computations.
std::unique_ptr< RFlat2DMatrix > fSecondaryLeftoverBatch
std::size_t GetNumBatchQueue()
std::unique_ptr< RFlat2DMatrix > CreateBatch(RFlat2DMatrix &chunTensor, std::size_t idxs)
Return a batch of data as a unique pointer.
std::size_t GetNumRemainderRows()
std::vector< std::size_t > fVecSizes
std::size_t GetNumEntries()
std::size_t fNumLeftoverBatches
void CreateBatches(RFlat2DMatrix &chunkTensor, std::size_t lastbatch)
Creating the batches from a chunk and add them to the queue.
std::unique_ptr< RFlat2DMatrix > fCurrentBatch
std::size_t GetNumBatches()
std::queue< std::unique_ptr< RFlat2DMatrix > > fBatchQueue
std::condition_variable fBatchCondition
RFlat2DMatrix GetBatch()
Loading the batch from the queue.
std::size_t fNumFullBatches
std::unique_ptr< RFlat2DMatrix > fPrimaryLeftoverBatch
std::vector< std::string > fCols
std::size_t fLeftoverBatchSize
void DeActivate()
DeActivate the batchloader.
RBatchLoader(std::size_t batchSize, const std::vector< std::string > &cols, const std::vector< std::size_t > &vecSizes={}, std::size_t numEntries=0, bool dropRemainder=false)
Wrapper around ROOT::RVec<float> representing a 2D matrix.