LAMA
|
HostReadAccess is a specialization of ReadAccess for a Host context with an extended interface. More...
#include <HostReadAccess.hpp>
Public Types | |
typedef T | ValueType |
ValueType is the type stored in the wrapped container. | |
Public Member Functions | |
HostReadAccess (const LAMAArray< ValueType > &array) | |
acquire a ReadAccess to the passed LAMAArray for the Host Location | |
HostReadAccess (const LAMAArrayConstView< ValueType > &view) | |
virtual | ~HostReadAccess () |
Releases the ReadAccess on the associated LAMAArray. | |
const ValueType & | operator[] (const IndexType i) const |
constant access to the element i of the wrapped LAMAArray | |
operator const ValueType * () const | |
conversion to a constant ValueType pointer (shortcut for get() ) | |
const ValueType * | get () const |
returns a valid pointer to the data usable for the context | |
virtual void | release () |
release the acquired ReadAccess. | |
virtual void | writeAt (std::ostream &stream) const |
Writes some Information about this to the passed stream. | |
IndexType | size () const |
Returns the size of the array. | |
Private Member Functions | |
LAMA_LOG_DECL_STATIC_LOGGER (logger) | |
Private Attributes | |
const ValueType *const | mData |
HostReadAccess is a specialization of ReadAccess for a Host context with an extended interface.
typedef T lama::HostReadAccess< T >::ValueType |
ValueType is the type stored in the wrapped container.
Reimplemented from lama::ReadAccess< T >.
lama::HostReadAccess< T >::HostReadAccess | ( | const LAMAArray< ValueType > & | array | ) |
acquire a ReadAccess to the passed LAMAArray for the Host Location
[in] | array | the LAMAArray to acquire a ReadAccess for |
Exception | if the ReadAccess can not be acquired, e.g. because a WriteContext exists. |
References lama::HostReadAccess< T >::mData.
lama::HostReadAccess< T >::HostReadAccess | ( | const LAMAArrayConstView< ValueType > & | view | ) |
References lama::HostReadAccess< T >::mData.
lama::HostReadAccess< T >::~HostReadAccess | ( | ) | [virtual] |
Releases the ReadAccess on the associated LAMAArray.
const T * lama::ReadAccess< T >::get | ( | ) | const [inherited] |
returns a valid pointer to the data usable for the context
References LAMA_THROWEXCEPTION.
Referenced by lama::DenseVector< T >::assign(), lama::LAMAArrayUtils::assignImpl2(), lama::SparseMatrix< T >::assignTransposeImpl(), lama::COOStorage< T >::buildCSR(), lama::ELLStorage< T >::buildCSR(), lama::JDSStorage< T >::buildCSR(), lama::DIAStorage< T >::buildCSR(), lama::DenseStorageView< T >::buildCSR(), lama::CSRStorage< T >::buildCSR(), lama::ELLStorage< T >::buildRowIndexes(), lama::CSRStorage< T >::buildRowIndexes(), lama::ELLStorage< T >::check(), lama::JDSStorage< T >::check(), lama::JDSStorage< T >::checkDiagonalProperty(), lama::ELLStorage< T >::checkDiagonalProperty(), lama::CSRStorage< T >::checkDiagonalProperty(), lama::ELLStorage< T >::compress(), lama::LUSolver::computeLUFactorization(), lama::MatrixStorage< T >::convertCSR2CSC(), lama::DenseVector< T >::dotProduct(), lama::Communicator::exchangeByPlan(), lama::StorageMethods< T >::exchangeHaloCSR(), lama::LAMAArrayUtils::gather(), lama::COOStorage< T >::getDiagonalImpl(), lama::ELLStorage< T >::getDiagonalImpl(), lama::CSRStorage< T >::getDiagonalImpl(), lama::DenseStorageView< T >::getDiagonalImpl(), lama::DIAStorage< T >::getDiagonalImpl(), lama::JDSStorage< T >::getDiagonalImpl(), lama::ELLStorage< T >::getNumValues(), lama::_MatrixStorage::getNumValues(), lama::ELLStorage< T >::getRowImpl(), lama::JDSStorage< T >::getRowImpl(), lama::ELLStorage< T >::getValue(), lama::JDSStorage< T >::getValue(), 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::MatrixStorage< T >::joinRows(), lama::DenseVector< T >::l1Norm(), lama::DenseVector< T >::l2Norm(), lama::ELLStorage< T >::matrixAddMatrixELL(), lama::DenseStorageView< T >::matrixTimesMatrixDense(), lama::ELLStorage< T >::matrixTimesMatrixELL(), 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::CSRStorage< T >::matrixTimesVectorN(), lama::DenseStorageView< T >::maxDiffNormImpl(), lama::CSRStorage< T >::maxDiffNormImpl(), lama::DenseVector< T >::maxNorm(), lama::DenseStorageView< T >::print(), lama::LUSolver::ptrsm(), lama::DenseVector< T >::redistribute(), lama::StorageMethods< T >::redistributeCSR(), lama::StorageMethods< T >::replicateCSR(), lama::JDSStorage< T >::scaleImpl(), lama::ELLStorage< T >::scaleImpl(), lama::CSRStorage< T >::scaleImpl(), lama::DenseStorageView< T >::setCSRDataImpl(), lama::CSRStorage< T >::setCSRDataImpl(), lama::COOStorage< T >::setCSRDataImpl(), lama::JDSStorage< T >::setCSRDataImpl(), lama::ELLStorage< T >::setCSRDataImpl(), lama::SparseAssemblyStorage< T >::setCSRDataImpl(), lama::DIAStorage< T >::setCSRDataImpl(), lama::CSRStorage< T >::setCSRDataSwap(), lama::COOStorage< T >::setDiagonalImpl(), lama::ELLStorage< T >::setDiagonalImpl(), lama::CSRStorage< T >::setDiagonalImpl(), lama::JDSStorage< T >::setDiagonalImpl(), lama::DIAStorage< T >::setDiagonalImpl(), lama::DenseStorageView< T >::setDiagonalImpl(), lama::JDSStorage< T >::setupData(), lama::Communicator::shift(), lama::DenseVector< T >::vectorPlusVector(), lama::StorageIO< T >::writeCSRToBinaryFile(), lama::StorageIO< T >::writeCSRToXDRFile(), lama::DenseVector< T >::writeVectorDataToBinaryFile(), and lama::DenseVector< T >::writeVectorToXDRFile().
lama::HostReadAccess< T >::LAMA_LOG_DECL_STATIC_LOGGER | ( | logger | ) | [private] |
Reimplemented from lama::ReadAccess< T >.
lama::HostReadAccess< T >::operator const ValueType * | ( | ) | const [inline] |
const T & lama::HostReadAccess< T >::operator[] | ( | const IndexType | i | ) | const [inline] |
void lama::ReadAccess< T >::release | ( | ) | [virtual, inherited] |
release the acquired ReadAccess.
Release is mandatory to unlock the array so that it might be used for further write accesses.
Implements lama::BaseAccess.
Referenced by lama::CSRStorage< T >::compress(), and lama::StorageMethods< T >::exchangeHaloCSR().
IndexType lama::ReadAccess< T >::size | ( | ) | const [inline, inherited] |
Returns the size of the array.
Referenced by lama::HaloBuilder::build(), lama::Redistributor::copy(), lama::Redistributor::copyN(), lama::Redistributor::gather(), lama::Redistributor::gatherN(), lama::MatrixStorage< T >::joinRows(), lama::DenseVector< T >::max(), lama::DenseVector< T >::min(), lama::Redistributor::scatter(), lama::Redistributor::scatterN(), and lama::Communicator::shift().
void lama::ReadAccess< T >::writeAt | ( | std::ostream & | stream | ) | const [virtual, inherited] |
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 lama::BaseAccess.
const ValueType* const lama::HostReadAccess< T >::mData [private] |
Referenced by lama::HostReadAccess< T >::HostReadAccess().