LAMA
|
LAMAArrayConstView is a proxy which gives a constant view to a sub range of a LAMAArray. More...
#include <LAMAArrayView.hpp>
Public Types | |
typedef T | ValueType |
ValueType is the type stored in this container. | |
Public Member Functions | |
LAMAArrayConstView (const LAMAArrayConstView< T > &other) | |
Takes a copy of the passed LAMAArrayConstView. | |
LAMAArrayConstView (const LAMAArrayView< T > &view) | |
Takes a copy of the passed LAMAArrayView. | |
LAMAArrayConstView (const LAMAArray< T > &array) | |
Constructs a view into the whole passed LAMAArray. | |
LAMAArrayConstView (const LAMAArray< T > &array, const IndexType offset, const IndexType size) | |
Constructs a view of the passed size into the passed LAMAArray starting at the passed offset. | |
virtual | ~LAMAArrayConstView () |
destroys this LAMAArrayView, the referenced LAMAArray is not touched. | |
IndexType | size () const |
Returns the size of this LAMAArrayView. | |
virtual void | writeAt (std::ostream &stream) const |
Writes some Information about this to the passed stream. | |
bool | operator== (const LAMAArrayConstView< T > &other) const |
Checks if the LAMAArray referenced by other is the same than the LAMAArray reference by this. | |
bool | operator!= (const LAMAArrayConstView< T > &other) const |
Checks if the LAMAArray referenced by other is not the same than the LAMAArray reference by this. | |
bool | operator== (const LAMAArrayView< T > &other) const |
Checks if the LAMAArray referenced by other is the same than the LAMAArray reference by this. | |
bool | operator!= (const LAMAArrayView< T > &other) const |
Checks if the LAMAArray referenced by other is not the same than the LAMAArray reference by this. | |
Private Member Functions | |
LAMAArrayConstView () | |
LAMAArrayConstView & | operator= (const LAMAArrayConstView< T > &other) |
const ValueType * | get (const size_t index) const |
int | acquireReadAccess (ContextPtr context) const |
void | releaseReadAccess (const size_t index) const |
Private Attributes | |
const LAMAArray< T > & | mArray |
const IndexType | mOffset |
const IndexType | mSize |
Friends | |
class | ReadAccess< T > |
LAMAArrayConstView is a proxy which gives a constant view to a sub range of a LAMAArray.
typedef T lama::LAMAArrayConstView< T >::ValueType |
ValueType is the type stored in this container.
lama::LAMAArrayConstView< T >::LAMAArrayConstView | ( | const LAMAArrayConstView< T > & | other | ) |
Takes a copy of the passed LAMAArrayConstView.
[in] | other | the LAMAArrayConstView to take a copy from. |
lama::LAMAArrayConstView< T >::LAMAArrayConstView | ( | const LAMAArrayView< T > & | view | ) |
Takes a copy of the passed LAMAArrayView.
[in] | view | the LAMAArrayView to take a copy from. |
lama::LAMAArrayConstView< T >::LAMAArrayConstView | ( | const LAMAArray< T > & | array | ) |
Constructs a view into the whole passed LAMAArray.
[in,out] | array | the array to get a view into. |
lama::LAMAArrayConstView< T >::LAMAArrayConstView | ( | const LAMAArray< T > & | array, |
const IndexType | offset, | ||
const IndexType | size | ||
) |
Constructs a view of the passed size into the passed LAMAArray starting at the passed offset.
[in,out] | array | the array to get a view into. |
[in] | offset | the index where the view into array should start. |
[in] | size | the lenght of the subrange of array. |
References LAMA_THROWEXCEPTION, lama::LAMAArrayConstView< T >::mArray, lama::LAMAArrayConstView< T >::mOffset, and lama::LAMAArrayConstView< T >::mSize.
lama::LAMAArrayConstView< T >::~LAMAArrayConstView | ( | ) | [virtual] |
destroys this LAMAArrayView, the referenced LAMAArray is not touched.
lama::LAMAArrayConstView< T >::LAMAArrayConstView | ( | ) | [private] |
int lama::LAMAArrayConstView< T >::acquireReadAccess | ( | ContextPtr | context | ) | const [private] |
Referenced by lama::ReadAccess< T >::ReadAccess().
const T * lama::LAMAArrayConstView< T >::get | ( | const size_t | index | ) | const [private] |
bool lama::LAMAArrayConstView< T >::operator!= | ( | const LAMAArrayConstView< T > & | other | ) | const |
Checks if the LAMAArray referenced by other is not the same than the LAMAArray reference by this.
Checks if the LAMAArray referenced by other is not the same than the LAMAArray reference by this. CAVEAT: It is only checked if the LAMAArrays are not the same. Size and offset of the views are not checked for inequality.
[in] | other | the LAMAArrayConstView to compare this with. |
bool lama::LAMAArrayConstView< T >::operator!= | ( | const LAMAArrayView< T > & | other | ) | const |
Checks if the LAMAArray referenced by other is not the same than the LAMAArray reference by this.
Checks if the LAMAArray referenced by other is not the same than the LAMAArray reference by this. CAVEAT: It is only checked if the LAMAArrays are not the same. Size and offset of the views are not checked for inequality.
[in] | other | the LAMAArrayView to compare this with. |
LAMAArrayConstView& lama::LAMAArrayConstView< T >::operator= | ( | const LAMAArrayConstView< T > & | other | ) | [private] |
bool lama::LAMAArrayConstView< T >::operator== | ( | const LAMAArrayConstView< T > & | other | ) | const |
Checks if the LAMAArray referenced by other is the same than the LAMAArray reference by this.
Checks if the the LAMAArray referenced by other is the same than the LAMAArray reference by this. CAVEAT: It is only checked if the LAMAArrays are the same. Size and offset of the views are not checked for equality.
[in] | other | the LAMAArrayConstView to compare this with. |
References lama::LAMAArrayConstView< T >::mArray.
bool lama::LAMAArrayConstView< T >::operator== | ( | const LAMAArrayView< T > & | other | ) | const |
Checks if the LAMAArray referenced by other is the same than the LAMAArray reference by this.
Checks if the LAMAArray referenced by other is the same than the LAMAArray reference by this. CAVEAT: It is only checked if the LAMAArrays are the same. Size and offset of the views are not checked for equality.
[in] | other | the LAMAArrayView to compare this with. |
References lama::LAMAArrayView< T >::mArray.
void lama::LAMAArrayConstView< T >::releaseReadAccess | ( | const size_t | index | ) | const [private] |
IndexType lama::LAMAArrayConstView< T >::size | ( | ) | const [inline] |
Returns the size of this LAMAArrayView.
Referenced by lama::JDSStorage< T >::jacobiIterate(), lama::DIAStorage< T >::jacobiIterate(), lama::COOStorage< T >::jacobiIterate(), lama::ELLStorage< T >::jacobiIterate(), lama::CSRStorage< T >::jacobiIterate(), lama::JDSStorage< T >::jacobiIterateHalo(), lama::ELLStorage< T >::jacobiIterateHalo(), lama::CSRStorage< T >::jacobiIterateHalo(), lama::JDSStorage< T >::matrixTimesVector(), lama::DIAStorage< T >::matrixTimesVector(), lama::DenseStorageView< T >::matrixTimesVector(), lama::COOStorage< T >::matrixTimesVector(), lama::ELLStorage< T >::matrixTimesVector(), lama::CSRStorage< T >::matrixTimesVector(), lama::ELLStorage< T >::matrixTimesVectorAsync(), lama::CSRStorage< T >::matrixTimesVectorAsync(), lama::COOStorage< T >::matrixTimesVectorAsyncToDo(), lama::CSRStorage< T >::matrixTimesVectorN(), and lama::SparseAssemblyStorage< T >::setRow().
void lama::LAMAArrayConstView< T >::writeAt | ( | std::ostream & | stream | ) | const [virtual] |
Writes some Information about this to the passed stream.
If a deriving class does not overrides writeAt, typeid(this).name() is written to stream.
[out] | stream | the stream to write to. |
Reimplemented from Printable.
friend class ReadAccess< T > [friend] |
const LAMAArray<T>& lama::LAMAArrayConstView< T >::mArray [private] |
const IndexType lama::LAMAArrayConstView< T >::mOffset [private] |
Referenced by lama::LAMAArrayConstView< T >::LAMAArrayConstView().
const IndexType lama::LAMAArrayConstView< T >::mSize [private] |
Referenced by lama::LAMAArrayConstView< T >::LAMAArrayConstView().