Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RRangeBase.hxx
Go to the documentation of this file.
1// Author: Enrico Guiraud, Danilo Piparo CERN 09/2018
2
3/*************************************************************************
4 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_RRANGEBASE
12#define ROOT_RRANGEBASE
13
15#include "RtypesCore.h"
16
17#include <unordered_map>
18
19namespace ROOT {
20namespace Internal {
21namespace RDF {
22namespace GraphDrawing {
23class GraphNode;
24}
25} // namespace RDF
26} // namespace Internal
27
28namespace Detail {
29namespace RDF {
30
31class RLoopManager;
32
33class RRangeBase : public RNodeBase {
34protected:
35 unsigned int fStart;
36 unsigned int fStop;
37 unsigned int fStride;
39 bool fLastResult{true};
41 bool fHasStopped{false}; ///< True if the end of the range has been reached
42 const unsigned int fNSlots; ///< Number of thread slots used by this node, inherited from parent node.
43 std::unordered_map<std::string, std::shared_ptr<RRangeBase>> fVariedRanges;
44
45public:
46 RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride,
47 const unsigned int nSlots, const std::vector<std::string> &prevVariations);
48
49 // Rule of five
50
51 RRangeBase(const RRangeBase &) = delete;
52 RRangeBase &operator=(const RRangeBase &) = delete;
53 RRangeBase(RRangeBase &&) = delete;
55 ~RRangeBase() override;
56
57 void InitNode();
58};
59
60} // ns RDF
61} // ns Detail
62} // namespace ROOT
63
64#endif // ROOT_RRANGEBASE
Basic types used by ROOT and required by TInterpreter.
The head node of a RDF computation graph.
Base class for non-leaf nodes of the computational graph.
Definition RNodeBase.hxx:43
RRangeBase & operator=(const RRangeBase &)=delete
RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride, const unsigned int nSlots, const std::vector< std::string > &prevVariations)
RRangeBase & operator=(RRangeBase &&)=delete
RRangeBase(RRangeBase &&)=delete
RRangeBase(const RRangeBase &)=delete
std::unordered_map< std::string, std::shared_ptr< RRangeBase > > fVariedRanges
const unsigned int fNSlots
Number of thread slots used by this node, inherited from parent node.
bool fHasStopped
True if the end of the range has been reached.
Namespace for new ROOT classes and functions.