aGrUM  0.14.2
schedulerBasic.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Pierre-Henri WUILLEMIN et Christophe GONZALES *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
26 #ifndef GUM_SCHEDULER_BASIC_H
27 #define GUM_SCHEDULER_BASIC_H
28 
30 
31 namespace gum {
32 
33  template < typename GUM_SCALAR >
34  class SchedulerBasic : public Scheduler< GUM_SCALAR > {
35  public:
36  // ############################################################################
38  // ############################################################################
40 
43 
46 
48  virtual ~SchedulerBasic();
49 
51 
53 
55 
56  // ############################################################################
58  // ############################################################################
60 
62 
64 
66 
71 
75  float nbOperations(const Schedule< GUM_SCALAR >&) const;
76 
83  float nbOperations(const Schedule< GUM_SCALAR >&, Size k) const;
84 
86 
93  std::pair< long, long > memoryUsage(const Schedule< GUM_SCALAR >&) const;
94 
107  std::pair< long, long > memoryUsage(const Schedule< GUM_SCALAR >&,
108  Size k) const;
109 
111  };
112 
113 } /* namespace gum */
114 
115 // always include the template implementation
117 
118 #endif /* GUM_SCHEDULER_BASIC_H */
a scheduler that executes any available operation (chosen aribtrarily)
std::pair< long, long > memoryUsage(const Schedule< GUM_SCALAR > &) const
returns the memory consumption used during the execution of a schedule
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
the common interface of all the schedulers
SchedulerBasic< GUM_SCALAR > * newFactory() const
virtual constructor
bool execute(Schedule< GUM_SCALAR > &)
execute all the operations of a given schedule
SchedulerBasic()
default constructor
virtual ~SchedulerBasic()
destructor
Class containing a schedule of operations to perform on multidims.
Definition: schedule.h:65
float nbOperations(const Schedule< GUM_SCALAR > &) const
returns an estimation of the number of elementary operations needed to perform a given schedule ...
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:45