|
TRUST 1.9.8
HPC thermohydraulic platform
|
Represents a an array of int/int64/double/... values. More...
#include <TRUSTArray.h>
Public Types | |
| using | Value_type_ = _TYPE_ |
| using | int_t = _SIZE_ |
| using | Iterator_ = typename tcb::span<_TYPE_>::iterator |
| using | Vector_ = std::vector<_TYPE_, TVAlloc<_TYPE_> > |
| using | Span_ = tcb::span<_TYPE_> |
Public Member Functions | |
| Iterator_ | begin () |
| Iterator_ | end () |
| const Iterator_ | begin () const |
| const Iterator_ | end () const |
| virtual | ~TRUSTArray () |
| TRUSTArray () | |
| TRUSTArray (_SIZE_ n) | |
| TRUSTArray (const TRUSTArray &A) | |
| void | resize (_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) |
| void | resize_array (_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) |
| void | ref_as_big (TRUSTArray< _TYPE_, trustIdType > &out) const |
| void | ref_as_small (TRUSTArray< _TYPE_, int > &out) const |
| void | from_tid_to_int (TRUSTArray< int, int > &out) const |
| void | set_mem_storage (const STORAGE storage) |
| STORAGE | get_mem_storage () const |
| std::shared_ptr< Vector_ > | get_mem () |
| TRUSTArray & | operator= (const TRUSTArray &) |
| _TYPE_ & | operator[] (_SIZE_ i) |
| const _TYPE_ & | operator[] (_SIZE_ i) const |
| _TYPE_ & | operator() (_SIZE_ i) |
| const _TYPE_ & | operator() (_SIZE_ i) const |
| _TYPE_ * | addr () |
| const _TYPE_ * | addr () const |
| _TYPE_ * | data () |
| const _TYPE_ * | data () const |
| _SIZE_ | size_array () const |
| int | ref_count () const |
| void | append_array (_TYPE_ valeur) |
| TRUSTArray & | operator= (_TYPE_ x) |
| TRUSTArray & | operator+= (const TRUSTArray &y) |
| TRUSTArray & | operator+= (const _TYPE_ dy) |
| TRUSTArray & | operator-= (const TRUSTArray &y) |
| TRUSTArray & | operator-= (const _TYPE_ dy) |
| TRUSTArray & | operator*= (const _TYPE_ dy) |
| TRUSTArray & | operator/= (const _TYPE_ dy) |
| TRUSTArray & | inject_array (const TRUSTArray &source, _SIZE_ nb_elements=-1, _SIZE_ first_element_dest=0, _SIZE_ first_element_source=0) |
| TRUSTArray & | copy_array (const TRUSTArray &a) |
| void | ordonne_array () |
| virtual void | ref_data (_TYPE_ *ptr, _SIZE_ size) |
| virtual void | reset () |
| virtual void | ref_array (TRUSTArray &, _SIZE_ start=0, _SIZE_ sz=-1) |
| virtual void | resize_tab (_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) |
| DataLocation | get_data_location () |
| DataLocation | get_data_location () const |
| void | set_data_location (DataLocation flag) |
| void | set_data_location (DataLocation flag) const |
| int | size_mem () |
| void | ensureDataOnHost () |
| void | ensureDataOnHost () const |
| bool | isDataOnDevice () const |
| bool | checkDataOnDevice () |
| bool | checkDataOnDevice () const |
| bool | checkDataOnDevice (const TRUSTArray &arr) |
| virtual Span_ | get_span () |
| virtual Span_ | get_span_tot () |
| virtual const Span_ | get_span () const |
| virtual const Span_ | get_span_tot () const |
| virtual _SIZE_ | dimension_tot (int) const |
| void | ref_as_big (TRUSTArray< trustIdType, trustIdType > &out) const |
| void | ref_as_small (TRUSTArray< float, int > &out) const |
| void | ref_as_small (TRUSTArray< int, int > &out) const |
| void | from_tid_to_int (TRUSTArray< int, int > &out) const |
| Public Member Functions inherited from Objet_U | |
| ~Objet_U () override | |
| Destructeur, supprime l'objet de la liste d'objets enregistres dans "memoire". | |
| int | numero () const |
| Renvoie l'indice de l'objet dans Memoire::data. | |
| virtual int | est_egal_a (const Objet_U &) const |
| Renvoie 1 si l'objet x et *this sont une seule et meme instance (meme adresse en memoire). | |
| virtual const Nom & | le_nom () const |
| Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation. | |
| virtual void | nommer (const Nom &) |
| Donne un nom a l'Objet_U Methode virtuelle a surcharger. | |
| virtual int | reprendre (Entree &) |
| Reprise d'un Objet_U sur un flot d'entree Methode a surcharger. | |
| virtual int | sauvegarder (Sortie &) const |
| Sauvegarde d'un Objet_U sur un flot de sortie Methode a surcharger. | |
| int | get_object_id () const |
| Renvoie l'identifiant unique de l'objet object_id_. | |
| virtual const Type_info * | get_info () const |
| Donne des informations sur le type de l'Objet_U. | |
| const Nom & | que_suis_je () const |
| renvoie la chaine identifiant la classe. | |
| const char * | le_type () const |
| Donne le nom du type de l'Objet_U. | |
| virtual int | change_num (const int *const) |
| Change le numero interne de l'Objet_U. | |
| virtual int | lire_motcle_non_standard (const Motcle &motlu, Entree &is) |
| Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree. | |
| virtual int | associer_ (Objet_U &) |
| Associe l'Objet_U a un autre Objet_U Methode virtuelle a surcharger. | |
| const Interprete & | interprete () const |
| Interprete & | interprete () |
| Public Member Functions inherited from Process | |
| virtual | ~Process () |
Protected Member Functions | |
| unsigned | taille_memoire () const override |
| int | duplique () const override |
| Sortie & | printOn (Sortie &os) const override |
| Ecriture de l'objet sur un flot de sortie Methode a surcharger. | |
| Entree & | readOn (Entree &is) override |
| Lecture d'un Objet_U sur un flot d'entree Methode a surcharger. | |
| void | attach_array (const TRUSTArray &a, _SIZE_ start=0, _SIZE_ size=-1) |
| bool | detach_array () |
| void | resize_array_ (_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) |
| Protected Member Functions inherited from Objet_U | |
| Objet_U () | |
| Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_), et enregistre l'objet en "memoire". | |
| Objet_U (const Objet_U &) | |
| Constructeur par copie. | |
| const Objet_U & | operator= (const Objet_U &) |
| Operateur= : ne fait rien (on conserve le numero et l'identifiant). | |
| virtual void | set_param (Param &) const |
Protected Attributes | |
| int | nb_dim_ = 1 |
Friends | |
| class | TRUSTArrayKokkos |
| template<typename _TYPE2_, typename _SIZE2_> | |
| class | TRUSTArray |
Additional Inherited Members | |
| Static Public Member Functions inherited from Objet_U | |
| static const Nom & | nom_du_cas () |
| Renvoie une reference constante vers le nom du cas. | |
| static Nom & | get_set_nom_du_cas () |
| Renvoie une reference non constante vers le nom du cas (pour pouvoir le modifier). | |
| static const Type_info * | info () |
| Donne des informations sur le type de l'Objet_U. | |
| static const Objet_U & | self_cast (const Objet_U &) |
| methode ajoutee pour caster en python | |
| static Objet_U & | self_cast (Objet_U &) |
| Static Public Member Functions inherited from Process | |
| static int | me () |
| renvoie mon rang dans le groupe de communication courant. | |
| static int | nproc () |
| renvoie le nombre de processeurs dans le groupe courant Voir Comm_Group::nproc() et PE_Groups::current_group() | |
| static bool | is_parallel () |
| static void | exit (int exit_code=-1) |
| Routine de sortie de TRUST dans une region Kokkos. | |
| static double | mp_sum (double) |
| Calcule la somme de x sur tous les processeurs du groupe courant. | |
| static float | mp_sum (float) |
| static trustIdType | mp_sum (trustIdType) |
| Calcule la somme de x sur tous les processeurs du groupe courant. | |
| static double | mp_max (double) |
| static double | mp_min (double) |
| static int | mp_max (int) |
| renvoie le plus grand int i sur l'ensemble des processeurs du groupe courant. | |
| static int | mp_min (int) |
| renvoie le plus petit int i sur l'ensemble des processeurs du groupe courant. | |
| static double | mp_sum_as_double (int v) |
| static trustIdType | mppartial_sum (trustIdType i) |
| Calul de la somme partielle de i sur les processeurs 0 a me()-1 (renvoie 0 sur le processeur 0). | |
| template<typename T> | |
| static void | mp_sum_for_each (T &arg1, T &arg2) |
| C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters. | |
| template<typename T> | |
| static void | mp_sum_for_each (T &arg1, T &arg2, T &arg3) |
| template<typename T> | |
| static void | mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4) |
| template<typename T> | |
| static void | mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5) |
| template<typename T> | |
| static void | mp_max_for_each (T &arg1, T &arg2) |
| C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation. | |
| template<typename T> | |
| static void | mp_max_for_each (T &arg1, T &arg2, T &arg3) |
| template<typename T> | |
| static void | mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4) |
| template<typename T> | |
| static void | mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5) |
| template<typename T> | |
| static void | mp_min_for_each (T &arg1, T &arg2) |
| C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation. | |
| template<typename T> | |
| static void | mp_min_for_each (T &arg1, T &arg2, T &arg3) |
| template<typename T> | |
| static void | mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4) |
| template<typename T> | |
| static void | mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5) |
| template<typename _TYPE_> | |
| static void | mp_sum_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1) |
| template<typename _TYPE_> | |
| static void | mp_max_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1) |
| template<typename _TYPE_> | |
| static void | mp_min_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1) |
| static bool | mp_and (bool) |
| Calcule le 'et' logique de b sur tous les processeurs du groupe courant. | |
| static bool | mp_or (bool) |
| static int | check_int_overflow (trustIdType) |
| static int | je_suis_maitre () |
| renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0), 0 sinon. | |
| static KOKKOS_INLINE_FUNCTION void | Kokkos_exit (const char *) |
| Routine de sortie de TRUST dans une region Kokkos. | |
| static int | node_master () |
| renvoie 1 si on est sur le processeur maitre du noeud numa, 0 sinon. | |
| static void | exit (const Nom &message, int exit_code=-1) |
| static bool | is_sequential () |
| static void | barrier () |
| Synchronise tous les processeurs du groupe courant (attend que tous les processeurs soient arrives a la barriere). | |
| static void | abort () |
| Routine de sortie de Trio-U sur une erreur abort(). | |
| static Sortie & | Journal (int message_level=0) |
| Renvoie un objet statique de type Sortie qui sert de journal d'evenements. | |
| static double | ram_processeur () |
| static void | imprimer_ram_totale (int all_process=0) |
| static bool | force_single_file (const int ranks, const Nom &filename) |
| Static Public Attributes inherited from Objet_U | |
| static double | precision_geom = 1e-10 |
| static constexpr bool | HAS_POINTER = false |
| static int | dimension =0 |
| static int | format_precision_geom =11 |
| static int | axi =0 |
| static int | bidim_axi =0 |
| static int | DEACTIVATE_SIGINT_CATCH =0 |
| static Type_info | info_obj |
| static bool | disable_TU =false |
| Flag to disable or not the writing of the .TU files. | |
| static bool | stat_per_proc_perf_log =false |
| Flag to enable the writing of the statistics detailed per processor in _csv.TU file. | |
| Static Public Attributes inherited from Process | |
| static int | exception_sur_exit =0 |
| static int | multiple_files =5120 |
Represents a an array of int/int64/double/... values.
The two main members are mem_ and span_:
We can have 3 states for the array:
Finally, in case of a "XXTrav" array, the memory allocation is special:
In the template parameters below, TYPE is the value type (what it contains), SIZE is the extent type (how many items).
Definition at line 80 of file TRUSTArray.h.
| using TRUSTArray< _TYPE_, _SIZE_ >::int_t = _SIZE_ |
Definition at line 99 of file TRUSTArray.h.
| using TRUSTArray< _TYPE_, _SIZE_ >::Iterator_ = typename tcb::span<_TYPE_>::iterator |
Definition at line 100 of file TRUSTArray.h.
| using TRUSTArray< _TYPE_, _SIZE_ >::Span_ = tcb::span<_TYPE_> |
Definition at line 102 of file TRUSTArray.h.
| using TRUSTArray< _TYPE_, _SIZE_ >::Value_type_ = _TYPE_ |
Definition at line 98 of file TRUSTArray.h.
| using TRUSTArray< _TYPE_, _SIZE_ >::Vector_ = std::vector<_TYPE_, TVAlloc<_TYPE_> > |
Definition at line 101 of file TRUSTArray.h.
|
inlinevirtual |
Destroy array, potentially making block available again if this was a Trav
Definition at line 27 of file TRUSTArray.tpp.
|
inline |
Definition at line 118 of file TRUSTArray.h.
|
inline |
Definition at line 120 of file TRUSTArray.h.
|
inline |
Copy ctor. Performs a deep copy.
It is forbidden to deep copy a ref_data.
Definition at line 136 of file TRUSTArray.h.
|
inline |
Returns a pointer on the first element of the array. nullptr will be returned if array is detached. Careful, address might change after a resize_array(), ref_data(), etc.
Definition at line 159 of file TRUSTArray.tpp.
|
inline |
Definition at line 166 of file TRUSTArray.tpp.
|
inline |
Add a slot at the end of the array and store it valeur -> similar to vector<>::push_back
Ajoute une case en fin de tableau et y stocke la "valeur" Precondition: Le tableau ne doit pas etre "ref_data", et il ne doit pas y avoir plus d'une reference a la zone de memoire pointee (meme precondition que resize_array()) Le tableau doit etre de type TRUSTArray (pas un type derive)
Definition at line 216 of file TRUSTArray.tpp.
|
inlineprotected |
Attach the array to (part of) an existing block of data stored in another array. The data is then shared between that other array and this.
If size < 0, we take the data from the specified start till the end of the block. Array must be detached first before invoking this method. It is forbidden to attach to a ref_data.
Definition at line 242 of file TRUSTArray.tpp.
|
inline |
Definition at line 111 of file TRUSTArray.h.
|
inline |
Definition at line 113 of file TRUSTArray.h.
|
inline |
Definition at line 72 of file TRUSTArray_device.tpp.
|
inline |
Definition at line 57 of file TRUSTArray_device.tpp.
|
inline |
Definition at line 87 of file TRUSTArray_device.tpp.
|
inline |
Definition at line 227 of file TRUSTArray.h.
|
inline |
Definition at line 173 of file TRUSTArray.tpp.
|
inline |
Definition at line 179 of file TRUSTArray.tpp.
|
inlineprotected |
Bring the current array in a detached state, i.e. both 'mem_' and 'span_' are cleared, whatever the current state.
Definition at line 277 of file TRUSTArray.tpp.
|
inlinevirtual |
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< float, trustIdType >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, and TRUSTTab< trustIdType, trustIdType >.
Definition at line 297 of file TRUSTArray.tpp.
|
inlineoverrideprotectedvirtual |
Implements Objet_U.
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< float, trustIdType >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTTrav< _TYPE_ >, TRUSTTrav< double >, TRUSTTrav< float >, TRUSTTrav< int >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 85 of file TRUSTArray.h.
|
inline |
Definition at line 112 of file TRUSTArray.h.
|
inline |
Definition at line 114 of file TRUSTArray.h.
|
inline |
Definition at line 33 of file TRUSTArray_device.tpp.
|
inline |
Definition at line 24 of file TRUSTArray_device.tpp.
| void TRUSTArray< trustIdType, trustIdType >::from_tid_to_int | ( | TRUSTArray< int, int > & | out | ) | const |
Conversion from a BigArrOfTID to an ArrOfInt. Careful, it always does a copy! It is your responsibility to invoke it only when necessary (typically you should avoid this when trustIdType == int ...)
Definition at line 299 of file TRUSTArray.cpp.
| void TRUSTArray< _TYPE_, _SIZE_ >::from_tid_to_int | ( | TRUSTArray< int, int > & | out | ) | const |
Definition at line 316 of file TRUSTArray.cpp.
|
inline |
Definition at line 245 of file TRUSTArray.h.
|
inline |
Definition at line 246 of file TRUSTArray.h.
|
inline |
Definition at line 173 of file TRUSTArray.h.
|
inline |
Definition at line 171 of file TRUSTArray.h.
|
inlinevirtual |
Reimplemented in TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 258 of file TRUSTArray.h.
|
inlinevirtual |
Reimplemented in TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 260 of file TRUSTArray.h.
|
inlinevirtual |
Reimplemented in TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 259 of file TRUSTArray.h.
|
inlinevirtual |
Reimplemented in TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 261 of file TRUSTArray.h.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::inject_array | ( | const TRUSTArray< _TYPE_, _SIZE_ > & | source, |
| _SIZE_ | nb_elements = -1, | ||
| _SIZE_ | first_element_dest = 0, | ||
| _SIZE_ | first_element_source = 0 ) |
Copie les elements source[first_element_source + i] dans les elements (*this)[first_element_dest + i] pour 0 <= i < nb_elements Les autres elements de (*this) sont inchanges.
| const | ArrOfDouble& m: le tableau a utiliser, doit etre different de *this ! |
| _SIZE_ | nb_elements: nombre d'elements a copier, nb_elements >= -1. Si nb_elements==-1, on copie tout le tableau m. Valeurs par defaut: -1 |
| _SIZE_ | first_element_dest. Valeurs par defaut: 0 |
| _SIZE_ | first_element_source. Valeurs par defaut: 0 |
| Sort | en erreur si la taille du tableau m est plus grande que la taille de tableau this. |
Definition at line 195 of file TRUSTArray.cpp.
|
inline |
Definition at line 47 of file TRUSTArray_device.tpp.
|
inline |
Definition at line 180 of file TRUSTArray.h.
|
inline |
Definition at line 181 of file TRUSTArray.h.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator*= | ( | const _TYPE_ | dy | ) |
muliplie toutes les cases par dy
Definition at line 454 of file TRUSTArray.cpp.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator+= | ( | const _TYPE_ | dy | ) |
ajoute la meme valeur a toutes les cases du tableau
Ajoute la meme valeur a toutes les cases du tableau
Definition at line 386 of file TRUSTArray.cpp.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator+= | ( | const TRUSTArray< _TYPE_, _SIZE_ > & | y | ) |
Addition case a case sur toutes les cases du tableau : la taille de y doit etre au moins egale a la taille de this
Definition at line 355 of file TRUSTArray.cpp.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator-= | ( | const _TYPE_ | dy | ) |
soustrait la meme valeur a toutes les cases
Definition at line 445 of file TRUSTArray.cpp.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator-= | ( | const TRUSTArray< _TYPE_, _SIZE_ > & | y | ) |
Soustraction case a case sur toutes les cases du tableau : tableau de meme taille que *this
Definition at line 414 of file TRUSTArray.cpp.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator/= | ( | const _TYPE_ | dy | ) |
divise toutes les cases par dy (pas pour TRUSTArray<int>)
Definition at line 482 of file TRUSTArray.cpp.
| TRUSTArray< _TYPE_, _SIZE_ > & TRUSTArray< _TYPE_, _SIZE_ >::operator= | ( | _TYPE_ | x | ) |
Assign 'x' to all slots in the array
Remplit le tableau avec la x en parametre (x est affecte a toutes les cases du tableau)
Definition at line 327 of file TRUSTArray.cpp.
|
inline |
Copy the data from another array, potentially resizing. The storage type is not copied.
Definition at line 115 of file TRUSTArray.tpp.
|
inline |
operateur [] retourne le ieme element du tableau Parametre: SIZE i Signification: indice dans l'intervalle 0 <= i < size_array() Exception: assert si i n'est pas dans l'intervalle
Definition at line 133 of file TRUSTArray.tpp.
|
inline |
Definition at line 143 of file TRUSTArray.tpp.
|
inline |
Tri des valeurs du tableau dans l'ordre croissant.
Definition at line 228 of file TRUSTArray.tpp.
|
overrideprotectedvirtual |
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
| (Sortie& | s) flot de sortie |
Reimplemented from Objet_U.
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< float, trustIdType >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTTrav< _TYPE_ >, TRUSTTrav< double >, TRUSTTrav< float >, TRUSTTrav< int >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 29 of file TRUSTArray.cpp.
|
overrideprotectedvirtual |
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
| (Entree& | s) flot d'entree |
Reimplemented from Objet_U.
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< float, trustIdType >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTTrav< _TYPE_ >, TRUSTTrav< double >, TRUSTTrav< float >, TRUSTTrav< int >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 45 of file TRUSTArray.cpp.
|
inlinevirtual |
Make the current array point to the data of another existing array. Ownership of the data is hence shared.
The current array is first detached (see detach_array()), and then attached to the provided data (see attach_array()) Wanring: virtual -> in derived classes this method initializes structures to create a sequential array.
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTVect< _TYPE_, _SIZE_ >, and TRUSTVect< _TYPE_, int >.
Definition at line 103 of file TRUSTArray.tpp.
| void TRUSTArray< _TYPE_, _SIZE_ >::ref_as_big | ( | TRUSTArray< _TYPE_, trustIdType > & | out | ) | const |
Definition at line 260 of file TRUSTArray.cpp.
| void TRUSTArray< trustIdType, int >::ref_as_big | ( | TRUSTArray< trustIdType, trustIdType > & | out | ) | const |
Conversion methods - from a small array (SIZE=int) of TID (TYPE=trustIdType), return a big one (SIZE=trustIdType). No data copied! This behaves somewhat like a ref_array. Used in LATA stuff notably. Not implemented for TYPE=double or float (because never needed).
Definition at line 254 of file TRUSTArray.cpp.
| void TRUSTArray< _TYPE_, _SIZE_ >::ref_as_small | ( | TRUSTArray< _TYPE_, int > & | out | ) | const |
Definition at line 288 of file TRUSTArray.cpp.
| void TRUSTArray< float, trustIdType >::ref_as_small | ( | TRUSTArray< float, int > & | out | ) | const |
Conversion methods - from a big array (SIZE=trustIdType), return a small one (SIZE=int). Overflow is detected in debug if array is too big to be fit into SIZE=int. No data copied! This behaves somewhat like a ref_array. Used in LATA stuff and FT notably.
Definition at line 272 of file TRUSTArray.cpp.
| void TRUSTArray< int, trustIdType >::ref_as_small | ( | TRUSTArray< int, int > & | out | ) | const |
Definition at line 280 of file TRUSTArray.cpp.
|
inline |
Returns the number of owners of the data, i.e. the number of Arrays pointing to the same underlying data
Returns the number of shared owners of the data underlying the array. If -1 detached array. This is simply the ref count of the shared pointer 'mem_'
Definition at line 196 of file TRUSTArray.tpp.
|
inlinevirtual |
Construction de tableaux qui pointent vers des donnees existantes !!! Utiliser ref_data avec precaution
Make the array point to the memory zone indicated by data_. The array is detached from its current underlying data ('mem_' is released).
Warning: virtual method. In derived classes this method initializes the structures to create a sequential array. To create a ref on a parallel array, see DoubleVect::ref()
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 86 of file TRUSTArray.tpp.
|
inlinevirtual |
Remet le tableau dans l'etat obtenu avec le constructeur par defaut (libere la memoire mais conserve le mode d'allocation memoire actuel)
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< float, trustIdType >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 240 of file TRUSTArray.h.
|
inline |
Definition at line 156 of file TRUSTArray.h.
|
inline |
Change the size of the array.
This updates the underlying std::vector size.
Conditions:
Definition at line 43 of file TRUSTArray.tpp.
|
protected |
Protected method for resize. Used by derived classes. Same as resize_array() with less checks.
This is also where we deal with the STORAGE::TEMP_STORAGE capability, i.e. the Trav arrays. There memory is taken from a shared pool (TRUSTTravPool). This kind of array should never be used in 64bits, since Trav are meaningful when inside the timestepping (so the 32bit world after the Scatter isntruction).
Definition at line 79 of file TRUSTArray.cpp.
|
inlinevirtual |
Methode virtuelle (dans Array_base) identique a resize_array(), permet de traiter de facon generique les ArrOf, Vect et Tab. Si l'objet est de type TRUSTArray, appel a resize_array(n)
Prerequis: le tableau doit etre "resizable" (voir resize_array()). S'il est d'un type derive (Vect ou Tab), il ne doit pas avoir de descripteur parallele si la taille est effectivement modifiee.
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 62 of file TRUSTArray.tpp.
|
inline |
Definition at line 247 of file TRUSTArray.h.
|
inline |
Definition at line 248 of file TRUSTArray.h.
|
inline |
Memory allocation type - TEMP arrays (i.e. Trav) have a different allocation mechanism - see TRUSTTravPool.h)
Definition at line 73 of file TRUSTArray.tpp.
|
inline |
Return the size of the span on the data (not the full underlying allocated size)
Returns the size of the array.
Definition at line 187 of file TRUSTArray.tpp.
|
inline |
Definition at line 249 of file TRUSTArray.h.
|
inlineoverrideprotectedvirtual |
Implements Objet_U.
Reimplemented in TRUSTTab< _TYPE_, _SIZE_ >, TRUSTTab< _SIZE_, _SIZE_ >, TRUSTTab< _TYPE_ >, TRUSTTab< _TYPE_, int >, TRUSTTab< _TYPE_, trustIdType >, TRUSTTab< double, _SIZE_ >, TRUSTTab< double, int >, TRUSTTab< double, trustIdType >, TRUSTTab< float, int >, TRUSTTab< float, trustIdType >, TRUSTTab< int, int >, TRUSTTab< int, trustIdType >, TRUSTTab< trustIdType, int >, TRUSTTab< trustIdType, trustIdType >, TRUSTTrav< _TYPE_ >, TRUSTTrav< double >, TRUSTTrav< float >, TRUSTTrav< int >, TRUSTVect< _TYPE_, _SIZE_ >, TRUSTVect< _SIZE_, _SIZE_ >, TRUSTVect< _TYPE_, int >, TRUSTVect< _TYPE_, trustIdType >, TRUSTVect< double, _SIZE_ >, TRUSTVect< double, int >, TRUSTVect< double, trustIdType >, TRUSTVect< float, _SIZE_ >, TRUSTVect< float, int >, TRUSTVect< int, _SIZE_ >, TRUSTVect< int, _TYPE_ >, TRUSTVect< int, int >, TRUSTVect< int, trustIdType >, TRUSTVect< trustIdType, int >, and TRUSTVect< trustIdType, trustIdType >.
Definition at line 83 of file TRUSTArray.h.
|
friend |
Definition at line 108 of file TRUSTArray.h.
|
friend |
Definition at line 105 of file TRUSTArray.h.
|
protected |
Definition at line 95 of file TRUSTArray.h.