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 >
78 ScheduleDeleteMultiDim< GUM_SCALAR >&
80 const ScheduleDeleteMultiDim< GUM_SCALAR >& from) {
96 template <
typename GUM_SCALAR >
98 const ScheduleOperation< GUM_SCALAR >& op)
const {
99 if (this->
type() != op.type())
return false;
101 const ScheduleDeleteMultiDim< GUM_SCALAR >& real_op =
102 static_cast< const ScheduleDeleteMultiDim< GUM_SCALAR >&
>(op);
103 return __table == real_op.__table;
107 template <
typename GUM_SCALAR >
109 const ScheduleOperation< GUM_SCALAR >& op)
const {
110 if (this->
type() != op.type())
return true;
112 const ScheduleDeleteMultiDim< GUM_SCALAR >& real_op =
113 static_cast< const ScheduleDeleteMultiDim< GUM_SCALAR >&
>(op);
114 return __table != real_op.__table;
118 template <
typename GUM_SCALAR >
120 const MultiDimImplementation< GUM_SCALAR >& multidim =
__table.multiDim();
128 template <
typename GUM_SCALAR >
134 template <
typename GUM_SCALAR >
135 INLINE std::pair< long, long >
137 long size_table = long(
__table.domainSize());
139 if (size_table < 0) {
140 GUM_ERROR(OutOfBounds,
"memory usage out of long int range");
143 return std::pair< long, long >(-size_table, -size_table);
147 template <
typename GUM_SCALAR >
148 INLINE
const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >&
151 __args =
new Sequence< const ScheduleMultiDim< GUM_SCALAR >* >;
159 template <
typename GUM_SCALAR >
160 INLINE
const Sequence< const ScheduleMultiDim< GUM_SCALAR >* >&
162 static Sequence< const ScheduleMultiDim< GUM_SCALAR >* > empty_seq;
163 # ifdef GUM_DEBUG_MODE 167 static bool first_time =
true;
171 __debug__::__inc_deletion(
172 "Sequence", __FILE__, __LINE__,
"destructor of", (
void*)&empty_seq);
173 __debug__::__inc_deletion(
"SequenceImplementation",
178 __debug__::__inc_deletion(
179 "HashTable", __FILE__, __LINE__,
"destructor of", (
void*)&empty_seq);
180 __debug__::__inc_deletion(
"SequenceIteratorSafe",
185 __debug__::__inc_deletion(
"SequenceIteratorSafe",
197 template <
typename GUM_SCALAR >
199 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-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
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-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
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