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 {
20
21// fwd decl
22namespace Internal {
23namespace RDF {
24class GraphNode;
25} // ns RDF
26} // ns Internal
27
28namespace Detail {
29namespace RDF {
31
32class RLoopManager;
33
34class RRangeBase : public RNodeBase {
35protected:
36 unsigned int fStart;
37 unsigned int fStop;
38 unsigned int fStride;
40 bool fLastResult{true};
42 bool fHasStopped{false}; ///< True if the end of the range has been reached
43 const unsigned int fNSlots; ///< Number of thread slots used by this node, inherited from parent node.
44 std::unordered_map<std::string, std::shared_ptr<RRangeBase>> fVariedRanges;
45
46 void ResetCounters();
47
48public:
49 RRangeBase(RLoopManager *implPtr, unsigned int start, unsigned int stop, unsigned int stride,
50 const unsigned int nSlots, const std::vector<std::string> &prevVariations);
51
52 RRangeBase &operator=(const RRangeBase &) = delete;
53 virtual ~RRangeBase();
54
55 void InitNode() { ResetCounters(); }
56 virtual std::shared_ptr<RDFGraphDrawing::GraphNode> GetGraph() = 0;
57};
58
59} // ns RDF
60} // ns Detail
61} // ns ROOT
62
63#endif // ROOT_RRANGEBASE
long long Long64_t
Definition RtypesCore.h:80
unsigned long long ULong64_t
Definition RtypesCore.h:81
The head node of a RDF computation graph.
Base class for non-leaf nodes of the computational graph.
Definition RNodeBase.hxx:42
RRangeBase & operator=(const RRangeBase &)=delete
virtual std::shared_ptr< RDFGraphDrawing::GraphNode > GetGraph()=0
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.
Class used to create the operation graph to be printed in the dot representation.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...