TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
TRUSTTab.h
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 TRUSTTab_included
17#define TRUSTTab_included
18
19#include <MD_Vector_base.h>
20#include <TRUSTVect.h>
21#include <math.h>
22
23
24/*! @brief : Tableau a n entrees pour n<= 4.
25 *
26 * Repose sur un TRUSTVect avec calculs de l'indice corespondant
27 *
28 */
29template<typename _TYPE_, typename _SIZE_>
30class TRUSTTab : public TRUSTVect<_TYPE_,_SIZE_>
31{
32protected:
33 inline unsigned taille_memoire() const override { throw; }
34
35 inline int duplique() const override
36 {
37 TRUSTTab* xxx = new TRUSTTab(*this);
38 if(!xxx) Process::exit("Not enough memory ");
39 return xxx->numero();
40 }
41
42 /*! @brief ecriture d'un tableau sequentiel (idem que TRUSTVect::printOn() on ne sait pas quoi faire de pertinent pour un tableau distribue).
43 *
44 */
45 Sortie& printOn(Sortie& os) const override
46 {
47#ifndef LATATOOLS
48 assert(verifie_LINE_SIZE());
50 Process::exit("Error in TRUSTTab::printOn: try to print a parallel vector");
51 os << this->nb_dim_ << finl;
52 assert(dimensions_[0] == dimension_tot_0_);
53 if (this->nb_dim_ > 0) os.put(dimensions_, this->nb_dim_, this->nb_dim_);
54
55 const _SIZE_ sz = TRUSTVect<_TYPE_,_SIZE_>::size_array();
56 os << sz << finl;
57 const int l_size = TRUSTVect<_TYPE_,_SIZE_>::line_size();
58 const _TYPE_ *data = TRUSTVect<_TYPE_,_SIZE_>::addr();
59
60 if (sz > 0) os.put(data, sz, l_size);
61#endif
62 return os;
63 }
64
65 /*! @brief lecture d'un tableau sequentiel
66 *
67 */
68 Entree& readOn(Entree& is) override
69 {
70#ifndef LATATOOLS
71 // Que veut-on faire si on lit dans un vecteur ayant deja une structure parallele ?
73 Process::exit("Error in TRUSTTab::readOn: vector has a parallel structure");
74
75 is >> this->nb_dim_;
76 if (this->nb_dim_ < 1 || this->nb_dim_ > MAXDIM_TAB)
77 {
78 Cerr << "Error in TRUSTTab::readOn: wrong this->nb_dim_ = " << this->nb_dim_ << finl;
80 }
81 is.get(dimensions_, this->nb_dim_);
82 if (dimensions_[0] < 0)
83 {
84 Cerr << "Error in TRUSTTab::readOn: wrong dimension(0) = " << dimensions_[0] << finl;
86 }
87 int l_size = 1;
88 for (int i = 1; i < this->nb_dim_; i++)
89 {
90 if (dimensions_[i] < 0)
91 {
92 Cerr << "Error in TRUSTTab::readOn: wrong dimension(" << i << ") = " << dimensions_[i] << finl;
94 }
95 l_size *= (int)dimensions_[i];
96 }
97 dimension_tot_0_ = dimensions_[0];
100 if (dimension_tot_0_ * l_size != TRUSTVect<_TYPE_,_SIZE_>::size_array())
101 {
102 Cerr << "Error in TRUSTTab::readOn: wrong size_array " << TRUSTVect<_TYPE_,_SIZE_>::size_array() << ", expected " << dimension_tot_0_ * l_size << finl;
104 }
105 assert(verifie_LINE_SIZE());
106#endif
107 return is;
108 }
109
110public:
111 // One instanciation with given template parameter may see all other template versions (useful in ref_as_xxx())
112 template<typename _TYPE2_, typename _SIZE2_> friend class TRUSTTab;
113
114 TRUSTTab() : dimension_tot_0_(0)
115 {
116 this->nb_dim_=1;
117 init_dimensions(dimensions_);
118 dimensions_[0] = 0;
119 }
120
121 TRUSTTab(const TRUSTTab& dbt): TRUSTVect<_TYPE_,_SIZE_>(dbt), dimension_tot_0_(dbt.dimension_tot_0_)
122 {
123 this->nb_dim_=dbt.nb_dim_;
124 for (int i = 0; i < MAXDIM_TAB; i++) dimensions_[i] = dbt.dimensions_[i];
125 }
126
127 TRUSTTab(_SIZE_ n) : TRUSTVect<_TYPE_,_SIZE_>(n), dimension_tot_0_(n)
128 {
129 this->nb_dim_=1;
130 init_dimensions(dimensions_);
131 dimensions_[0] = n;
132 }
133
134 TRUSTTab(_SIZE_ n1, int n2): TRUSTVect<_TYPE_,_SIZE_>(n1*n2), dimension_tot_0_(n1)
135 {
136 this->nb_dim_=2;
137 assert(n1 >= 0 && n2 >= 0);
138 if (std::is_same<_TYPE_,int>::value && (long)n1*(long)n2 > (long)std::numeric_limits<int>::max())
139 {
140 Cerr << "n1*n2 > 2^31. Error! Contact TRUST support, integer 32 bits limit exceeded with n1=" << n1 << " and n2=" << n2 << finl;
142 }
143 init_dimensions(dimensions_);
144 dimensions_[0]=n1;
145 dimensions_[1]=n2;
147 }
148
149 TRUSTTab(_SIZE_ n1, int n2, int n3) : TRUSTVect<_TYPE_,_SIZE_>(n1*n2*n3), dimension_tot_0_(n1)
150 {
151
152 this->nb_dim_=3;
153 assert(n1 >= 0 && n2 >= 0 && n3 >= 0);
154 if (std::is_same<_TYPE_,int>::value && (long)n1*(long)n2*(long)n3 > (long)std::numeric_limits<int>::max())
155 {
156 Cerr << "n1*n2*n3 > 2^31. Error! Contact TRUST support, integer 32 bits limit exceeded with n1=" << n1 << " and n2=" << n2 << " and n3=" << n3 << finl;
158 }
159 init_dimensions(dimensions_);
160 dimensions_[0]=n1;
161 dimensions_[1]=n2;
162 dimensions_[2]=n3;
164 }
165
166 TRUSTTab(_SIZE_ n1, int n2, int n3, int n4) : TRUSTVect<_TYPE_,_SIZE_>(n1*n2*n3*n4), dimension_tot_0_(n1)
167 {
168 this->nb_dim_=4;
169 assert(n1 >= 0 && n2 >= 0 && n3 >= 0 && n4 >= 0);
170 if (std::is_same<_TYPE_,int>::value && (long)n1*(long)n2*(long)n3*(long)n4 > (long)std::numeric_limits<int>::max())
171 {
172 Cerr << "n1*n2*n3*n4 > 2^31. Error! Contact TRUST support, integer 32 bits limit exceeded with n1=" << n1 << " and n2=" << n2 << " and n3=" << n3 << " and n3=" << n3 << finl;
174 }
175 init_dimensions(dimensions_);
176 dimensions_[0]=n1;
177 dimensions_[1]=n2;
178 dimensions_[2]=n3;
179 dimensions_[3]=n4;
181 }
182
183 inline void resize_dim0(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
184 inline void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
185 inline void resize(_SIZE_ n1, int n2, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
186 inline void resize(_SIZE_ n1, int n2, int n3, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
187 inline void resize(_SIZE_ n1, int n2, int n3, int n4, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
188 inline void resize(const TRUSTArray<_SIZE_,int>& tailles, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
189 inline void copy(const TRUSTTab&, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT);
190 inline void append_line(_TYPE_);
191 inline void append_line(_TYPE_, _TYPE_);
192 inline void append_line(_TYPE_, _TYPE_, _TYPE_);
193 inline void append_line(_TYPE_, _TYPE_, _TYPE_, _TYPE_);
194
195 // See doc in .tpp file!
196 _SIZE_ dimension(int d) const;
197 int dimension_int(int d) const;
198
199 inline int nb_dim() const { return this->nb_dim_; }
200
201 // See same methods in TRUSTArray - CAREFUL, this is not an override because arg types are different (tab vs arr)
202 inline void from_tid_to_int(TRUSTTab<int, int>& out) const;
204 inline void ref_as_small(TRUSTTab<_TYPE_, int>& out) const;
205
206 inline TRUSTTab& operator=(const TRUSTTab&);
208 inline TRUSTTab& operator=(_TYPE_ d);
209 inline _TYPE_& operator()(const TRUSTArray<_SIZE_,int>& indice);
210 inline _TYPE_ operator()(const TRUSTArray<_SIZE_,int>& indice) const;
211 inline _TYPE_& operator[](_SIZE_ i);
212 inline const _TYPE_& operator[](_SIZE_ i) const ;
213 inline _TYPE_& operator()(_SIZE_ i);
214 inline const _TYPE_& operator()(_SIZE_ i) const ;
215 inline _TYPE_& operator()(_SIZE_ i1, int i2);
216 inline const _TYPE_& operator()(_SIZE_ i1, int i2) const ;
217 inline _TYPE_& operator()(_SIZE_ i1, int i2, int i3);
218 inline const _TYPE_& operator()(_SIZE_ i1, int i2, int i3) const ;
219 inline _TYPE_& operator()(_SIZE_ i1, int i2, int i3, int i4);
220 inline const _TYPE_& operator()(_SIZE_ i1, int i2, int i3, int i4) const ;
221
222 // Juste pour TRUSTTab<double/float>
223 template <typename _T_> inline void ajoute_produit_tensoriel(_T_ alpha, const TRUSTTab<_T_,_SIZE_>&, const TRUSTTab<_T_,_SIZE_>&); // z+=alpha*x*y;
224 template <typename _T_> inline void resoud_LU(_SIZE_, TRUSTArray<int,_SIZE_>&, const TRUSTArray<_T_,_SIZE_>&, TRUSTArray<_T_,_SIZE_>&);
225 template <typename _T_> inline bool inverse_LU(const TRUSTArray<_T_,_SIZE_>&, TRUSTArray<_T_,_SIZE_>&);
226 template <typename _T_> inline bool decomp_LU(_SIZE_, TRUSTArray<int,_SIZE_>&, TRUSTTab<_T_,_SIZE_>&);
227 template <typename _T_> inline _T_ max_du_u(const TRUSTTab<_T_,_SIZE_>&);
228
229 void ajoute_produit_tensoriel(int alpha, const TRUSTTab<int,_SIZE_>&, const TRUSTTab<int,_SIZE_>&) = delete; // z+=alpha*x*y;
233 int max_du_u(const TRUSTTab<int,_SIZE_>&) = delete;
234
235 // methodes virtuelles
236 inline _SIZE_ dimension_tot(int) const override;
237 inline virtual void ref(const TRUSTTab&);
238 inline virtual void ref_tab(TRUSTTab&, _SIZE_ start_line=0, _SIZE_ nb_lines=-1);
239 inline void set_md_vector(const MD_Vector&) override;
240 inline void jump(Entree&) override;
241 inline void lit(Entree&, bool resize_and_read=true) override;
242 inline void ecrit(Sortie&) const override;
243 inline void ref(const TRUSTVect<_TYPE_,_SIZE_>&) override;
244 inline void ref_data(_TYPE_* ptr, _SIZE_ size) override;
245 inline void ref_array(TRUSTArray<_TYPE_,_SIZE_>&, _SIZE_ start=0, _SIZE_ sz=-1) override;
246 inline void reset() override;
247 inline void resize_tab(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) override;
248
249 inline void reshape(_SIZE_ n1, int n2);
250 inline void reshape(_SIZE_ n1, int n2, int n3);
251 inline void reshape(_SIZE_ n1, int n2, int n3, int n4);
252 inline void promote_scalar_to_dim2(); // if nb_dim()==1, expose it as (n,1)
253
254#ifdef KOKKOS
255
256 //Overriden accessors from TRUSTArray. The default _SHAPE_ is 2 for tabs, then calls the Vect accessor
257
258 // Read-only
259 template <int _SHAPE_ = 2, typename EXEC_SPACE = Kokkos::DefaultExecutionSpace>
260 inline std::enable_if_t<is_default_exec_space<EXEC_SPACE>, ConstView<_TYPE_, _SHAPE_>>
265
266 template <int _SHAPE_ = 2, typename EXEC_SPACE = Kokkos::DefaultExecutionSpace>
267 inline std::enable_if_t<gpu_enabled_is_host_exec_space<EXEC_SPACE>, ConstHostView<_TYPE_, _SHAPE_>>
272
273 // Write-only
274 template <int _SHAPE_ = 2, typename EXEC_SPACE = Kokkos::DefaultExecutionSpace>
275 inline std::enable_if_t<is_default_exec_space<EXEC_SPACE>, View<_TYPE_, _SHAPE_>>
280
281 template <int _SHAPE_ = 2, typename EXEC_SPACE = Kokkos::DefaultExecutionSpace>
282 inline std::enable_if_t<gpu_enabled_is_host_exec_space<EXEC_SPACE>, HostView<_TYPE_, _SHAPE_>>
287
288 // Read-write
289 template <int _SHAPE_ = 2, typename EXEC_SPACE = Kokkos::DefaultExecutionSpace>
290 inline std::enable_if_t<is_default_exec_space<EXEC_SPACE>, View<_TYPE_, _SHAPE_>>
295
296 template <int _SHAPE_ = 2, typename EXEC_SPACE = Kokkos::DefaultExecutionSpace>
297 inline std::enable_if_t<gpu_enabled_is_host_exec_space<EXEC_SPACE>, HostView<_TYPE_, _SHAPE_>>
302
303#endif
304private:
305 static constexpr int MAXDIM_TAB = 4;
306 /*! Dimensions "reelles" (dimensions_[0] * line_size() = size_reelle()) : line_size() est egal au produit des dimensions_[i] pour 1 <= i < this->nb_dim_
307 * Everything is stored as _SIZE_ but higher dims (>=1) should fit in an int. See line_size().
308 */
309 _SIZE_ dimensions_[MAXDIM_TAB];
310
311 // Dimension totale (nombre de lignes du tableau) = nb lignes reeles + nb lignes virtuelles
312 // Les dimensions dimension_tot(i>=1) sont implicitement egales a dimension(i)
313 _SIZE_ dimension_tot_0_;
314
315 inline void verifie_MAXDIM_TAB() const
316 {
317 if (MAXDIM_TAB != 4)
318 {
319 Cerr << "Update code for MAXDIM_TAB for CHECK_LINE_SIZE" << finl;
320 throw;
321 }
322 }
323
324 inline bool verifie_LINE_SIZE() const
325 {
326 return ((TRUSTVect<_TYPE_,_SIZE_>::line_size() == ((this->nb_dim_ > 1) ? dimensions_[1] : 1) * ((this->nb_dim_ > 2) ? dimensions_[2] : 1) * ((this->nb_dim_ > 3) ? dimensions_[3] : 1))
328 }
329
330 inline void init_dimensions(_SIZE_ * tab)
331 {
332#ifndef NDEBUG
333 for (int i = 0; i < MAXDIM_TAB; i++) tab[i] = -1;
334#endif
335 }
336};
337
338using DoubleTab = TRUSTTab<double, int>;
339using FloatTab = TRUSTTab<float, int>;
340using IntTab = TRUSTTab<int, int>;
341using TIDTab = TRUSTTab<trustIdType, int>;
342
343template <typename _TYPE_>
344using BigTRUSTTab = TRUSTTab<_TYPE_, trustIdType>;
345
346using BigDoubleTab = BigTRUSTTab<double>;
347using BigIntTab = BigTRUSTTab<int>;
348using BigTIDTab = BigTRUSTTab<trustIdType>;
349
350/* ********************************* *
351 * FONCTIONS NON MEMBRES DE TRUSTTab *
352 * ********************************* */
353
354#include <TRUSTTab_tools.tpp> // external templates function specializations ici ;)
355
356/* ***************************** *
357 * FONCTIONS MEMBRES DE TRUSTTab *
358 * ***************************** */
359
360#include <TRUSTTab.tpp> // The rest here!
361
362#endif /* TRUSTTab_included */
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual int get(int *ob, std::streamsize n)
Definition Entree.cpp:222
: Cette classe est un OWN_PTR mais l'objet pointe est partage entre plusieurs
Definition MD_Vector.h:48
int numero() const
Renvoie l'indice de l'objet dans Memoire::data.
Definition Objet_U.cpp:268
static int nproc()
renvoie le nombre de processeurs dans le groupe courant Voir Comm_Group::nproc() et PE_Groups::curren...
Definition Process.cpp:104
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
virtual int put(const unsigned *ob, std::streamsize n, std::streamsize nb_colonnes=1)
Definition Sortie.cpp:101
Represents a an array of int/int64/double/... values.
Definition TRUSTArray.h:81
_SIZE_ size_array() const
_TYPE_ * addr()
: Tableau a n entrees pour n<= 4.
Definition TRUSTTab.h:31
_TYPE_ & operator()(_SIZE_ i1, int i2)
Definition TRUSTTab.tpp:58
void reshape(_SIZE_ n1, int n2, int n3)
Definition TRUSTTab.tpp:400
void jump(Entree &) override
Definition TRUSTTab.tpp:701
void ref_as_big(TRUSTTab< _TYPE_, trustIdType > &out) const
Definition TRUSTTab.tpp:188
virtual void ref(const TRUSTTab &)
Definition TRUSTTab.tpp:308
TRUSTTab & operator=(const TRUSTVect< _TYPE_, _SIZE_ > &)
Definition TRUSTTab.tpp:587
TRUSTTab & operator=(_TYPE_ d)
Definition TRUSTTab.tpp:615
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_wo()
Definition TRUSTTab.h:276
void set_md_vector(const MD_Vector &) override
Definition TRUSTTab.tpp:673
void resoud_LU(_SIZE_, TRUSTArray< int, _SIZE_ > &, const TRUSTArray< _T_, _SIZE_ > &, TRUSTArray< _T_, _SIZE_ > &)
Definition TRUSTTab.tpp:900
void append_line(_TYPE_, _TYPE_, _TYPE_)
Definition TRUSTTab.tpp:243
int dimension_int(int d) const
Definition TRUSTTab.tpp:152
const _TYPE_ & operator()(_SIZE_ i1, int i2, int i3, int i4) const
Definition TRUSTTab.tpp:107
int inverse_LU(const TRUSTArray< int, _SIZE_ > &, TRUSTArray< int, _SIZE_ > &)=delete
void append_line(_TYPE_, _TYPE_, _TYPE_, _TYPE_)
Definition TRUSTTab.tpp:259
const _TYPE_ & operator()(_SIZE_ i1, int i2, int i3) const
Definition TRUSTTab.tpp:86
void ref_array(TRUSTArray< _TYPE_, _SIZE_ > &, _SIZE_ start=0, _SIZE_ sz=-1) override
Definition TRUSTTab.tpp:332
void ref_data(_TYPE_ *ptr, _SIZE_ size) override
Definition TRUSTTab.tpp:319
void promote_scalar_to_dim2()
Definition TRUSTTab.tpp:441
_TYPE_ operator()(const TRUSTArray< _SIZE_, int > &indice) const
Definition TRUSTTab.tpp:653
void lit(Entree &, bool resize_and_read=true) override
Definition TRUSTTab.tpp:710
void reshape(_SIZE_ n1, int n2, int n3, int n4)
Definition TRUSTTab.tpp:420
void ref_as_small(TRUSTTab< _TYPE_, int > &out) const
Definition TRUSTTab.tpp:198
void resize(_SIZE_ n1, int n2, int n3, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:500
const _TYPE_ & operator()(_SIZE_ i) const
Definition TRUSTTab.tpp:48
void reshape(_SIZE_ n1, int n2)
Definition TRUSTTab.tpp:381
friend class TRUSTTab
Definition TRUSTTab.h:112
void reset() override
Definition TRUSTTab.tpp:362
_TYPE_ & operator[](_SIZE_ i)
Definition TRUSTTab.tpp:23
int max_du_u(const TRUSTTab< int, _SIZE_ > &)=delete
_TYPE_ & operator()(const TRUSTArray< _SIZE_, int > &indice)
Definition TRUSTTab.tpp:635
int nb_dim() const
Definition TRUSTTab.h:199
TRUSTTab(_SIZE_ n)
Definition TRUSTTab.h:127
void append_line(_TYPE_, _TYPE_)
Definition TRUSTTab.tpp:228
_TYPE_ & operator()(_SIZE_ i)
Definition TRUSTTab.tpp:40
int duplique() const override
Definition TRUSTTab.h:35
std::enable_if_t< gpu_enabled_is_host_exec_space< EXEC_SPACE >, ConstHostView< _TYPE_, _SHAPE_ > > view_ro() const
Definition TRUSTTab.h:268
Sortie & printOn(Sortie &os) const override
ecriture d'un tableau sequentiel (idem que TRUSTVect::printOn() on ne sait pas quoi faire de pertinen...
Definition TRUSTTab.h:45
virtual void ref_tab(TRUSTTab &, _SIZE_ start_line=0, _SIZE_ nb_lines=-1)
Definition TRUSTTab.tpp:345
Entree & readOn(Entree &is) override
lecture d'un tableau sequentiel
Definition TRUSTTab.h:68
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
void ecrit(Sortie &) const override
Definition TRUSTTab.tpp:688
TRUSTTab(const TRUSTTab &dbt)
Definition TRUSTTab.h:121
void ref(const TRUSTVect< _TYPE_, _SIZE_ > &) override
Definition TRUSTTab.tpp:279
bool decomp_LU(_SIZE_, TRUSTArray< int, _SIZE_ > &, TRUSTTab< _T_, _SIZE_ > &)
Definition TRUSTTab.tpp:833
void ajoute_produit_tensoriel(_T_ alpha, const TRUSTTab< _T_, _SIZE_ > &, const TRUSTTab< _T_, _SIZE_ > &)
Definition TRUSTTab.tpp:760
void ajoute_produit_tensoriel(int alpha, const TRUSTTab< int, _SIZE_ > &, const TRUSTTab< int, _SIZE_ > &)=delete
std::enable_if_t< gpu_enabled_is_host_exec_space< EXEC_SPACE >, HostView< _TYPE_, _SHAPE_ > > view_rw()
Definition TRUSTTab.h:298
TRUSTTab(_SIZE_ n1, int n2, int n3)
Definition TRUSTTab.h:149
TRUSTTab(_SIZE_ n1, int n2)
Definition TRUSTTab.h:134
_TYPE_ & operator()(_SIZE_ i1, int i2, int i3, int i4)
Definition TRUSTTab.tpp:96
std::enable_if_t< gpu_enabled_is_host_exec_space< EXEC_SPACE >, HostView< _TYPE_, _SHAPE_ > > view_wo()
Definition TRUSTTab.h:283
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
const _TYPE_ & operator()(_SIZE_ i1, int i2) const
Definition TRUSTTab.tpp:67
TRUSTTab(_SIZE_ n1, int n2, int n3, int n4)
Definition TRUSTTab.h:166
_TYPE_ & operator()(_SIZE_ i1, int i2, int i3)
Definition TRUSTTab.tpp:76
void resize_dim0(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:459
void resize(_SIZE_ n1, int n2, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:480
_T_ max_du_u(const TRUSTTab< _T_, _SIZE_ > &)
Definition TRUSTTab.tpp:929
bool inverse_LU(const TRUSTArray< _T_, _SIZE_ > &, TRUSTArray< _T_, _SIZE_ > &)
Definition TRUSTTab.tpp:815
void copy(const TRUSTTab &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:622
void resize(_SIZE_ n1, int n2, int n3, int n4, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:521
void from_tid_to_int(TRUSTTab< int, int > &out) const
Definition TRUSTTab.tpp:170
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, ConstView< _TYPE_, _SHAPE_ > > view_ro() const
Definition TRUSTTab.h:261
void append_line(_TYPE_)
Definition TRUSTTab.tpp:213
void resize(const TRUSTArray< _SIZE_, int > &tailles, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:545
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_rw()
Definition TRUSTTab.h:291
void resize_tab(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) override
Definition TRUSTTab.tpp:373
const _TYPE_ & operator[](_SIZE_ i) const
Definition TRUSTTab.tpp:32
int decomp_LU(int, TRUSTArray< int, _SIZE_ > &, TRUSTTab< int, _SIZE_ > &)=delete
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
unsigned taille_memoire() const override
Definition TRUSTTab.h:33
void resoud_LU(int, TRUSTArray< int, _SIZE_ > &, const TRUSTArray< int, _SIZE_ > &, TRUSTArray< int, _SIZE_ > &)=delete
TRUSTTab & operator=(const TRUSTTab &)
Definition TRUSTTab.tpp:578
Entree & readOn(Entree &is) override
Lecture d'un vecteur sequentiel (comme un ArrOfDouble) Attention: appel invalide si le vecteur a un M...
Definition TRUSTVect.h:60
int line_size() const
Definition TRUSTVect.tpp:67
void set_line_size_(int n)
Definition TRUSTVect.tpp:78
friend class TRUSTVect
Definition TRUSTVect.h:78
virtual const MD_Vector & get_md_vector() const
Definition TRUSTVect.h:123