26 #ifndef DOXYGEN_SHOULD_SKIP_THIS 33 template <
typename GUM_SCALAR >
36 GUM_CONSTRUCTOR(ScheduleCombination);
40 template <
typename GUM_SCALAR >
42 const ScheduleCombination< GUM_SCALAR >& from) {
44 GUM_CONS_CPY(ScheduleCombination);
48 template <
typename GUM_SCALAR >
51 GUM_DESTRUCTOR(ScheduleCombination);
55 template <
typename GUM_SCALAR >
57 const Set<
const MultiDimImplementation< GUM_SCALAR >* >&
set,
58 Schedule< GUM_SCALAR >& schedule) {
60 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
62 for (
const auto pot :
set)
63 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*pot));
66 const ScheduleMultiDim< GUM_SCALAR >& res = combine(sched_set, schedule);
69 for (
const auto sched : sched_set)
76 template <
typename GUM_SCALAR >
77 template <
template <
typename >
class TABLE >
79 const Set<
const TABLE< GUM_SCALAR >* >&
set,
80 Schedule< GUM_SCALAR >& schedule) {
82 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
84 for (
const auto tab :
set)
85 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*tab->content()));
88 const ScheduleMultiDim< GUM_SCALAR >& res = combine(sched_set, schedule);
91 for (
const auto sched : sched_set)
99 template <
typename GUM_SCALAR >
101 const Set<
const MultiDimImplementation< GUM_SCALAR >* >&
set,
102 const Schedule< GUM_SCALAR >& schedule) {
104 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
106 for (
const auto pot :
set)
107 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*pot));
110 float res = nbOperations(sched_set, schedule);
113 for (
const auto sched : sched_set)
121 template <
typename GUM_SCALAR >
122 template <
template <
typename >
class TABLE >
124 const Set<
const TABLE< GUM_SCALAR >* >&
set,
125 const Schedule< GUM_SCALAR >& schedule) {
127 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
129 for (
const auto tab :
set)
130 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*tab->content()));
133 float res = nbOperations(sched_set, schedule);
136 for (
const auto sched : sched_set)
143 template <
typename GUM_SCALAR >
145 const Set<
const MultiDimImplementation< GUM_SCALAR >* >&
set,
146 const Schedule< GUM_SCALAR >& schedule) {
148 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
150 for (
const auto pot :
set)
151 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*pot));
154 std::pair< long, long > res = memoryUsage(sched_set, schedule);
157 for (
const auto sched : sched_set)
165 template <
typename GUM_SCALAR >
166 template <
template <
typename >
class TABLE >
168 const Set<
const TABLE< GUM_SCALAR >* >&
set,
169 const Schedule< GUM_SCALAR >& schedule) {
171 Set< const ScheduleMultiDim< GUM_SCALAR >* > sched_set;
173 for (
const auto tab :
set)
174 sched_set.insert(
new ScheduleMultiDim< GUM_SCALAR >(*tab->content()));
177 std::pair< long, long > res = memoryUsage(sched_set, schedule);
180 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
gum is the global namespace for all aGrUM entities
virtual ~ScheduleCombination()
destructor