Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IItemFamilySerializeStep Class Referenceabstract

Interface for a step in the serialization of entity families. More...

#include <arcane/core/IItemFamilySerializeStep.h>

Inheritance diagram for Arcane::IItemFamilySerializeStep:
Collaboration diagram for Arcane::IItemFamilySerializeStep:

Classes

class  NotifyActionArgs

Public Types

enum  ePhase { PH_Item , PH_Group , PH_Variable }
 Serialization phase. More...
enum class  eAction { AC_BeginPrepareSend , AC_EndPrepareSend , AC_BeginReceive , AC_EndReceive }
 Action during serialization. More...

Public Member Functions

virtual void initialize ()=0
 Initializes the instance before the start of exchanges.
virtual void notifyAction (const NotifyActionArgs &args)=0
 Notifies the instance that we are entering a certain phase of the exchange.
virtual void serialize (const ItemFamilySerializeArgs &args)=0
 Serializes into/from buf.
virtual void finalize ()=0
 Performs end-of-exchange processing.
virtual ePhase phase () const =0
 Serialization phase where this instance is involved.
virtual IItemFamilyfamily () const =0
 Associated family.

Detailed Description

Interface for a step in the serialization of entity families.

This interface is used by IItemFamilyExchanger to serialize and deserialize information. Serialization is done by message exchange and there is one message per rank with which we communicate.

The call pseudo-code is as follows:

IItemFamilyExchanger* exchanger = ...;
exchanger->computeExchangeInfos();
step->initialize();
// Some exchanger action
...
step->notifyAction(AC_BeginPrepareSend);
// Set serialize mode to ISerializer::ModeReserve
for( Integer i=0; i<nb_message; ++i )
step->serialize(i);
// Set serialize mode to ISerializer::ModePut
for( Integer i=0; i<nb_message; ++i )
step->serialize(i);
exchanger->processExchange();
// Set serialize mode to ISerializer::ModeGet
for( Integer i=0; i<nb_message; ++i )
step->serialize(i);
step->finalize();
Exchange of entities and their characteristics for a given family.
virtual void processExchange()=0
Sends the exchange messages.
virtual bool computeExchangeInfos()=0
Determines the information necessary for the exchanges.
Interface for a step in the serialization of entity families.
virtual void initialize()=0
Initializes the instance before the start of exchanges.
virtual void finalize()=0
Performs end-of-exchange processing.
virtual void notifyAction(const NotifyActionArgs &args)=0
Notifies the instance that we are entering a certain phase of the exchange.
virtual void serialize(const ItemFamilySerializeArgs &args)=0
Serializes into/from buf.
Int32 Integer
Type representing an integer.

The serialize() method is called for each rank we communicate with.

The step is called during the serialization phase specified by phase() as specified in the IItemFamilyExchanger documentation.

For the specified phase, the call order is as follows:

ISerializer* sbuf = ...;
sbuf->setMode(ISerializer::ModeReserve)
step->beginSerialize(sbuf->mode())

Definition at line 73 of file IItemFamilySerializeStep.h.

Member Enumeration Documentation

◆ eAction

Action during serialization.

Enumerator
AC_BeginPrepareSend 

Start of send preparation.

AC_EndPrepareSend 

End of send preparation.

AC_BeginReceive 

Start of data reception.

AC_EndReceive 

End of data reception.

Definition at line 85 of file IItemFamilySerializeStep.h.

◆ ePhase

Serialization phase.

Definition at line 78 of file IItemFamilySerializeStep.h.

Member Function Documentation

◆ family()

virtual IItemFamily * Arcane::IItemFamilySerializeStep::family ( ) const
pure virtual

◆ finalize()

virtual void Arcane::IItemFamilySerializeStep::finalize ( )
pure virtual

◆ initialize()

virtual void Arcane::IItemFamilySerializeStep::initialize ( )
pure virtual

◆ notifyAction()

virtual void Arcane::IItemFamilySerializeStep::notifyAction ( const NotifyActionArgs & args)
pure virtual

Notifies the instance that we are entering a certain phase of the exchange.

Implemented in Arcane::Materials::MeshMaterialExchangeMng::ExchangeCellStep, Arcane::mesh::ItemFamilyVariableSerializer, and Arcane::mesh::TiedInterfaceExchanger.

◆ phase()

virtual ePhase Arcane::IItemFamilySerializeStep::phase ( ) const
pure virtual

◆ serialize()

virtual void Arcane::IItemFamilySerializeStep::serialize ( const ItemFamilySerializeArgs & args)
pure virtual

Serializes into/from buf.

args.rank() contains the rank of the subdomain with which we communicate. args.messageIndex() is the message number index and args.nbMessageIndex() is the number of messages that will be sent.

During serialization, these are the local indices of the entities sent to rank rank(). During deserialization, these are the local indices received by rank rank().

Implemented in Arcane::Materials::MeshMaterialExchangeMng::ExchangeCellStep, Arcane::mesh::ItemFamilyVariableSerializer, and Arcane::mesh::TiedInterfaceExchanger.


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