16#include <MD_Vector_composite.h>
17#include <MD_Vector_seq.h>
18#include <Array_tools.h>
33 for (
int p=0; p<np; p++)
35 OWN_PTR(MD_Vector_base) md_ptr;
38 md_ptr.typer(md_type);
39 is >> md_ptr.valeur();
45 mdV.
copy(md_ptr.valeur());
49 p.ajouter(
"is_seq", &is_seq_);
50 p.ajouter_non_std(
"global_md",
this);
53 p.ajouter(
"names", &
names_);
54 p.lire_avec_accolades(is);
60 if (mot ==
"global_md")
62 assert(is_seq_ != -1);
63 is_seq_ ? instanciate_seq() : instanciate_std();
79 for (
int p=0; p<np; p++)
87 os <<
"is_seq" << tspace << is_seq_ << finl;
88 os <<
"global_md" << finl << *
global_md_ << finl;
90 os <<
"shapes" << tspace <<
shapes_ << finl;
91 os <<
"names" << tspace <<
names_ << finl;
97void MD_Vector_composite::instanciate_std()
101 global_md_ = std::make_shared<MD_Vector_std>();
106void MD_Vector_composite::instanciate_seq()
111 global_md_ = std::make_shared<MD_Vector_seq>(0);
161 if (data_.size() == 0)
167 const int multiplier = (shape == 0) ? 1 : shape;
214 Process::exit(
"Internal error in MD_Vector_composite::add_part: should not happen. ");
218 Cerr <<
"Internal error in MD_Vector_composite::add_part: unknown part type " << part->
que_suis_je() << finl;
231 global_md_->fill_md_vect_renum(renum, md_vect);
239 assert(data_.size() > 0);
240 assert(is_seq_ != -1);
244 return global_md_->get_seq_flags_impl(flags, line_size);
Class defining operators and methods for all reading operation in an input flow (file,...
Base class for distributed vectors parallel descriptors.
virtual const ArrOfInt & get_blocs_items_to_sum() const =0
static void append_blocs(ArrOfInt &dest, const ArrOfInt &src, int offset=0, int multiplier=1)
trustIdType nb_items_seq_tot_
virtual int get_seq_flags_impl(ArrOfBit &flags, int line_size) const
virtual int nb_items_seq_local() const
virtual int get_nb_items_tot() const
virtual trustIdType nb_items_seq_tot() const
virtual int get_nb_items_reels() const
virtual const ArrOfInt & get_blocs_items_to_compute() const =0
Metadata for a distributed composite vector.
int lire_motcle_non_standard(const Motcle &mot, Entree &is) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void fill_md_vect_renum(const IntVect &renum, MD_Vector &md_vect) const override
int get_seq_flags_impl(ArrOfBit &flags, int line_size) const override
void add_part(const MD_Vector &part, int shape=0, Nom name="")
Append the "part" descriptor to the composite vector.
const MD_Vector & get_desc_part(int i) const
std::shared_ptr< MD_Vector_mono > global_md_
Generic class for all mono-block MD_Vectors (i.e. non compoosite).
Dummy parallel descriptor used for sequential computations.
C'est le plus simple des descripteurs, utilise pour les tableaux de valeurs aux sommets,...
void copy(const MD_Vector_base &)
construction d'un objet MD_Vector par copie d'un objet existant.
const MD_Vector_base & valeur() const
Une chaine de caractere (Nom) en majuscules.
class Nom Une chaine de caractere pour nommer les objets de TRUST
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
static bool is_parallel()
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
static bool is_sequential()
Classe de base des flux de sortie.