37 #ifndef DISTRIBUTEDVECTOR_HPP_ 38 #define DISTRIBUTEDVECTOR_HPP_ 45 #include "DistributedVectorException.hpp" 58 friend class TestDistributedVector;
214 assert(mStripe < mStride);
215 mpVec = parallelVec.
mpVec;
216 mLo = parallelVec.
GetLow();
239 if (mLo <= globalIndex && globalIndex < mHi)
241 return mpVec[(globalIndex -
mLo)*mStride + mStripe];
252 return mpVec[index.
Local*mStride + mStripe];
280 mLo = parallelVec.
GetLow();
282 mOffset = chunk * (mHi -
mLo);
283 mpVec = parallelVec.
mpVec;
296 if (mLo <= globalIndex && globalIndex < mHi)
299 return mpVec[mOffset + globalIndex -
mLo];
310 return mpVec[mOffset + index.
Local];
DistributedVector(Vec vec, DistributedVectorFactory *pFactory, bool readOnly=false)
DistributedVectorFactory * mpFactory
DistributedVectorFactory * GetFactory()
double & operator[](unsigned globalIndex)
double & operator[](Iterator index)
DistributedVectorFactory * GetFactory()
bool operator!=(const Iterator &rOther)
bool IsGlobalIndexLocal(unsigned globalIndex)
double & operator[](Iterator index)
Stripe(DistributedVector parallelVec, unsigned stripe)
double & operator[](unsigned globalIndex)
double & operator[](unsigned globalIndex)
DistributedVectorFactory * mpFactory
Chunk(DistributedVector parallelVec, unsigned chunk)