Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
Alien::DoKVector Class Reference

#include <core/alien/kernels/dok/DoKVector.h>

Inheritance diagram for Alien::DoKVector:
Collaboration diagram for Alien::DoKVector:

Public Types

typedef Real ValueType
Public Types inherited from Alien::IVectorImpl
typedef Arccore::Real ValueType
 Type of the values stored in the vectors.

Public Member Functions

 DoKVector (const MultiVectorImpl *multi_impl=nullptr)
 DoKVector (const DoKVector &)=delete
void clear () override
 Wipe out internal data.
std::optional< ValueType > contribute (Arccore::Int32 index, ValueType value)
std::optional< ValueType > set (Arccore::Int32 index, ValueType value)
void assemble ()
 Dispatch matrix elements.
void reserve (Arccore::Int32 size)
Public Member Functions inherited from Alien::IVectorImpl
 IVectorImpl (const MultiVectorImpl *multi_impl, BackEndId backend="")
 Constructor.
virtual ~IVectorImpl () override
 Free resources.
 IVectorImpl (const IVectorImpl &src)=delete
 IVectorImpl (IVectorImpl &&src)=delete
IVectorImploperator= (const IVectorImpl &src)=delete
IVectorImploperator= (IVectorImpl &&src)=delete
virtual void init (const VectorDistribution &dist, bool do_alloc)
 Initialize vector datas.
virtual const ISpacespace () const
 Get the vector space.
virtual BackEndId backend () const
virtual const VectorDistributiondistribution () const
 Get the distribution of the vector.
virtual const Blockblock () const
 Get block datas of the vector.
virtual const VBlockvblock () const
 Get block datas of the vector.
virtual Arccore::Integer scalarizedLocalSize () const
 Get the "scalarized" local size.
virtual Arccore::Integer scalarizedGlobalSize () const
 Get the "scalarized" global size.
virtual Arccore::Integer scalarizedOffset () const
 Get the "scalarized" offset.
const MultiVectorImplimpls () const
Public Member Functions inherited from Alien::Timestamp
 Timestamp (const TimestampMng *manager)
virtual ~Timestamp ()
 Destructeur de la classe.
virtual Int64 timestamp () const
 Donne la valeur courante du timestamp.
void updateTimestamp ()
 Met à jour le timestamp.
void copyTimestamp (const Timestamp &v)
 Copy un autre timestamp.
void setTimestamp (const TimestampMng *manager, const Int64 timestamp)
Public Member Functions inherited from Alien::ObjectWithTrace
template<typename T>
void alien_info (T &&t) const
template<typename T>
void alien_debug (T &&t) const
template<typename T>
void alien_warning (T &&t) const
template<typename T>
void alien_fatal (T &&t) const
ITraceMng * traceMng () const

Private Member Functions

void _distribute ()

Private Attributes

friend DoKDistributor
friend DoKToSimpleCSRVectorConverter
std::unordered_map< Arccore::Int32, DoKVector::ValueType > m_data

Additional Inherited Members

Protected Member Functions inherited from Alien::ObjectWithTrace
TraceMessage cout () const
Protected Attributes inherited from Alien::IVectorImpl
const MultiVectorImplm_multi_impl
 Pointer on vectors implementations.
BackEndId m_backend
 Backend id.
VBlockSizesm_vblock_sizes
 Variable blocks size data.

Detailed Description

Vector stored as Dictionary Of Keys

This allows to create "sparse" vector, as id are not required to be consecutive nor to have any meaning.

Definition at line 42 of file DoKVector.h.

Member Typedef Documentation

◆ ValueType

typedef Real Alien::DoKVector::ValueType

Definition at line 45 of file DoKVector.h.

Constructor & Destructor Documentation

◆ DoKVector()

Alien::DoKVector::DoKVector ( const MultiVectorImpl * multi_impl = nullptr)
inlineexplicit

Definition at line 48 of file DoKVector.h.

Member Function Documentation

◆ _distribute()

void Alien::DoKVector::_distribute ( )
private

Definition at line 24 of file DoKVector.cc.

◆ assemble()

void Alien::DoKVector::assemble ( )
inline

Dispatch matrix elements.

Definition at line 86 of file DoKVector.h.

Referenced by Alien::SimpleCSRtoDoKVectorConverter::convert().

Here is the caller graph for this function:

◆ clear()

void Alien::DoKVector::clear ( )
inlineoverridevirtual

Wipe out internal data.

Reimplemented from Alien::IVectorImpl.

Definition at line 57 of file DoKVector.h.

Referenced by Alien::SimpleCSRtoDoKVectorConverter::convert().

Here is the caller graph for this function:

◆ contribute()

std::optional< ValueType > Alien::DoKVector::contribute ( Arccore::Int32 index,
ValueType value )
inline

Contribute to a non zero, identified by its index

Parameters
indexcan be local or remote
value
Returns
updated local value.

Definition at line 66 of file DoKVector.h.

Referenced by Alien::SimpleCSRtoDoKVectorConverter::convert().

Here is the caller graph for this function:

◆ reserve()

void Alien::DoKVector::reserve ( Arccore::Int32 size)
inline

Definition at line 88 of file DoKVector.h.

◆ set()

std::optional< ValueType > Alien::DoKVector::set ( Arccore::Int32 index,
ValueType value )
inline

Set a non zero, identified by its index. Should not be used on remote values as we do not have global ordering between calls.

Parameters
indexcan be local or remote
value
Returns
updated local value.

Definition at line 76 of file DoKVector.h.

Member Data Documentation

◆ DoKDistributor

friend Alien::DoKVector::DoKDistributor
private

Definition at line 95 of file DoKVector.h.

◆ DoKToSimpleCSRVectorConverter

friend Alien::DoKVector::DoKToSimpleCSRVectorConverter
private

Definition at line 96 of file DoKVector.h.

◆ m_data

std::unordered_map<Arccore::Int32, DoKVector::ValueType> Alien::DoKVector::m_data
private

Definition at line 99 of file DoKVector.h.


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