29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 36 template <
typename GUM_SCALAR >
39 GUM_CONSTRUCTOR(ScheduleCombination);
43 template <
typename GUM_SCALAR >
45 const ScheduleCombination< GUM_SCALAR >& from) {
47 GUM_CONS_CPY(ScheduleCombination);
51 template <
typename GUM_SCALAR >
54 GUM_DESTRUCTOR(ScheduleCombination);
58 template <
typename GUM_SCALAR >
60 const Set<
const MultiDimImplementation< GUM_SCALAR >* >&
set,
61 Schedule< GUM_SCALAR >& schedule) {
63 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
65 for (
const auto pot :
set)
66 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*pot));
69 const ScheduleMultiDim< GUM_SCALAR >& res = combine(sched_set, schedule);
72 for (
const auto sched : sched_set)
79 template <
typename GUM_SCALAR >
80 template <
template <
typename >
class TABLE >
82 const Set<
const TABLE< GUM_SCALAR >* >&
set,
83 Schedule< GUM_SCALAR >& schedule) {
85 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
87 for (
const auto tab :
set)
88 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*tab->content()));
91 const ScheduleMultiDim< GUM_SCALAR >& res = combine(sched_set, schedule);
94 for (
const auto sched : sched_set)
102 template <
typename GUM_SCALAR >
104 const Set<
const MultiDimImplementation< GUM_SCALAR >* >&
set,
105 const Schedule< GUM_SCALAR >& schedule) {
107 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
109 for (
const auto pot :
set)
110 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*pot));
113 float res = nbOperations(sched_set, schedule);
116 for (
const auto sched : sched_set)
124 template <
typename GUM_SCALAR >
125 template <
template <
typename >
class TABLE >
127 const Set<
const TABLE< GUM_SCALAR >* >&
set,
128 const Schedule< GUM_SCALAR >& schedule) {
130 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
132 for (
const auto tab :
set)
133 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*tab->content()));
136 float res = nbOperations(sched_set, schedule);
139 for (
const auto sched : sched_set)
146 template <
typename GUM_SCALAR >
148 const Set<
const MultiDimImplementation< GUM_SCALAR >* >&
set,
149 const Schedule< GUM_SCALAR >& schedule) {
151 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
153 for (
const auto pot :
set)
154 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*pot));
157 std::pair< long, long > res = memoryUsage(sched_set, schedule);
160 for (
const auto sched : sched_set)
168 template <
typename GUM_SCALAR >
169 template <
template <
typename >
class TABLE >
171 const Set<
const TABLE< GUM_SCALAR >* >&
set,
172 const Schedule< GUM_SCALAR >& schedule) {
174 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
176 for (
const auto tab :
set)
177 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*tab->content()));
180 std::pair< long, long > res = memoryUsage(sched_set, schedule);
183 for (
const auto sched : sched_set)
virtual float nbOperations(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)=0
returns a rough estimate of the number of operations that will be performed to compute the combinatio...
ScheduleCombination()
default constructor
virtual std::pair< long, long > memoryUsage(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, const Schedule< GUM_SCALAR > &schedule)=0
returns the memory consumption used during the combination
virtual ScheduleMultiDim< GUM_SCALAR > combine(const Set< const ScheduleMultiDim< GUM_SCALAR > * > &set, Schedule< GUM_SCALAR > &schedule)=0
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual ~ScheduleCombination()
destructor