TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
TRUSTVect.tpp
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef TRUSTVect_TPP_included
17#define TRUSTVect_TPP_included
18
19#include <string>
20#include <TRUSTVect.h>
21
22// Taille de l'espace "reel" du vecteur. (si md_vector_ est nul, cette valeur est identique a size_array(),
23// sinon, soit elle est egale a md_vector_....get_nb_items(),
24// soit l'appel est invalide (en particulier si les items reels ne sont pas regroupes en debut de tableau)
25// On peut interroger le vecteur pour savoir si size_reelle() est valide avec size_reelle_ok()
26template<typename _TYPE_, typename _SIZE_>
28{
29 // Si cet assert plante, c'est que l'appel a ete declare invalide par le MD_Vect associe a ce vecteur.
30 assert(size_reelle_ >= 0);
31 // Si cet assert plante, c'est que le tableau a ete redimensionne avec resize_array() au lieu de resize(). (invalide pour un Vect ou un Tab).
33 return size_reelle_;
34}
35
36// renvoie 1 si l'appel a size() et size_reelle() est valide, 0 sinon
37template<typename _TYPE_, typename _SIZE_>
39{
40 return size_reelle_ >= 0;
41}
42
43// Identique a size_reelle()
44template<typename _TYPE_, typename _SIZE_>
45inline _SIZE_ TRUSTVect<_TYPE_,_SIZE_>::size() const
46{
47 return size_reelle();
48}
49
50template<typename _TYPE_, typename _SIZE_>
51template<typename _SCALAR_TYPE_>
52inline void TRUSTVect<_TYPE_,_SIZE_>::ajoute(_SCALAR_TYPE_ alpha, const TRUSTVect& y, Mp_vect_options opt)
53{
54 assert ( (std::is_scalar<_SCALAR_TYPE_>::value) );
55 ajoute_alpha_v(*this, alpha, y, opt);
56 if (opt == VECT_ALL_ITEMS) echange_espace_virtuel();
57}
58
59// Identique a size_array()
60template<typename _TYPE_, typename _SIZE_>
65
66template<typename _TYPE_, typename _SIZE_>
68{
69 // Si line_size_ est nulle, size_array doit etre nul aussi
70 assert( (line_size_ > 0 || TRUSTArray<_TYPE_,_SIZE_>::size_array() == 0) );
71 return line_size_;
72}
73
74// change l'attribut line_size_ du tableau avec n >= 1. n == 0 est autorise uniquement si size_array_ == 0
75// Precondition: le md_vector_ doit etre nul (il faut attribuer md_vector_ apres la line_size_ car lorsqu'on attribue md_vector_ on teste
76// la validite des tailles de tableaux en fonction de line_size_) ou la line_size_ ne doit pas changer (cas d'un resize qui ne change rien)
77template<typename _TYPE_, typename _SIZE_>
79{
80 assert(!md_vector_.non_nul() || line_size_ == n);
81 assert(n >= 0);
82 line_size_ = n;
83}
84
85// Change la taille du vecteur (identique a resize_array() pour le traitement des anciennes valeurs et de nouvelles cases).
86// Attention: Cette methode n'est pas virtuelle, et afin d'eviter d'amener un DoubleTab/Int dans un etat invalide, l'appel est interdit si l'objet
87// est de ce type. Dans ce cas, voir resize_tab.
88// Precondition: l'appel est interdit si le vecteur a une structure parallele. Le vecteur doit etre "resizable" (voir preconditions de ArrOfDouble::resize_array()).
89// Appel interdit si l'objet n'est pas un DoubleVect (sinon mauvaise initialisation des dimensions du tableau)
90template<typename _TYPE_, typename _SIZE_>
91inline void TRUSTVect<_TYPE_,_SIZE_>::resize(_SIZE_ n, RESIZE_OPTIONS opt)
92{
93 // Verifie que l'objet est bien du type DoubleVect
94 assert( (n == TRUSTArray<_TYPE_,_SIZE_>::size_array() || std::string(typeid(*this).name()).find("TRUSTVect") != std::string::npos) );
95 resize_vect_(n, opt);
96}
97
98// Methode interne de resize (appellee par DoubleTab/Int::resize(...)) sans precondition sur le type de l'objet.
99// Precondition: l'appel est interdit si le vecteur a une structure parallele.
100// Le vecteur doit etre "resizable" (voir preconditions de ArrOfDouble/Int::resize_array()). n doit etre un multiple de line_size_
101template<typename _TYPE_, typename _SIZE_>
102inline void TRUSTVect<_TYPE_,_SIZE_>::resize_vect_(_SIZE_ n, RESIZE_OPTIONS opt)
103{
104 if (md_vector_.non_nul())
106 Cerr << "Resize of a distributed array is forbidden!" << finl;
109 assert(n == 0 || (n > 0 && line_size_ > 0 && n % line_size_ == 0));
111 size_reelle_ = n;
112 // ne pas mettre line_size_ a 1 ici, voir DoubleTab::resize_dim0()
113}
114
115// copie la structure et les valeurs du tableau v dans *this avec ArrOfDouble/Int::operator=()
116// (attention, si le tableau est de type ref_data ou ref, restrictions et cas particuliers !!!)
117// Attention: si on ne veut pas copier les structures paralleles, utiliser inject_array()
118// Precondition: si le tableau *this doit etre resize, il doit etre de type DoubleVect (et pas d'un type derive !)
119// Si le tableau *this a deja une structure parallele, l'appel n'est autorise que les md_vector
120// sont deja identiques, sinon il faut d'abord faire un reset() du tableau (pour copier la structure), ou utiliser inject_array() (pour ne pas copier la structure).
121// (ceci pour eviter d'ecraser accidentellement une structure parallele alors qu'on ne veut que copier les valeurs).
122template<typename _TYPE_, typename _SIZE_>
125 copy(v);
126 return *this;
129template<typename _TYPE_, typename _SIZE_>
135
136// detache le tableau et l'attache a v (sauf si v==*this, ne fait rien)
137// Fait pointer le tableau sur la meme domaine de memoire que v et copie le MD_Vector (utilise ArrOfDouble/Int::attach_array())
138// Attention, il devient alors interdit de resizer le tableau v ainsi que *this
139// Methode virtuelle reimplementee dans DoubleTab
140// Precondition:
141// L'objet ne doit pas etre un sous-type de DoubleVect (sinon mauvaise initialisation des dimensions.
142template<typename _TYPE_, typename _SIZE_>
144{
145 if (&v != this)
152 }
153}
154
155// copie de la structure et des valeurs (si opt==COPY_INIT) du tableau v.
156// Attention, v doit vraiment etre de type ArrOfDouble/Int, pas d'un type derive (sinon ambiguite: faut-il copier ou pas le MD_Vector ?)
157// Precondition: Le vecteur ne doit pas avoir de structure de tableau distribue et il doit vraiment etre de type Double/IntVect.
158template<typename _TYPE_, typename _SIZE_>
159inline void TRUSTVect<_TYPE_,_SIZE_>::copy(const TRUSTArray<_TYPE_,_SIZE_>& v, RESIZE_OPTIONS opt)
160{
161 assert(std::string(typeid(*this).name()).find("TRUSTVect") != std::string::npos);
162 assert(std::string(typeid(v).name()).find("TRUSTArray") != std::string::npos);
163 assert(!md_vector_.non_nul());
164 resize(v.size_array(), opt);
165 if (opt != RESIZE_OPTIONS::NOCOPY_NOINIT) inject_array(v);
166}
168// copie de la structure du vecteur v et des valeurs si opt==COPY_INIT.
169// Precondition: idem que operator=(const DoubleVect &)
170template<typename _TYPE_, typename _SIZE_>
171inline void TRUSTVect<_TYPE_,_SIZE_>::copy(const TRUSTVect& v, RESIZE_OPTIONS opt)
173 if (&v != this)
175 // Interdiction de resizer si l'objet est d'un type derive de DoubleVect (sinon mauvaise dimension(0) !)
176 assert( (v.size_array() == TRUSTArray<_TYPE_,_SIZE_>::size_array() || std::string(typeid(*this).name()).find("TRUSTVect") != std::string::npos) );
177 copy_(v, opt);
180
181// methode protegee appelable depuis une classe derivee (pas de precondition sur le type derive de *this)
182template<typename _TYPE_, typename _SIZE_>
183inline void TRUSTVect<_TYPE_,_SIZE_>::copy_(const TRUSTVect& v, RESIZE_OPTIONS opt)
184{
185 assert(&v != this); // Il faut avoir fait le test avant !
186 // Si le vecteur a deja une structure parallele, la copie n'est autorisee que si
187 // le vecteur source a la meme structure. Si ce n'est pas le cas, utiliser inject_array() pour copier uniquement les valeurs, ou faire d'abord reset() si on veut ecraser la structure.
188#ifndef LATATOOLS
189 assert((!md_vector_.non_nul()) || (md_vector_ == v.md_vector_));
190#endif
191 TRUSTArray<_TYPE_,_SIZE_>::resize_array_(v.size_array(), RESIZE_OPTIONS::NOCOPY_NOINIT);
192 if (v.isDataOnDevice() && !isAllocatedOnDevice(*this))
193 allocateOnDevice(*this); // Alloue de la memoire sur le device si v est deja alloue sur le device
194 if (opt != RESIZE_OPTIONS::NOCOPY_NOINIT)
196 md_vector_ = v.md_vector_; // Pour le cas ou md_vector_ est nul et pas v.md_vector_
201// methode virtuelle identique a resize_array(), permet de traiter de facon generique les ArrOf, Vect et Tab.
202// Cree un tableau sequentiel... Si l'objet est de type Int/DoubleVect, appel a resize(n)
203template<typename _TYPE_, typename _SIZE_>
204inline void TRUSTVect<_TYPE_,_SIZE_>::resize_tab(_SIZE_ n, RESIZE_OPTIONS opt)
205{
206 resize(n, opt);
207}
208
209/*! See TRUSTArray::ref_data().
210 * Create an array without any parallel structure.
211 */
212template<typename _TYPE_, typename _SIZE_>
213inline void TRUSTVect<_TYPE_,_SIZE_>::ref_data(_TYPE_* ptr, _SIZE_ size)
214{
215 md_vector_.detach();
218 line_size_ = 1;
219}
220
221// voir ArrOfDouble/Int::ref_array(). (cree un tableau sans structure parallele)
222template<typename _TYPE_, typename _SIZE_>
223inline void TRUSTVect<_TYPE_,_SIZE_>::ref_array(TRUSTArray<_TYPE_,_SIZE_>& m, _SIZE_ start, _SIZE_ new_size)
224{
225 md_vector_.detach();
226 TRUSTArray<_TYPE_,_SIZE_>::ref_array(m, start, new_size);
227 size_reelle_ = TRUSTArray<_TYPE_,_SIZE_>::size_array(); // pas size qui peut valoir -1
228 line_size_ = 1;
229}
230
231template<typename _TYPE_, typename _SIZE_>
233{
234 if (md_vector_.non_nul())
235 Process::exit("ERROR: from_tid_to_int() not implemented for parallel vect/tab!!");
236 out.line_size_ = this->line_size_;
238}
239
240template<typename _TYPE_, typename _SIZE_>
242{
243 if (md_vector_.non_nul())
244 Process::exit("ERROR: ref_as_big() not implemented for parallel vect/tab!!");
245 out.line_size_ = this->line_size_;
247}
248
249template<typename _TYPE_, typename _SIZE_>
251{
252 if (md_vector_.non_nul())
253 Process::exit("ERROR: ref_as_small() not implemented for parallel vect/tab!!");
254 out.line_size_ = this->line_size_;
256}
257
258
259// associe le md_vector au vecteur et initialise l'attribut size_reelle_ (voir methode size_reelle())
260// Si md_vector est nul, detache simplement le md_vector existant.
261// Precondition: le vecteur doit deja avoir la taille appropriee au nouveau md_vector, c'est a dire md_vector...get_nb_items_tot() * line_size_
262template<typename _TYPE_, typename _SIZE_>
264{
265#ifndef LATATOOLS
267 if (md_vector.non_nul())
268 {
269 size_r = md_vector->get_nb_items_reels();
270 if (size_r >= 0) size_r *= line_size_;
271 else size_r = -1; // Cas particulier ou la size_reelle ne veut rien dire
272
273 // Will throw if there is a problem:
275 }
276 size_reelle_ = size_r;
277 md_vector_ = md_vector;
278#endif
279}
280
281template<typename _TYPE_, typename _SIZE_>
282inline void TRUSTVect<_TYPE_,_SIZE_>::echange_espace_virtuel(IsExchangeBlocking is_exchange_blocking, const std::string kernel_name)
283{
284#ifndef LATATOOLS
285 if(Process::is_sequential()) return;
286#if INT_is_64_ == 2
287 // echange_espace_virtuel() should not be called on big array (but can be called on small arrays of TIDs, in SolvPetsc for example):
288 assert( (!std::is_same<_SIZE_, trustIdType>::value) );
289#endif
291#endif
292}
293
294template<typename _TYPE_, typename _SIZE_>
295inline void TRUSTVect<_TYPE_,_SIZE_>::start_echange_espace_virtuel_async(const std::string kernel_name)
296{
297 TRUSTVect<_TYPE_,_SIZE_>::echange_espace_virtuel(IsExchangeBlocking::NonBlockingStart, kernel_name);
298}
299
300template<typename _TYPE_, typename _SIZE_>
302{
303 TRUSTVect<_TYPE_,_SIZE_>::echange_espace_virtuel(IsExchangeBlocking::NonBlockingFinish, kernel_name);
304}
305
306#if INT_is_64_ == 2
307// We should never have to do MPI on big arrays:
308// [ABN] do not know why, constexpr test in generic version not working ...
309template<> inline void TRUSTVect<int, trustIdType>::echange_espace_virtuel(IsExchangeBlocking is_exchange_blocking, const std::string kernel_name)
310{
311 assert(false);
312 Process::exit("echange_espace_virtuel() called on big array or array of int!");
313}
314template<> inline void TRUSTVect<trustIdType, trustIdType>::echange_espace_virtuel(IsExchangeBlocking is_exchange_blocking, const std::string kernel_name)
315{
316 assert(false);
317 Process::exit("echange_espace_virtuel() called on big array or array of TID!");
318}
319template<> inline void TRUSTVect<double, trustIdType>::echange_espace_virtuel(IsExchangeBlocking is_exchange_blocking, const std::string kernel_name)
320{
321 assert(false);
322 Process::exit("echange_espace_virtuel() called on big array or array of double!");
323}
324template<> inline void TRUSTVect<float, trustIdType>::echange_espace_virtuel(IsExchangeBlocking is_exchange_blocking, const std::string kernel_name)
325{
326 assert(false);
327 Process::exit("echange_espace_virtuel() called on big array or array of float!");
328}
329
330template<> inline void TRUSTVect<int, trustIdType>::start_echange_espace_virtuel_async(const std::string kernel_name)
331{
332 assert(false);
333 Process::exit("start_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of int!");
334}
335template<> inline void TRUSTVect<trustIdType, trustIdType>::start_echange_espace_virtuel_async(const std::string kernel_name)
336{
337 assert(false);
338 Process::exit("start_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of TID!");
339}
340template<> inline void TRUSTVect<double, trustIdType>::start_echange_espace_virtuel_async(const std::string kernel_name)
341{
342 assert(false);
343 Process::exit("start_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of double!");
344}
345template<> inline void TRUSTVect<float, trustIdType>::start_echange_espace_virtuel_async(const std::string kernel_name)
346{
347 assert(false);
348 Process::exit("start_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of float!");
349}
350
351template<> inline void TRUSTVect<int, trustIdType>::finish_echange_espace_virtuel_async(const std::string kernel_name)
352{
353 assert(false);
354 Process::exit("finish_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of int!");
355}
356template<> inline void TRUSTVect<trustIdType, trustIdType>::finish_echange_espace_virtuel_async(const std::string kernel_name)
357{
358 assert(false);
359 Process::exit("finish_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of TID!");
360}
361template<> inline void TRUSTVect<double, trustIdType>::finish_echange_espace_virtuel_async(const std::string kernel_name)
362{
363 assert(false);
364 Process::exit("finish_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of double!");
365}
366template<> inline void TRUSTVect<float, trustIdType>::finish_echange_espace_virtuel_async(const std::string kernel_name)
367{
368 assert(false);
369 Process::exit("finish_echange_espace_virtuel_async(const std::string kernel_name) called on big array or array of float!");
370}
371
372
373#endif
374
375// ecriture des valeurs du tableau "raw" sans structure parallele
376template<typename _TYPE_, typename _SIZE_>
378{
379#ifndef LATATOOLS
381 os << (int)-1 << finl; // le marqueur -1 indique que c'est le nouveau format "ecrit", sans structure parallele
382#endif
383}
384
385template<typename _TYPE_, typename _SIZE_>
387{
388 TRUSTVect::lit(is, 0 /* Do not resize&read the array */);
389}
390
391// lecture d'un tableau pour reprise de calcul. On lit les valeurs "raw".
392// Attention, si le tableau n'est pas vide, il doit deja avoir la bonne taille et la bonne structure, sinon erreur !
393// Parameter resize_and_read if the array is sized AND read (by default, yes)
394template<typename _TYPE_, typename _SIZE_>
395inline void TRUSTVect<_TYPE_,_SIZE_>::lit(Entree& is, bool resize_and_read)
396{
397#ifndef LATATOOLS
398 _SIZE_ sz = -1;
399 is >> sz;
400 if (resize_and_read)
401 {
402 if (TRUSTArray<_TYPE_,_SIZE_>::size_array() == 0 && (!get_md_vector().non_nul()))
403 resize(sz, RESIZE_OPTIONS::NOCOPY_NOINIT);
405 {
406 // Si on cherche a relire un tableau de taille inconnue, le tableau doit etre reset() a l'entree. On n'aura pas la structure parallele du tableau !
407 Cerr << "Error in TRUSTVect::lit(Entree & is): array has already a structure with incorrect size" << finl;
409 }
411 }
412 else
413 {
414 // May be slow if large chunks are read:
415 // Double tmp;
416 //for (_SIZE_ i=0;i<sz;i++) is >> tmp;
417 // So we bufferize:
418 const _SIZE_ sz_max = 128000;
419 _SIZE_ buffer_size = std::min(sz,sz_max);
420 TRUSTArray<_TYPE_,_SIZE_> tmp(buffer_size);
421 while(sz>buffer_size)
422 {
423 is.get(tmp.addr(), buffer_size);
424 sz-=buffer_size;
425 }
426 is.get(tmp.addr(), sz);
427 }
428 _SIZE_ sz_reel = -2;
429 is >> sz_reel;
430 if (sz_reel >= 0)
431 {
432 // Lecture de l'ancien format. Ignore les valeurs lues.
433 _SIZE_ sz_virt;
434 is >> sz_virt;
435 DescStructure toto;
436 is >> toto;
437 if (!std::is_same<_TYPE_,int>::value) /* double ou float */
438 {
439 TRUSTArray<int,_SIZE_> it_communs;
440 is >> it_communs;
441 TRUSTArray<int,_SIZE_> it_communs_tot;
442 is >> it_communs_tot;
443 }
444 }
445#endif
446}
447
448template<typename _TYPE_, typename _SIZE_>
449template<typename _SCALAR_TYPE_>
450inline void TRUSTVect<_TYPE_,_SIZE_>::ajoute_sans_ech_esp_virt(_SCALAR_TYPE_ alpha, const TRUSTVect& y, Mp_vect_options opt)
451{
452 ajoute_alpha_v(*this, alpha, y, opt); // x+=alpha*y sans echange_espace_virtuel
453}
454
455template<typename _TYPE_, typename _SIZE_>
456template<typename _SCALAR_TYPE_>
457inline void TRUSTVect<_TYPE_,_SIZE_>::ajoute_produit_scalaire(_SCALAR_TYPE_ alpha, const TRUSTVect& x, const TRUSTVect& y, Mp_vect_options opt)
458{
459 ajoute_produit_scalaire(*this, alpha, x, y, opt); // z+=alpha*x*y;
460}
461
462template<typename _TYPE_, typename _SIZE_>
463template<typename _SCALAR_TYPE_>
464inline void TRUSTVect<_TYPE_,_SIZE_>::ajoute_carre(_SCALAR_TYPE_ alpha, const TRUSTVect& y, Mp_vect_options opt)
465{
466 ajoute_operation_speciale_generic<TYPE_OPERATION_VECT_SPEC::SQUARE_,_TYPE_>(*this,alpha,y,opt);
467}
468
469
470#endif /* TRUSTVect_TPP_included */
Sert a relire ancinne structure parallele.
virtual int get(int *ob, std::streamsize n)
Definition Entree.cpp:222
virtual bool validate(trustIdType sz_array, int line_size) const
virtual int get_nb_items_reels() const
static void echange_espace_virtuel(IntVect &, Operations_echange opt=ECHANGE_EV, IsExchangeBlocking is_exchange_blocking=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
: Cette classe est un OWN_PTR mais l'objet pointe est partage entre plusieurs
Definition MD_Vector.h:48
int non_nul() const
Definition MD_Vector.h:56
friend class Entree
Definition Objet_U.h:76
friend class Sortie
Definition Objet_U.h:75
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
static bool is_sequential()
Definition Process.cpp:115
void from_tid_to_int(TRUSTArray< int, int > &out) const
void attach_array(const TRUSTArray &a, _SIZE_ start=0, _SIZE_ size=-1)
void resize_array_(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ size_array() const
virtual void ref_array(TRUSTArray &, _SIZE_ start=0, _SIZE_ sz=-1)
_TYPE_ * addr()
TRUSTArray & inject_array(const TRUSTArray &source, _SIZE_ nb_elements=-1, _SIZE_ first_element_dest=0, _SIZE_ first_element_source=0)
void ref_as_big(TRUSTArray< _TYPE_, trustIdType > &out) const
void ref_as_small(TRUSTArray< _TYPE_, int > &out) const
bool detach_array()
bool isDataOnDevice() const
TRUSTArray & operator=(const TRUSTArray &)
friend class TRUSTArray
Definition TRUSTArray.h:108
virtual void ref_data(_TYPE_ *ptr, _SIZE_ size)
Sortie & printOn(Sortie &os) const override
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
void ref_as_small(TRUSTVect< _TYPE_, int > &out) const
virtual void finish_echange_espace_virtuel_async(const std::string kernel_name)
_SIZE_ size() const
Definition TRUSTVect.tpp:45
_SIZE_ size_totale() const
Definition TRUSTVect.tpp:61
void copy(const TRUSTArray< _TYPE_, int > &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
int line_size() const
Definition TRUSTVect.tpp:67
TRUSTVect & operator=(const TRUSTVect &)
virtual void lit(Entree &, bool resize_and_read=1)
virtual void jump(Entree &)
int line_size_
Definition TRUSTVect.h:212
void ref_as_big(TRUSTVect< _TYPE_, trustIdType > &out) const
void copy_(const TRUSTVect &v, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
_SIZE_ size_reelle_
Definition TRUSTVect.h:206
virtual void set_md_vector(const MD_Vector &)
_SIZE_ size_reelle() const
Definition TRUSTVect.tpp:27
virtual void start_echange_espace_virtuel_async(const std::string kernel_name)
_SIZE_ size_reelle_ok() const
Definition TRUSTVect.tpp:38
void from_tid_to_int(TRUSTVect< int, int > &out) const
void ref_array(TRUSTArray< _TYPE_, _SIZE_ > &, _SIZE_ start=0, _SIZE_ sz=-1) override
void resize_vect_(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
void ajoute_carre(_SCALAR_TYPE_ alpha, const TRUSTVect &y, Mp_vect_options opt=VECT_ALL_ITEMS)
virtual void ecrit(Sortie &) const
void ajoute(_SCALAR_TYPE_ alpha, const TRUSTVect &y, Mp_vect_options opt=VECT_ALL_ITEMS)
Definition TRUSTVect.tpp:52
void set_line_size_(int n)
Definition TRUSTVect.tpp:78
void ajoute_sans_ech_esp_virt(_SCALAR_TYPE_ alpha, const TRUSTVect &y, Mp_vect_options opt=VECT_REAL_ITEMS)
void ref_data(_TYPE_ *ptr, _SIZE_ new_size) override
MD_Vector md_vector_
Definition TRUSTVect.h:203
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTVect.tpp:91
friend class TRUSTVect
Definition TRUSTVect.h:78
virtual const MD_Vector & get_md_vector() const
Definition TRUSTVect.h:123
void ajoute_produit_scalaire(_SCALAR_TYPE_ alpha, const TRUSTVect &x, const TRUSTVect &y, Mp_vect_options opt=VECT_ALL_ITEMS)
virtual void ref(const TRUSTVect &)
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
void resize_tab(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) override