Logo ROOT  
Reference Guide
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
17namespace ROOT {
18
19// fwd decl
20namespace Internal {
21namespace RDF {
22class GraphNode;
23} // ns RDF
24} // ns Internal
25
26namespace Detail {
27namespace RDF {
29
30class RLoopManager;
31
32class RRangeBase : public RNodeBase {
33protected:
34 unsigned int fStart;
35 unsigned int fStop;
36 unsigned int fStride;
38 bool fLastResult{true};
40 bool fHasStopped{false}; ///< True if the end of the range has been reached
41 const unsigned int fNSlots; ///< Number of thread slots used by this node, inherited from parent node.
42
43 void ResetCounters();
44
45public:
46 RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride,
47 const unsigned int nSlots);
48
49 RRangeBase &operator=(const RRangeBase &) = delete;
50 virtual ~RRangeBase();
51
52 void InitNode() { ResetCounters(); }
53 virtual std::shared_ptr<RDFGraphDrawing::GraphNode> GetGraph() = 0;
54};
55
56} // ns RDF
57} // ns Detail
58} // ns ROOT
59
60#endif // ROOT_RRANGEBASE
long long Long64_t
Definition: RtypesCore.h:69
unsigned long long ULong64_t
Definition: RtypesCore.h:70
The head node of a RDF computation graph.
Base class for non-leaf nodes of the computational graph.
Definition: RNodeBase.hxx:41
RRangeBase & operator=(const RRangeBase &)=delete
virtual std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph()=0
RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride, const unsigned int nSlots)
Definition: RRangeBase.cxx:16
const unsigned int fNSlots
Number of thread slots used by this node, inherited from parent node.
Definition: RRangeBase.hxx:41
bool fHasStopped
True if the end of the range has been reached.
Definition: RRangeBase.hxx:40
Class used to create the operation graph to be printed in the dot representation.
Definition: GraphNode.hxx:26
VSD Structures.
Definition: StringConv.hxx:21