Template Numerical Library version\ main:94209208
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
TNL::Containers::DistributedVectorView< Real, Device, Index > Class Template Reference

DistributedVectorView extends DistributedArrayView with algebraic operations. More...

#include <TNL/Containers/DistributedVectorView.h>

Inheritance diagram for TNL::Containers::DistributedVectorView< Real, Device, Index >:
Inheritance graph
[legend]
Collaboration diagram for TNL::Containers::DistributedVectorView< Real, Device, Index >:
Collaboration graph
[legend]

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 >
 
- Public Types inherited from TNL::Containers::DistributedArrayView< Value, 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 >>
DistributedVectorViewoperator%= (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 >>
DistributedVectorViewoperator%= (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 >>
DistributedVectorViewoperator*= (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 >>
DistributedVectorViewoperator*= (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 >>
DistributedVectorViewoperator+= (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 >>
DistributedVectorViewoperator+= (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 >>
DistributedVectorViewoperator-= (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 >>
DistributedVectorViewoperator-= (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 >>
DistributedVectorViewoperator/= (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 >>
DistributedVectorViewoperator/= (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 >>
DistributedArrayViewoperator= (const Array &array)
 
template<typename Array , typename... , typename >
DistributedArrayView< Value, Device, Index > & operator= (const Array &array)
 
DistributedArrayViewoperator= (const DistributedArrayView &view)
 
template<typename Vector , typename... , typename = std::enable_if_t< HasSubscriptOperator< Vector >::value >>
DistributedVectorViewoperator= (const Vector &vector)
 
template<typename Vector , typename... , typename >
DistributedVectorView< Real, Device, Index > & operator= (const Vector &vector)
 
DistributedArrayViewoperator= (DistributedArrayView &&) noexcept=default
 
template<typename Scalar , typename... , typename = std::enable_if_t< ! HasSubscriptOperator< Scalar >::value >>
DistributedVectorViewoperator= (Scalar c)
 
template<typename Scalar , typename... , typename >
DistributedVectorView< Real, Device, Index > & operator= (Scalar c)
 
- Public Member Functions inherited from TNL::Containers::DistributedArrayView< Value, Device, Index >
 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::CommgetCommunicator () 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 LocalRangeTypegetLocalRange () const
 
LocalViewType getLocalView ()
 
LocalViewType getLocalViewWithGhosts ()
 
IndexType getSize () const
 
std::shared_ptr< SynchronizerTypegetSynchronizer () 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 >>
DistributedArrayViewoperator= (const Array &array)
 
template<typename Array , typename... , typename >
DistributedArrayView< Value, Device, Index > & operator= (const Array &array)
 
DistributedArrayViewoperator= (const DistributedArrayView &view)
 
DistributedArrayViewoperator= (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

- Protected Attributes inherited from TNL::Containers::DistributedArrayView< Value, Device, Index >
MPI::Comm communicator = MPI_COMM_NULL
 
IndexType ghosts = 0
 
IndexType globalSize = 0
 
LocalViewType localData
 
LocalRangeType localRange
 
std::shared_ptr< SynchronizerTypesynchronizer = nullptr
 
int valuesPerElement = 1
 

Detailed Description

template<typename Real, typename Device = Devices::Host, typename Index = int>
class TNL::Containers::DistributedVectorView< Real, Device, Index >

DistributedVectorView extends DistributedArrayView with algebraic operations.


The documentation for this class was generated from the following files: