Template Numerical Library version\ main:0c33d623
|
DistributedVectorView extends DistributedArrayView with algebraic operations. More...
#include <TNL/Containers/DistributedVectorView.h>
Public Types | |
using | ConstLocalViewType = Containers::VectorView< std::add_const_t< Real >, Device, Index > |
using | ConstViewType = DistributedVectorView< std::add_const_t< Real >, Device, Index > |
using | DeviceType = Device |
using | IndexType = Index |
using | LocalViewType = Containers::VectorView< Real, Device, Index > |
using | RealType = Real |
template<typename _Real , typename _Device = Device, typename _Index = Index> | |
using | Self = DistributedVectorView< _Real, _Device, _Index > |
A template which allows to quickly obtain a VectorView type with changed template parameters. | |
using | ViewType = DistributedVectorView< Real, Device, Index > |
![]() | |
using | ConstLocalViewType = Containers::ArrayView< std::add_const_t< Value >, Device, Index > |
using | ConstViewType = DistributedArrayView< std::add_const_t< Value >, Device, Index > |
using | DeviceType = Device |
using | IndexType = Index |
using | LocalRangeType = Subrange< Index > |
using | LocalViewType = Containers::ArrayView< Value, Device, Index > |
template<typename _Value , typename _Device = Device, typename _Index = Index> | |
using | Self = DistributedArrayView< _Value, _Device, _Index > |
A template which allows to quickly obtain a DistributedArrayView type with changed template parameters. | |
using | SynchronizerType = ByteArraySynchronizer< DeviceType, IndexType > |
using | ValueType = Value |
using | ViewType = DistributedArrayView< Value, Device, Index > |
Public Member Functions | |
template<typename Real_ > | |
DistributedVectorView (const Containers::DistributedArrayView< Real_, Device, Index > &view) | |
DistributedArrayView ()=default | |
DistributedArrayView (const DistributedArrayView &)=default | |
template<typename Value_ > | |
DistributedArrayView (const DistributedArrayView< Value_, Device, Index > &) | |
DistributedArrayView (const LocalRangeType &localRange, IndexType ghosts, IndexType globalSize, MPI::Comm communicator, LocalViewType localData) | |
DistributedArrayView (DistributedArrayView &&) noexcept=default | |
ConstLocalViewType | getConstLocalView () const |
Returns a non-modifiable view of the local part of the vector. | |
ConstLocalViewType | getConstLocalViewWithGhosts () const |
Returns a non-modifiable view of the local part of the vector, including ghost values. | |
ConstViewType | getConstView () const |
Returns a non-modifiable view of the array view. | |
LocalViewType | getLocalView () |
Returns a modifiable view of the local part of the vector. | |
LocalViewType | getLocalViewWithGhosts () |
Returns a modifiable view of the local part of the vector, including ghost values. | |
ViewType | getView () |
Returns a modifiable view of the array view. | |
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >> | |
DistributedVectorView & | operator%= (const Vector &vector) |
template<typename Vector , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator%= (const Vector &vector) |
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >> | |
DistributedVectorView & | operator%= (Scalar c) |
template<typename Scalar , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator%= (Scalar c) |
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >> | |
DistributedVectorView & | operator*= (const Vector &vector) |
template<typename Vector , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator*= (const Vector &vector) |
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >> | |
DistributedVectorView & | operator*= (Scalar c) |
template<typename Scalar , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator*= (Scalar c) |
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >> | |
DistributedVectorView & | operator+= (const Vector &vector) |
template<typename Vector , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator+= (const Vector &vector) |
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >> | |
DistributedVectorView & | operator+= (Scalar c) |
template<typename Scalar , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator+= (Scalar c) |
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >> | |
DistributedVectorView & | operator-= (const Vector &vector) |
template<typename Vector , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator-= (const Vector &vector) |
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >> | |
DistributedVectorView & | operator-= (Scalar c) |
template<typename Scalar , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator-= (Scalar c) |
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >> | |
DistributedVectorView & | operator/= (const Vector &vector) |
template<typename Vector , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator/= (const Vector &vector) |
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >> | |
DistributedVectorView & | operator/= (Scalar c) |
template<typename Scalar , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator/= (Scalar c) |
template<typename Array , typename... , typename = std::enable_if_t< HasSubscriptOperator< Array >::value >> | |
DistributedArrayView & | operator= (const Array &array) |
template<typename Array , typename... , typename > | |
DistributedArrayView< Value, Device, Index > & | operator= (const Array &array) |
DistributedArrayView & | operator= (const DistributedArrayView &view) |
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >> | |
DistributedVectorView & | operator= (const Vector &vector) |
template<typename Vector , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator= (const Vector &vector) |
DistributedArrayView & | operator= (DistributedArrayView &&) noexcept=default |
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >> | |
DistributedVectorView & | operator= (Scalar c) |
template<typename Scalar , typename... , typename > | |
DistributedVectorView< Real, Device, Index > & | operator= (Scalar c) |
![]() | |
DistributedArrayView (const DistributedArrayView &)=default | |
template<typename Value_ > | |
DistributedArrayView (const DistributedArrayView< Value_, Device, Index > &) | |
DistributedArrayView (const LocalRangeType &localRange, IndexType ghosts, IndexType globalSize, MPI::Comm communicator, LocalViewType localData) | |
DistributedArrayView (DistributedArrayView &&) noexcept=default | |
void | bind (const LocalRangeType &localRange, IndexType ghosts, IndexType globalSize, const MPI::Comm &communicator, LocalViewType localData) |
void | bind (DistributedArrayView view) |
template<typename Value_ > | |
void | bind (Value_ *data, IndexType localSize) |
void | copyFromGlobal (ConstLocalViewType globalArray) |
bool | empty () const |
template<typename Function > | |
void | forElements (IndexType begin, IndexType end, Function &&f) |
Process the lambda function f for each array element in interval [ begin, end). | |
template<typename Function > | |
void | forElements (IndexType begin, IndexType end, Function &&f) const |
Process the lambda function f for each array element in interval [ begin, end) for constant instances of the array. | |
const MPI::Comm & | getCommunicator () const |
ConstLocalViewType | getConstLocalView () const |
ConstLocalViewType | getConstLocalViewWithGhosts () const |
ConstViewType | getConstView () const |
Returns a non-modifiable view of the array view. | |
ValueType | getElement (IndexType i) const |
IndexType | getGhosts () const |
const LocalRangeType & | getLocalRange () const |
LocalViewType | getLocalView () |
LocalViewType | getLocalViewWithGhosts () |
IndexType | getSize () const |
std::shared_ptr< SynchronizerType > | getSynchronizer () const |
int | getValuesPerElement () const |
ViewType | getView () |
Returns a modifiable view of the array view. | |
void | loadFromGlobalFile (const String &fileName, bool allowCasting=false) |
void | loadFromGlobalFile (File &file, bool allowCasting=false) |
template<typename Array > | |
bool | operator!= (const Array &array) const |
template<typename Array , typename... , typename = std::enable_if_t< HasSubscriptOperator< Array >::value >> | |
DistributedArrayView & | operator= (const Array &array) |
template<typename Array , typename... , typename > | |
DistributedArrayView< Value, Device, Index > & | operator= (const Array &array) |
DistributedArrayView & | operator= (const DistributedArrayView &view) |
DistributedArrayView & | operator= (DistributedArrayView &&) noexcept=default |
template<typename Array > | |
bool | operator== (const Array &array) const |
__cuda_callable__ ValueType & | operator[] (IndexType i) |
__cuda_callable__ const ValueType & | operator[] (IndexType i) const |
void | reset () |
void | setElement (IndexType i, ValueType value) |
void | setSynchronizer (std::shared_ptr< SynchronizerType > synchronizer, int valuesPerElement=1) |
void | setValue (ValueType value) |
void | startSynchronization () |
void | waitForSynchronization () const |
Additional Inherited Members | |
![]() | |
MPI::Comm | communicator = MPI_COMM_NULL |
IndexType | ghosts = 0 |
IndexType | globalSize = 0 |
LocalViewType | localData |
LocalRangeType | localRange |
std::shared_ptr< SynchronizerType > | synchronizer = nullptr |
int | valuesPerElement = 1 |
DistributedVectorView extends DistributedArrayView with algebraic operations.