11 #ifndef BARE_FIELD_ITERATOR_H
12 #define BARE_FIELD_ITERATOR_H
35 template<
class T,
unsigned Dim>
class BareField;
38 template<
class T,
unsigned Dim>
134 while (!
done() && curr-- > 0)
139 const NDIndex<Dim>& domain = (*CurrentLField).second->getOwned();
141 for (
unsigned int d=0; d <
Dim; ++d)
142 offloc[d] = (loc[d] - domain[d].first()) / domain[d].stride();
155 const NDIndex<Dim>& domain = (*CurrentLField).second->getOwned();
156 for (
unsigned d=0; d<
Dim; ++d)
157 loc[d] = this->
GetOffset(d)*domain[d].stride() + domain[d].first();
164 const NDIndex<Dim>& domain = (*CurrentLField).second->getOwned();
165 for (
unsigned d=0; d<
Dim; ++d)
166 loc[d] = this->
GetOffset(d)*domain[d].stride() + domain[d].first();
173 if ( *
this == (*CurrentLField).second->end() )
211 (*CurrentLField).second->begin();
220 PAssert_EQ((*CurrentLField).second->IsCompressed(), is_compressed);
221 return is_compressed;
229 return (*CurrentLField).second->CanCompress();
235 (*CurrentLField).second->Compress();
241 (*CurrentLField).second->Compress(val);
247 return (*CurrentLField).second->TryCompress();
320 const NDIndex<Dim> &owned = (*CurrentLField).second->getOwned();
323 for (
unsigned d=0; d<
Dim; ++d)
325 unsigned locd = this->
GetOffset(d)*owned[d].stride() + owned[d].first();
326 if (!owned[d].contains(
Index(locd,locd)))
bool IsCompressed() const
ac_id_larray::iterator iterator_if
BareFieldIterator(BareField< T, Dim > &df)
void SetCurrentLocation(const FieldLoc< Dim > &loc)
BareFieldIterator(const FieldLoc< Dim > &loc, BareField< T, Dim > &df)
BareFieldIterator< T, Dim > & operator++()
void GetCurrentLocation(FieldLoc< Dim > &loc) const
BareField< T, Dim > * MyBareField
const BareField< T, Dim > & GetBareField() const
bool IsCompressed() const
BareFieldIterator(const BareFieldIterator< T, Dim > &iter)
BareField< T, Dim >::iterator_if CurrentLField
void prepareForScalarCode(bool tryfill=true)
void GetCurrentLocation(int *loc) const
BareField< T, Dim > & GetBareField()
void finishScalarCode(bool modified=true)
const BareFieldIterator< T, Dim > & operator=(const BareFieldIterator< T, Dim > &rhs)
bool done(unsigned d) const
int GetOffset(unsigned d) const
bool done(unsigned d) const
BrickIterator & operator++()
void setIndex(int newval)
static void abort(const char *=0)