aGrUM  0.16.0
scheduler.h
Go to the documentation of this file.
1 
29 #ifndef GUM_SCHEDULER_H
30 #define GUM_SCHEDULER_H
31 
33 #include <utility>
34 
35 namespace gum {
36 
37  template < typename GUM_SCALAR >
38  class Scheduler {
39  public:
40  // ############################################################################
42  // ############################################################################
44 
46  Scheduler();
47 
50 
52  virtual ~Scheduler();
53 
55 
56  virtual Scheduler< GUM_SCALAR >* newFactory() const = 0;
57 
59 
60  // ############################################################################
62  // ############################################################################
64 
66 
67  virtual bool execute(Schedule< GUM_SCALAR >&) = 0;
68 
70 
74  virtual bool execute(Schedule< GUM_SCALAR >&, Size k) = 0;
75 
79  virtual float nbOperations(const Schedule< GUM_SCALAR >&) const = 0;
80 
87  virtual float nbOperations(const Schedule< GUM_SCALAR >&, Size k) const = 0;
88 
90 
97  virtual std::pair< long, long >
98  memoryUsage(const Schedule< GUM_SCALAR >&) const = 0;
99 
112  virtual std::pair< long, long > memoryUsage(const Schedule< GUM_SCALAR >&,
113  Size k) const = 0;
114 
116  };
117 
118 } /* namespace gum */
119 
120 // always include the template implementation
122 
123 #endif /* GUM_SCHEDULER_H */
virtual std::pair< long, long > memoryUsage(const Schedule< GUM_SCALAR > &) const =0
returns the memory consumption used during the execution of a schedule
virtual Scheduler< GUM_SCALAR > * newFactory() const =0
virtual constructor
virtual bool execute(Schedule< GUM_SCALAR > &)=0
execute all the operations of a given schedule
virtual float nbOperations(const Schedule< GUM_SCALAR > &) const =0
returns an estimation of the number of elementary operations needed to perform a given schedule ...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
virtual ~Scheduler()
destructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Scheduler()
default constructor
Class containing a schedule of operations to perform on multidims.
Definition: schedule.h:68
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.