29 #ifndef DOXYGEN_SHOULD_SKIP_THIS 40 template <
typename GUM_SCALAR >
42 const ScheduleMultiDim< GUM_SCALAR >& table) :
43 ScheduleOperation< GUM_SCALAR >(
44 ScheduleOperation< GUM_SCALAR >::Type::DELETE_MULTIDIM),
45 __table(table), __args(0) {
51 template <
typename GUM_SCALAR >
53 const ScheduleDeleteMultiDim< GUM_SCALAR >& from) :
61 template <
typename GUM_SCALAR >
62 ScheduleDeleteMultiDim< GUM_SCALAR >*
64 return new ScheduleDeleteMultiDim< GUM_SCALAR >(*this);
68 template <
typename GUM_SCALAR >
77 template <
typename GUM_SCALAR >
79 operator=(
const ScheduleDeleteMultiDim< GUM_SCALAR >& from) {
95 template <
typename GUM_SCALAR >
97 operator==(
const ScheduleOperation< GUM_SCALAR >& op)
const {
98 if (this->
type() != op.type())
return false;
100 const ScheduleDeleteMultiDim< GUM_SCALAR >& real_op =
101 static_cast< const ScheduleDeleteMultiDim< GUM_SCALAR >&
>(op);
102 return __table == real_op.__table;
106 template <
typename GUM_SCALAR >
108 operator!=(
const ScheduleOperation< GUM_SCALAR >& op)
const {
109 if (this->
type() != op.type())
return true;
111 const ScheduleDeleteMultiDim< GUM_SCALAR >& real_op =
112 static_cast< const ScheduleDeleteMultiDim< GUM_SCALAR >&
>(op);
113 return __table != real_op.__table;
117 template <
typename GUM_SCALAR >
119 const MultiDimImplementation< GUM_SCALAR >& multidim =
__table.multiDim();
127 template <
typename GUM_SCALAR >
133 template <
typename GUM_SCALAR >
134 INLINE std::pair< long, long >
136 long size_table = long(
__table.domainSize());
138 if (size_table < 0) {
139 GUM_ERROR(OutOfBounds,
"memory usage out of long int range");
142 return std::pair< long, long >(-size_table, -size_table);
146 template <
typename GUM_SCALAR >
147 INLINE
const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >&
150 __args =
new Sequence< const ScheduleMultiDim< GUM_SCALAR >* >;
158 template <
typename GUM_SCALAR >
159 INLINE
const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >&
161 static Sequence< const ScheduleMultiDim< GUM_SCALAR >* > empty_seq;
162 # ifdef GUM_DEBUG_MODE 166 static bool first_time =
true;
170 __debug__::__inc_deletion(
171 "Sequence", __FILE__, __LINE__,
"destructor of", (
void*)&empty_seq);
172 __debug__::__inc_deletion(
"SequenceImplementation",
177 __debug__::__inc_deletion(
178 "HashTable", __FILE__, __LINE__,
"destructor of", (
void*)&empty_seq);
179 __debug__::__inc_deletion(
"SequenceIteratorSafe",
184 __debug__::__inc_deletion(
"SequenceIteratorSafe",
196 template <
typename GUM_SCALAR >
198 return "delete ( " +
__table.toString() +
" )";
static HashTable< const MultiDimImplementation< GUM_SCALAR > *, Idx > & __multidim2id()
returns the id corresponding to a given multidim
std::string toString() const
displays the content of the operation
Type type() const
returns the name of the operation
const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimResults() const
returns the set of multidims that should be the result of the operation
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::pair< long, long > memoryUsage() const
returns the memory consumption used during the operation
virtual ~ScheduleDeleteMultiDim()
destructor
ScheduleDeleteMultiDim(const ScheduleMultiDim< GUM_SCALAR > &table)
default constructor
void execute()
executes the operation
ScheduleOperation(Type t)
default constructor
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
ScheduleMultiDim< GUM_SCALAR > __table
ScheduleOperation< GUM_SCALAR > & operator=(const ScheduleOperation< GUM_SCALAR > &)
copy operator
float nbOperations() const
returns an estimation of the number of elementary operations needed to perform the ScheduleOperation ...
ScheduleDeleteMultiDim< GUM_SCALAR > & operator=(const ScheduleDeleteMultiDim< GUM_SCALAR > &)
copy operator
static HashTable< Idx, const MultiDimImplementation< GUM_SCALAR > *> & __id2multidim()
returns a mapping from id to multidimImplementations
virtual ScheduleDeleteMultiDim< GUM_SCALAR > * newFactory() const
virtual copy constructor: creates a clone of the operation
const Sequence< const ScheduleMultiDim< GUM_SCALAR > *> & multiDimArgs() const
returns the set of multidims passed in argument to the operation
bool operator==(const ScheduleOperation< GUM_SCALAR > &) const
operator ==
#define GUM_ERROR(type, msg)
bool operator!=(const ScheduleOperation< GUM_SCALAR > &) const
operator !=
Sequence< const ScheduleMultiDim< GUM_SCALAR > *> * __args
the set of ScheduleMultidims passed in arguments