14#ifndef TMVA_RCHUNKLOADER
15#define TMVA_RCHUNKLOADER
27namespace Experimental {
31template <
typename... ColTypes>
40 template <typename T, std::enable_if_t<ROOT::Internal::RDF::IsDataContainer<T>::value,
int> = 0>
44 const auto &vec_size =
vec.size();
45 if (vec_size < max_vec_size)
57 template <typename T, std::enable_if_t<!ROOT::Internal::RDF::IsDataContainer<T>::value,
int> = 0>
77template <
typename... ColTypes>
91 template <typename T, std::enable_if_t<ROOT::Internal::RDF::IsDataContainer<T>::value,
int> = 0>
95 std::size_t vec_size =
vec.size();
96 if (vec_size < max_vec_size)
109 template <typename T, std::enable_if_t<!ROOT::Internal::RDF::IsDataContainer<T>::value,
int> = 0>
119 std::size_t chunkSize, std::size_t &&
offset,
120 const std::vector<std::size_t> &maxVecSizes = std::vector<std::size_t>(),
121 const float vecPadding = 0.0)
146template <
typename... Args>
168 const std::vector<std::string> &cols,
const std::vector<std::size_t> &vecSizes = {},
169 const float vecPadding = 0.0)
194 return myCount.GetValue();
198template <
typename... Args>
226 const std::size_t chunkSize,
const std::vector<std::string> &cols, std::size_t numEntries,
227 std::size_t numAllEntries,
const std::vector<std::size_t> &vecSizes = {},
228 const float vecPadding = 0.0)
247 std::pair<std::size_t, std::size_t>
LoadChunk(std::size_t currentRow)
259 std::size_t passedEvents = 0;
260 std::size_t processedEvents = 0;
268 processedEvents += report.begin()->GetAll();
269 passedEvents += (report.end() - 1)->GetPass();
272 func.SetEntries() = passedEvents;
278 return std::make_pair(processedEvents, passedEvents);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
The public interface to the RDataFrame federation of classes.
RResultPtr< ULong64_t > Count()
Return the number of entries processed (lazy action).
RResultPtr< RCutFlowReport > Report()
Gather filtering statistics.
void Foreach(F f, const ColumnNames_t &columns={})
Execute a user-defined function on each entry (instant action).
std::pair< std::size_t, std::size_t > LoadChunk(std::size_t currentRow)
Load a chunk of data using the RChunkLoaderFunctor.
const std::size_t fNumEntries
std::size_t fNumAllEntries
std::size_t fRemainderChunkTensorRow
const std::size_t fPartOfChunkSize
TMVA::Experimental::RTensor< float > & fChunkTensor
std::vector< std::string > fCols
std::vector< std::size_t > fVecSizes
TMVA::Experimental::RTensor< float > fRemainderChunkTensor
RChunkLoaderFilters(ROOT::RDF::RNode &rdf, TMVA::Experimental::RTensor< float > &chunkTensor, const std::size_t chunkSize, const std::vector< std::string > &cols, std::size_t numEntries, std::size_t numAllEntries, const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0)
Constructor for the RChunkLoader.
void operator()(const ColTypes &...cols)
void AssignToTensor(const T &val)
RChunkLoaderFunctorFilters(TMVA::Experimental::RTensor< float > &chunkTensor, TMVA::Experimental::RTensor< float > &remainderTensor, std::size_t entries, std::size_t chunkSize, std::size_t &&offset, const std::vector< std::size_t > &maxVecSizes=std::vector< std::size_t >(), const float vecPadding=0.0)
std::vector< std::size_t > fMaxVecSizes
std::size_t & SetEntries()
std::size_t & SetOffset()
void AssignToTensor(const T &vec)
TMVA::Experimental::RTensor< float > & fChunkTensor
TMVA::Experimental::RTensor< float > & fRemainderTensor
RChunkLoaderFunctor(TMVA::Experimental::RTensor< float > &chunkTensor, const std::vector< std::size_t > &maxVecSizes, float vecPadding)
std::vector< std::size_t > fMaxVecSizes
void operator()(const ColTypes &...cols)
void AssignToTensor(const T &val)
void AssignToTensor(const T &vec)
TMVA::Experimental::RTensor< float > & fChunkTensor
std::vector< std::string > fCols
std::size_t LoadChunk(const std::size_t currentRow)
Load a chunk of data using the RChunkLoaderFunctor.
RChunkLoader(ROOT::RDF::RNode &rdf, TMVA::Experimental::RTensor< float > &chunkTensor, const std::size_t chunkSize, const std::vector< std::string > &cols, const std::vector< std::size_t > &vecSizes={}, const float vecPadding=0.0)
Constructor for the RChunkLoader.
TMVA::Experimental::RTensor< float > & fChunkTensor
std::vector< std::size_t > fVecSizes
RTensor is a container with contiguous memory and shape information.
void ChangeBeginAndEndEntries(const RNode &node, Long64_t begin, Long64_t end)
create variable transformations