TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Schema_Comm_Vecteurs Class Reference

#include <Schema_Comm_Vecteurs.h>

Collaboration diagram for Schema_Comm_Vecteurs:
[legend]

Public Member Functions

 Schema_Comm_Vecteurs ()
 ~Schema_Comm_Vecteurs ()
void begin_init ()
 Resets buffer sizes.
template<typename _TYPE_>
void add_send_area_template (int pe, int size)
template<typename _TYPE_>
void add_recv_area_template (int pe, int size)
template<typename _TYPE_>
TRUSTArray< _TYPE_ > & get_next_area_template (int pe, int array_size)
void end_init ()
 Once the data to exchange has been declared with add_send/recv_area_..(),.
void begin_comm (bool bufferOnDevice=false)
 Starts a new data exchange (buffer sizes must have been initialized with begin_init()...end_init()).
void exchange (IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
void end_comm ()
template<>
void add_send_area_template (int pe, int size)
template<>
void add_send_area_template (int pe, int size)
template<>
void add_send_area_template (int pe, int size)
template<>
void add_recv_area_template (int pe, int size)
template<>
void add_recv_area_template (int pe, int size)
template<>
void add_recv_area_template (int pe, int size)
template<>
ArrOfInt & get_next_area_template (int pe, int size)
 Returns an array containing the next "size" values received from processor pe during the current communication.
template<>
ArrOfDouble & get_next_area_template (int pe, int size)
template<>
ArrOfFloat & get_next_area_template (int pe, int size)

Static Public Member Functions

static void CleanMyStaticViews ()

Protected Types

enum  Status {
  RESET , BEGIN_INIT , END_INIT , BEGIN_COMM ,
  EXCHANGED
}

Protected Member Functions

void add (int pe, int size, ArrOfInt &procs, ArrOfInt &buf_sizes, int align_size)
int check_buffers_full () const
 Depending on status_, verifies that all buffer pointers point to the end of the buffer allocated for each processor in send.
int check_next_area (int pe, int byte_size) const
 Verifies that there are at least byte_size bytes remaining in the buffer of processor pe.

Protected Attributes

ArrOfInt send_buf_sizes_
ArrOfInt recv_buf_sizes_
ArrOfInt send_procs_
ArrOfInt recv_procs_
int sorted_ = 1
int min_buf_size_ = -1
bool bufferOnDevice_ = false
bool use_gpu_aware_mpi_ = false
Status status_

Static Protected Attributes

static bool buffer_locked_
static ArrOfDouble tmp_area_double_
static ArrOfFloat tmp_area_float_
static ArrOfInt tmp_area_int_
static Schema_Comm_Vecteurs_Static_Data sdata_

Detailed Description

Definition at line 56 of file Schema_Comm_Vecteurs.h.

Member Enumeration Documentation

◆ Status

Enumerator
RESET 
BEGIN_INIT 
END_INIT 
BEGIN_COMM 
EXCHANGED 

Definition at line 102 of file Schema_Comm_Vecteurs.h.

Constructor & Destructor Documentation

◆ Schema_Comm_Vecteurs()

Schema_Comm_Vecteurs::Schema_Comm_Vecteurs ( )

Definition at line 86 of file Schema_Comm_Vecteurs.cpp.

◆ ~Schema_Comm_Vecteurs()

Schema_Comm_Vecteurs::~Schema_Comm_Vecteurs ( )

Definition at line 102 of file Schema_Comm_Vecteurs.cpp.

Member Function Documentation

◆ add()

void Schema_Comm_Vecteurs::add ( int pe,
int size,
ArrOfInt & procs,
ArrOfInt & buf_sizes,
int align_size )
inlineprotected

Definition at line 154 of file Schema_Comm_Vecteurs.h.

◆ add_recv_area_template() [1/4]

template<>
void Schema_Comm_Vecteurs::add_recv_area_template ( int pe,
int size )
inline

Definition at line 209 of file Schema_Comm_Vecteurs.h.

◆ add_recv_area_template() [2/4]

template<>
void Schema_Comm_Vecteurs::add_recv_area_template ( int pe,
int size )
inline

Definition at line 203 of file Schema_Comm_Vecteurs.h.

◆ add_recv_area_template() [3/4]

template<>
void Schema_Comm_Vecteurs::add_recv_area_template ( int pe,
int size )
inline

Definition at line 197 of file Schema_Comm_Vecteurs.h.

◆ add_recv_area_template() [4/4]

template<typename _TYPE_>
void Schema_Comm_Vecteurs::add_recv_area_template ( int pe,
int size )
inline

◆ add_send_area_template() [1/4]

template<>
void Schema_Comm_Vecteurs::add_send_area_template ( int pe,
int size )
inline

Definition at line 191 of file Schema_Comm_Vecteurs.h.

◆ add_send_area_template() [2/4]

template<>
void Schema_Comm_Vecteurs::add_send_area_template ( int pe,
int size )
inline

Definition at line 185 of file Schema_Comm_Vecteurs.h.

◆ add_send_area_template() [3/4]

template<>
void Schema_Comm_Vecteurs::add_send_area_template ( int pe,
int size )
inline

Definition at line 179 of file Schema_Comm_Vecteurs.h.

◆ add_send_area_template() [4/4]

template<typename _TYPE_>
void Schema_Comm_Vecteurs::add_send_area_template ( int pe,
int size )
inline

◆ begin_comm()

void Schema_Comm_Vecteurs::begin_comm ( bool bufferOnDevice = false)

Starts a new data exchange (buffer sizes must have been initialized with begin_init()...end_init()).

Sets sdata_.buf_pointers_ to the beginning of the buffers for each processor for which a "send" buffer was declared. After begin_comm(), the buffers must be filled using get_next_area_int() or get_next_area_double() in the same order as declared during the initialization phase, then exchange() must be called.

Definition at line 206 of file Schema_Comm_Vecteurs.cpp.

◆ begin_init()

void Schema_Comm_Vecteurs::begin_init ( )

Resets buffer sizes.

Buffer sizes must then be defined with add_send/recv_area_...(). This method must be called simultaneously on all processors in the group.

Definition at line 113 of file Schema_Comm_Vecteurs.cpp.

◆ check_buffers_full()

int Schema_Comm_Vecteurs::check_buffers_full ( ) const
protected

Depending on status_, verifies that all buffer pointers point to the end of the buffer allocated for each processor in send.

or receive mode. Returns 0 on error (if a buffer has not been completely filled or emptied).

Definition at line 324 of file Schema_Comm_Vecteurs.cpp.

◆ check_next_area()

int Schema_Comm_Vecteurs::check_next_area ( int pe,
int byte_size ) const
protected

Verifies that there are at least byte_size bytes remaining in the buffer of processor pe.

Definition at line 376 of file Schema_Comm_Vecteurs.cpp.

◆ CleanMyStaticViews()

void Schema_Comm_Vecteurs::CleanMyStaticViews ( )
inlinestatic

Definition at line 169 of file Schema_Comm_Vecteurs.h.

◆ end_comm()

void Schema_Comm_Vecteurs::end_comm ( )

Definition at line 308 of file Schema_Comm_Vecteurs.cpp.

◆ end_init()

void Schema_Comm_Vecteurs::end_init ( )

Once the data to exchange has been declared with add_send/recv_area_..(),.

initializes buffer offsets and allocates a global buffer of sufficient size. Must be called by all processors in the group.

Definition at line 140 of file Schema_Comm_Vecteurs.cpp.

◆ exchange()

void Schema_Comm_Vecteurs::exchange ( IsExchangeBlocking exchange_type = IsExchangeBlocking::DefaultBlocking,
const std::string kernel_name = "noname" )

Definition at line 233 of file Schema_Comm_Vecteurs.cpp.

◆ get_next_area_template() [1/4]

template<typename _TYPE_>
TRUSTArray< _TYPE_ > & Schema_Comm_Vecteurs::get_next_area_template ( int pe,
int array_size )
inline

◆ get_next_area_template() [2/4]

template<>
ArrOfFloat & Schema_Comm_Vecteurs::get_next_area_template ( int pe,
int size )
inline

Definition at line 284 of file Schema_Comm_Vecteurs.h.

◆ get_next_area_template() [3/4]

template<>
ArrOfDouble & Schema_Comm_Vecteurs::get_next_area_template ( int pe,
int size )
inline

Definition at line 263 of file Schema_Comm_Vecteurs.h.

◆ get_next_area_template() [4/4]

template<>
ArrOfInt & Schema_Comm_Vecteurs::get_next_area_template ( int pe,
int size )
inline

Returns an array containing the next "size" values received from processor pe during the current communication.

Warning: The returned array is a reference to an internal array that is only valid until the next call to a get_next_xxx method.

Definition at line 236 of file Schema_Comm_Vecteurs.h.

Member Data Documentation

◆ buffer_locked_

bool Schema_Comm_Vecteurs::buffer_locked_
staticprotected

Definition at line 106 of file Schema_Comm_Vecteurs.h.

◆ bufferOnDevice_

bool Schema_Comm_Vecteurs::bufferOnDevice_ = false
protected

Definition at line 98 of file Schema_Comm_Vecteurs.h.

◆ min_buf_size_

int Schema_Comm_Vecteurs::min_buf_size_ = -1
protected

Definition at line 96 of file Schema_Comm_Vecteurs.h.

◆ recv_buf_sizes_

ArrOfInt Schema_Comm_Vecteurs::recv_buf_sizes_
protected

Definition at line 89 of file Schema_Comm_Vecteurs.h.

◆ recv_procs_

ArrOfInt Schema_Comm_Vecteurs::recv_procs_
protected

Definition at line 92 of file Schema_Comm_Vecteurs.h.

◆ sdata_

Schema_Comm_Vecteurs_Static_Data Schema_Comm_Vecteurs::sdata_
staticprotected

Definition at line 116 of file Schema_Comm_Vecteurs.h.

◆ send_buf_sizes_

ArrOfInt Schema_Comm_Vecteurs::send_buf_sizes_
protected

Definition at line 88 of file Schema_Comm_Vecteurs.h.

◆ send_procs_

ArrOfInt Schema_Comm_Vecteurs::send_procs_
protected

Definition at line 91 of file Schema_Comm_Vecteurs.h.

◆ sorted_

int Schema_Comm_Vecteurs::sorted_ = 1
protected

Definition at line 94 of file Schema_Comm_Vecteurs.h.

◆ status_

Status Schema_Comm_Vecteurs::status_
protected

Definition at line 103 of file Schema_Comm_Vecteurs.h.

◆ tmp_area_double_

ArrOfDouble Schema_Comm_Vecteurs::tmp_area_double_
staticprotected

Definition at line 108 of file Schema_Comm_Vecteurs.h.

◆ tmp_area_float_

ArrOfFloat Schema_Comm_Vecteurs::tmp_area_float_
staticprotected

Definition at line 109 of file Schema_Comm_Vecteurs.h.

◆ tmp_area_int_

ArrOfInt Schema_Comm_Vecteurs::tmp_area_int_
staticprotected

Definition at line 110 of file Schema_Comm_Vecteurs.h.

◆ use_gpu_aware_mpi_

bool Schema_Comm_Vecteurs::use_gpu_aware_mpi_ = false
protected

Definition at line 100 of file Schema_Comm_Vecteurs.h.


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