Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::Alina::CommunicationPattern< Backend > Class Template Reference

Call to handle communication pattern. More...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/alina/arccore/alina/DistributedMatrix.h>

Collaboration diagram for Arcane::Alina::CommunicationPattern< Backend >:

Public Types

typedef Backend::value_type value_type
typedef math::rhs_of< value_type >::type rhs_type
typedef math::scalar_of< value_type >::type scalar_type
typedef Backend::matrix matrix
typedef Backend::vector vector
typedef Backend::params backend_params
typedef Backend::col_type col_type
typedef Backend::ptr_type ptr_type

Public Member Functions

 CommunicationPattern (mpi_communicator comm, ptrdiff_t n_loc_cols, size_t n_rem_cols, const col_type *p_rem_cols)
template<class OtherBackend>
 CommunicationPattern (const CommunicationPattern< OtherBackend > &C)
void move_to_backend (const backend_params &bprm=backend_params())
int domain (ptrdiff_t col) const
int local_index (ptrdiff_t col) const
std::tuple< int, int > remote_info (ptrdiff_t col) const
std::unordered_map< ptrdiff_t, std::tuple< int, int > >::const_iterator remote_begin () const
std::unordered_map< ptrdiff_t, std::tuple< int, int > >::const_iterator remote_end () const
size_t renumber (size_t n, col_type *col) const
bool needs_remote () const
template<class Vector>
void start_exchange (const Vector &x) const
void finish_exchange () const
template<typename T>
void exchange (const T *send_val, T *recv_val) const
mpi_communicator mpi_comm () const
ptrdiff_t loc_col_shift () const

Public Attributes

struct { 
   std::vector< ptrdiff_t >   nbr 
   std::vector< ptr_type >   ptr 
   std::vector< col_type >   col 
   std::vector< rhs_type >   val 
   UniqueArray< MessagePassing::Request >   req 
send
struct { 
   std::vector< ptrdiff_t >   nbr 
   std::vector< ptr_type >   ptr 
   std::vector< rhs_type >   val 
   UniqueArray< MessagePassing::Request >   req 
recv
std::shared_ptr< vector > x_rem

Private Types

using Gather = Backend::gather

Private Attributes

mpi_communicator comm
std::unordered_map< ptrdiff_t, std::tuple< int, int > > idx
std::shared_ptr< Gather > gather
ptrdiff_t loc_beg
ptrdiff_t loc_cols

Static Private Attributes

static const int tag_set_comm = 1001
static const int tag_exc_cols = 1002
static const int tag_exc_vals = 1003

Detailed Description

template<class Backend>
class Arcane::Alina::CommunicationPattern< Backend >

Call to handle communication pattern.

Definition at line 52 of file DistributedMatrix.h.

Member Typedef Documentation

◆ backend_params

template<class Backend>
typedef Backend::params Arcane::Alina::CommunicationPattern< Backend >::backend_params

Definition at line 61 of file DistributedMatrix.h.

◆ col_type

template<class Backend>
typedef Backend::col_type Arcane::Alina::CommunicationPattern< Backend >::col_type

Definition at line 62 of file DistributedMatrix.h.

◆ Gather

template<class Backend>
using Arcane::Alina::CommunicationPattern< Backend >::Gather = Backend::gather
private

Definition at line 326 of file DistributedMatrix.h.

◆ matrix

template<class Backend>
typedef Backend::matrix Arcane::Alina::CommunicationPattern< Backend >::matrix

Definition at line 59 of file DistributedMatrix.h.

◆ ptr_type

template<class Backend>
typedef Backend::ptr_type Arcane::Alina::CommunicationPattern< Backend >::ptr_type

Definition at line 63 of file DistributedMatrix.h.

◆ rhs_type

template<class Backend>
typedef math::rhs_of<value_type>::type Arcane::Alina::CommunicationPattern< Backend >::rhs_type

Definition at line 57 of file DistributedMatrix.h.

◆ scalar_type

template<class Backend>
typedef math::scalar_of<value_type>::type Arcane::Alina::CommunicationPattern< Backend >::scalar_type

Definition at line 58 of file DistributedMatrix.h.

◆ value_type

template<class Backend>
typedef Backend::value_type Arcane::Alina::CommunicationPattern< Backend >::value_type

Definition at line 56 of file DistributedMatrix.h.

◆ vector

template<class Backend>
typedef Backend::vector Arcane::Alina::CommunicationPattern< Backend >::vector

Definition at line 60 of file DistributedMatrix.h.

Constructor & Destructor Documentation

◆ CommunicationPattern() [1/2]

template<class Backend>
Arcane::Alina::CommunicationPattern< Backend >::CommunicationPattern ( mpi_communicator comm,
ptrdiff_t n_loc_cols,
size_t n_rem_cols,
const col_type * p_rem_cols )
inline

Definition at line 96 of file DistributedMatrix.h.

◆ CommunicationPattern() [2/2]

template<class Backend>
template<class OtherBackend>
Arcane::Alina::CommunicationPattern< Backend >::CommunicationPattern ( const CommunicationPattern< OtherBackend > & C)
inline

Definition at line 200 of file DistributedMatrix.h.

Member Function Documentation

◆ domain()

template<class Backend>
int Arcane::Alina::CommunicationPattern< Backend >::domain ( ptrdiff_t col) const
inline

Definition at line 229 of file DistributedMatrix.h.

◆ exchange()

template<class Backend>
template<typename T>
void Arcane::Alina::CommunicationPattern< Backend >::exchange ( const T * send_val,
T * recv_val ) const
inline

Definition at line 298 of file DistributedMatrix.h.

◆ finish_exchange()

template<class Backend>
void Arcane::Alina::CommunicationPattern< Backend >::finish_exchange ( ) const
inline

Definition at line 286 of file DistributedMatrix.h.

◆ loc_col_shift()

template<class Backend>
ptrdiff_t Arcane::Alina::CommunicationPattern< Backend >::loc_col_shift ( ) const
inline

Definition at line 319 of file DistributedMatrix.h.

◆ local_index()

template<class Backend>
int Arcane::Alina::CommunicationPattern< Backend >::local_index ( ptrdiff_t col) const
inline

Definition at line 234 of file DistributedMatrix.h.

◆ move_to_backend()

template<class Backend>
void Arcane::Alina::CommunicationPattern< Backend >::move_to_backend ( const backend_params & bprm = backend_params())
inline

Definition at line 218 of file DistributedMatrix.h.

◆ mpi_comm()

template<class Backend>
mpi_communicator Arcane::Alina::CommunicationPattern< Backend >::mpi_comm ( ) const
inline

Definition at line 314 of file DistributedMatrix.h.

◆ needs_remote()

template<class Backend>
bool Arcane::Alina::CommunicationPattern< Backend >::needs_remote ( ) const
inline

Definition at line 263 of file DistributedMatrix.h.

◆ remote_begin()

template<class Backend>
std::unordered_map< ptrdiff_t, std::tuple< int, int > >::const_iterator Arcane::Alina::CommunicationPattern< Backend >::remote_begin ( ) const
inline

Definition at line 245 of file DistributedMatrix.h.

◆ remote_end()

template<class Backend>
std::unordered_map< ptrdiff_t, std::tuple< int, int > >::const_iterator Arcane::Alina::CommunicationPattern< Backend >::remote_end ( ) const
inline

Definition at line 251 of file DistributedMatrix.h.

◆ remote_info()

template<class Backend>
std::tuple< int, int > Arcane::Alina::CommunicationPattern< Backend >::remote_info ( ptrdiff_t col) const
inline

Definition at line 239 of file DistributedMatrix.h.

◆ renumber()

template<class Backend>
size_t Arcane::Alina::CommunicationPattern< Backend >::renumber ( size_t n,
col_type * col ) const
inline

Definition at line 256 of file DistributedMatrix.h.

◆ start_exchange()

template<class Backend>
template<class Vector>
void Arcane::Alina::CommunicationPattern< Backend >::start_exchange ( const Vector & x) const
inline

Definition at line 269 of file DistributedMatrix.h.

◆ CommunicationPattern

template<class Backend>
template<class B>
friend class CommunicationPattern
friend

Definition at line 340 of file DistributedMatrix.h.

Member Data Documentation

◆ col

template<class Backend>
std::vector<col_type> Arcane::Alina::CommunicationPattern< Backend >::col

Definition at line 69 of file DistributedMatrix.h.

◆ comm

template<class Backend>
mpi_communicator Arcane::Alina::CommunicationPattern< Backend >::comm
private

Definition at line 332 of file DistributedMatrix.h.

◆ gather

template<class Backend>
std::shared_ptr<Gather> Arcane::Alina::CommunicationPattern< Backend >::gather
private

Definition at line 335 of file DistributedMatrix.h.

◆ idx

template<class Backend>
std::unordered_map<ptrdiff_t, std::tuple<int, int> > Arcane::Alina::CommunicationPattern< Backend >::idx
private

Definition at line 334 of file DistributedMatrix.h.

◆ loc_beg

template<class Backend>
ptrdiff_t Arcane::Alina::CommunicationPattern< Backend >::loc_beg
private

Definition at line 336 of file DistributedMatrix.h.

◆ loc_cols

template<class Backend>
ptrdiff_t Arcane::Alina::CommunicationPattern< Backend >::loc_cols
private

Definition at line 337 of file DistributedMatrix.h.

◆ nbr

template<class Backend>
std::vector<ptrdiff_t> Arcane::Alina::CommunicationPattern< Backend >::nbr

Definition at line 67 of file DistributedMatrix.h.

◆ ptr

template<class Backend>
std::vector<ptr_type> Arcane::Alina::CommunicationPattern< Backend >::ptr

Definition at line 68 of file DistributedMatrix.h.

◆ req

template<class Backend>
UniqueArray<MessagePassing::Request> Arcane::Alina::CommunicationPattern< Backend >::req
mutable

Definition at line 77 of file DistributedMatrix.h.

◆ tag_exc_cols

template<class Backend>
const int Arcane::Alina::CommunicationPattern< Backend >::tag_exc_cols = 1002
staticprivate

Definition at line 329 of file DistributedMatrix.h.

◆ tag_exc_vals

template<class Backend>
const int Arcane::Alina::CommunicationPattern< Backend >::tag_exc_vals = 1003
staticprivate

Definition at line 330 of file DistributedMatrix.h.

◆ tag_set_comm

template<class Backend>
const int Arcane::Alina::CommunicationPattern< Backend >::tag_set_comm = 1001
staticprivate

Definition at line 328 of file DistributedMatrix.h.

◆ val

template<class Backend>
std::vector<rhs_type> Arcane::Alina::CommunicationPattern< Backend >::val
mutable

Definition at line 76 of file DistributedMatrix.h.

◆ x_rem

template<class Backend>
std::shared_ptr<vector> Arcane::Alina::CommunicationPattern< Backend >::x_rem

Definition at line 94 of file DistributedMatrix.h.


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