Template Numerical Library version\ main:d08c4dec
Loading...
Searching...
No Matches
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 >:
Collaboration diagram for TNL::Containers::DistributedVectorView< Real, Device, Index >:

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< Real, Devices::Host, int >
using ConstLocalViewType
using ConstViewType
using DeviceType
using IndexType
using LocalRangeType
using LocalViewType
using Self
 A template which allows to quickly obtain a DistributedArrayView type with changed template parameters.
using SynchronizerType
using ValueType
using ViewType

Public Member Functions

template<typename Real_>
 DistributedVectorView (const Containers::DistributedArrayView< Real_, Device, Index > &view)
 DistributedArrayView ()=default
 DistributedArrayView (const DistributedArrayView &)=default
 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 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)
Public Member Functions inherited from TNL::Containers::DistributedArrayView< Real, Devices::Host, int >
 DistributedArrayView (const LocalRangeType &localRange, IndexType ghosts, IndexType globalSize, MPI::Comm communicator, LocalViewType localData)
void bind (const LocalRangeType &localRange, IndexType ghosts, IndexType globalSize, const MPI::Comm &communicator, LocalViewType localData)
void copyFromGlobal (ConstLocalViewType globalArray)
bool empty () const
void forElements (IndexType begin, IndexType end, Function &&f)
 Process the lambda function f for each array element in interval [ begin, end).
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)
bool operator!= (const Array &array) const
DistributedArrayView< Real, Devices::Host, int > & operator= (const Array &array)
bool operator== (const Array &array) const
__cuda_callable__ ValueTypeoperator[] (IndexType i)
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< Real, Devices::Host, int >
MPI::Comm communicator
IndexType ghosts
IndexType globalSize
LocalViewType localData
LocalRangeType localRange
std::shared_ptr< SynchronizerTypesynchronizer
int valuesPerElement

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: