1 | // Classe d'initialisation du module TArray (template Arrays)
|
---|
2 | #include "sopnamsp.h"
|
---|
3 | #include "machdefs.h"
|
---|
4 | #include "tarrinit.h"
|
---|
5 |
|
---|
6 | #include "fioarr.h"
|
---|
7 | #include "fiospsqmtx.h"
|
---|
8 |
|
---|
9 | /*!
|
---|
10 | \defgroup TArray TArray module
|
---|
11 | This module contains template arrays, matrices and vectors.
|
---|
12 | */
|
---|
13 |
|
---|
14 | /*!
|
---|
15 | \class SOPHYA::TArrayInitiator
|
---|
16 | \ingroup TArray
|
---|
17 | Array Matrices and Vector initiator
|
---|
18 | */
|
---|
19 |
|
---|
20 | int TArrayInitiator::FgInit = 0;
|
---|
21 |
|
---|
22 | // Module version number - 2.0 , Jul 2006
|
---|
23 | // V= 2.04 , Jan/Fev 2007: Ajout TArray::ZeroSize() , RenewObjId() et methodes de cast (arrctcast.h)
|
---|
24 | // V= 2.1 , Avr/Jul 2007: Constr.copie/extrac sous-tableaux thread-safe
|
---|
25 | // V= 2.2 , Fev/Nars 2010: Tableaux en long double
|
---|
26 | // V= 2.3 , Juillet 2010: Ajout des matrices carres Diagonal, Triangulaire, Symmetrique
|
---|
27 | #define MOD_VERS 2.3
|
---|
28 |
|
---|
29 | // Fonction d'enregistrement des handlers matrices carres speciales
|
---|
30 | static void RegisterSSQM_PPFHandlers();
|
---|
31 |
|
---|
32 | TArrayInitiator::TArrayInitiator()
|
---|
33 | : SophyaInitiator()
|
---|
34 | {
|
---|
35 | FgInit++;
|
---|
36 | if (FgInit > 1) return;
|
---|
37 |
|
---|
38 | // Enregistrement des classes PPersist du modules TArray
|
---|
39 |
|
---|
40 |
|
---|
41 | PPRegister(FIO_TArray<uint_1>);
|
---|
42 | DObjRegister(FIO_TArray<uint_1>, TArray<uint_1>);
|
---|
43 | DObjRegister(FIO_TArray<uint_1>, TMatrix<uint_1>);
|
---|
44 | DObjRegister(FIO_TArray<uint_1>, TVector<uint_1>);
|
---|
45 |
|
---|
46 | PPRegister(FIO_TArray<int_1>);
|
---|
47 | DObjRegister(FIO_TArray<int_1>, TArray<int_1>);
|
---|
48 | DObjRegister(FIO_TArray<int_1>, TMatrix<int_1>);
|
---|
49 | DObjRegister(FIO_TArray<int_1>, TVector<int_1>);
|
---|
50 |
|
---|
51 | PPRegister(FIO_TArray<uint_2>);
|
---|
52 | DObjRegister(FIO_TArray<uint_2>, TArray<uint_2>);
|
---|
53 | DObjRegister(FIO_TArray<uint_2>, TMatrix<uint_2>);
|
---|
54 | DObjRegister(FIO_TArray<uint_2>, TVector<uint_2>);
|
---|
55 |
|
---|
56 | PPRegister(FIO_TArray<int_2>);
|
---|
57 | DObjRegister(FIO_TArray<int_2>, TArray<int_2>);
|
---|
58 | DObjRegister(FIO_TArray<int_2>, TMatrix<int_2>);
|
---|
59 | DObjRegister(FIO_TArray<int_2>, TVector<int_2>);
|
---|
60 |
|
---|
61 | PPRegister(FIO_TArray<uint_4>);
|
---|
62 | DObjRegister(FIO_TArray<uint_4>, TArray<uint_4>);
|
---|
63 | DObjRegister(FIO_TArray<uint_4>, TMatrix<uint_4>);
|
---|
64 | DObjRegister(FIO_TArray<uint_4>, TVector<uint_4>);
|
---|
65 |
|
---|
66 | PPRegister(FIO_TArray<int_4>);
|
---|
67 | DObjRegister(FIO_TArray<int_4>, TArray<int_4>);
|
---|
68 | DObjRegister(FIO_TArray<int_4>, TMatrix<int_4>);
|
---|
69 | DObjRegister(FIO_TArray<int_4>, TVector<int_4>);
|
---|
70 |
|
---|
71 | PPRegister(FIO_TArray<uint_8>);
|
---|
72 | DObjRegister(FIO_TArray<uint_8>, TArray<uint_8>);
|
---|
73 | DObjRegister(FIO_TArray<uint_8>, TMatrix<uint_8>);
|
---|
74 | DObjRegister(FIO_TArray<uint_8>, TVector<uint_8>);
|
---|
75 |
|
---|
76 | PPRegister(FIO_TArray<int_8>);
|
---|
77 | DObjRegister(FIO_TArray<int_8>, TArray<int_8>);
|
---|
78 | DObjRegister(FIO_TArray<int_8>, TMatrix<int_8>);
|
---|
79 | DObjRegister(FIO_TArray<int_8>, TVector<int_8>);
|
---|
80 |
|
---|
81 | PPRegister(FIO_TArray<r_4>);
|
---|
82 | DObjRegister(FIO_TArray<r_4>, TArray<r_4>);
|
---|
83 | DObjRegister(FIO_TArray<r_4>, TMatrix<r_4>);
|
---|
84 | DObjRegister(FIO_TArray<r_4>, TVector<r_4>);
|
---|
85 |
|
---|
86 | PPRegister(FIO_TArray<r_8>);
|
---|
87 | DObjRegister(FIO_TArray<r_8>, TArray<r_8>);
|
---|
88 | DObjRegister(FIO_TArray<r_8>, TMatrix<r_8>);
|
---|
89 | DObjRegister(FIO_TArray<r_8>, TVector<r_8>);
|
---|
90 |
|
---|
91 | #ifdef SO_LDBLE128
|
---|
92 | PPRegister(FIO_TArray<r_16>);
|
---|
93 | DObjRegister(FIO_TArray<r_16>, TArray<r_16>);
|
---|
94 | DObjRegister(FIO_TArray<r_16>, TMatrix<r_16>);
|
---|
95 | DObjRegister(FIO_TArray<r_16>, TVector<r_16>);
|
---|
96 | #endif
|
---|
97 |
|
---|
98 | PPRegister(FIO_TArray< complex<r_4> >);
|
---|
99 | DObjRegister(FIO_TArray< complex<r_4> >, TArray< complex<r_4> >);
|
---|
100 | DObjRegister(FIO_TArray< complex<r_4> >, TMatrix< complex<r_4> >);
|
---|
101 | DObjRegister(FIO_TArray< complex<r_4> >, TVector< complex<r_4> >);
|
---|
102 |
|
---|
103 | PPRegister(FIO_TArray< complex<r_8> >);
|
---|
104 | DObjRegister(FIO_TArray< complex<r_8> >, TArray< complex<r_8> >);
|
---|
105 | DObjRegister(FIO_TArray< complex<r_8> >, TMatrix< complex<r_8> >);
|
---|
106 | DObjRegister(FIO_TArray< complex<r_8> >, TVector< complex<r_8> >);
|
---|
107 |
|
---|
108 | #ifdef SO_LDBLE128
|
---|
109 | PPRegister(FIO_TArray< complex<r_16> >);
|
---|
110 | DObjRegister(FIO_TArray< complex<r_16> >, TArray< complex<r_16> >);
|
---|
111 | DObjRegister(FIO_TArray< complex<r_16> >, TMatrix< complex<r_16> >);
|
---|
112 | DObjRegister(FIO_TArray< complex<r_16> >, TVector< complex<r_16> >);
|
---|
113 | #endif
|
---|
114 |
|
---|
115 | RegisterSSQM_PPFHandlers(); // Enregistrement des gestionnaires PPF des matrices carrees speciales
|
---|
116 |
|
---|
117 | SophyaInitiator::RegisterModule("TArray", MOD_VERS); // Module name and version number registration
|
---|
118 | }
|
---|
119 |
|
---|
120 | TArrayInitiator::~TArrayInitiator()
|
---|
121 | {
|
---|
122 | FgInit--;
|
---|
123 | }
|
---|
124 |
|
---|
125 | // --- Fonction d'initialisation / enregistrement des handlers PPF pour matrices carres speciales
|
---|
126 | static void RegisterSSQM_PPFHandlers()
|
---|
127 | {
|
---|
128 | // Enregistrement des gestionnaires PPF
|
---|
129 | PPRegister(FIO_SpecialSquareMatrix<uint_1>);
|
---|
130 | DObjRegister(FIO_SpecialSquareMatrix<uint_1>, DiagonalMatrix<uint_1>);
|
---|
131 | DObjRegister(FIO_SpecialSquareMatrix<uint_1>, LowerTriangularMatrix<uint_1>);
|
---|
132 | DObjRegister(FIO_SpecialSquareMatrix<uint_1>, SymmetricMatrix<uint_1>);
|
---|
133 |
|
---|
134 | PPRegister(FIO_SpecialSquareMatrix<uint_2>);
|
---|
135 | DObjRegister(FIO_SpecialSquareMatrix<uint_2>, DiagonalMatrix<uint_2>);
|
---|
136 | DObjRegister(FIO_SpecialSquareMatrix<uint_2>, LowerTriangularMatrix<uint_2>);
|
---|
137 | DObjRegister(FIO_SpecialSquareMatrix<uint_2>, SymmetricMatrix<uint_2>);
|
---|
138 |
|
---|
139 | PPRegister(FIO_SpecialSquareMatrix<uint_4>);
|
---|
140 | DObjRegister(FIO_SpecialSquareMatrix<uint_4>, DiagonalMatrix<uint_4>);
|
---|
141 | DObjRegister(FIO_SpecialSquareMatrix<uint_4>, LowerTriangularMatrix<uint_4>);
|
---|
142 | DObjRegister(FIO_SpecialSquareMatrix<uint_4>, SymmetricMatrix<uint_4>);
|
---|
143 |
|
---|
144 | PPRegister(FIO_SpecialSquareMatrix<uint_8>);
|
---|
145 | DObjRegister(FIO_SpecialSquareMatrix<uint_8>, DiagonalMatrix<uint_8>);
|
---|
146 | DObjRegister(FIO_SpecialSquareMatrix<uint_8>, LowerTriangularMatrix<uint_8>);
|
---|
147 | DObjRegister(FIO_SpecialSquareMatrix<uint_8>, SymmetricMatrix<uint_8>);
|
---|
148 |
|
---|
149 | PPRegister(FIO_SpecialSquareMatrix<int_1>);
|
---|
150 | DObjRegister(FIO_SpecialSquareMatrix<int_1>, DiagonalMatrix<int_1>);
|
---|
151 | DObjRegister(FIO_SpecialSquareMatrix<int_1>, LowerTriangularMatrix<int_1>);
|
---|
152 | DObjRegister(FIO_SpecialSquareMatrix<int_1>, SymmetricMatrix<int_1>);
|
---|
153 |
|
---|
154 | PPRegister(FIO_SpecialSquareMatrix<int_2>);
|
---|
155 | DObjRegister(FIO_SpecialSquareMatrix<int_2>, DiagonalMatrix<int_2>);
|
---|
156 | DObjRegister(FIO_SpecialSquareMatrix<int_2>, LowerTriangularMatrix<int_2>);
|
---|
157 | DObjRegister(FIO_SpecialSquareMatrix<int_2>, SymmetricMatrix<int_2>);
|
---|
158 |
|
---|
159 | PPRegister(FIO_SpecialSquareMatrix<int_4>);
|
---|
160 | DObjRegister(FIO_SpecialSquareMatrix<int_4>, DiagonalMatrix<int_4>);
|
---|
161 | DObjRegister(FIO_SpecialSquareMatrix<int_4>, LowerTriangularMatrix<int_4>);
|
---|
162 | DObjRegister(FIO_SpecialSquareMatrix<int_4>, SymmetricMatrix<int_4>);
|
---|
163 |
|
---|
164 | PPRegister(FIO_SpecialSquareMatrix<int_8>);
|
---|
165 | DObjRegister(FIO_SpecialSquareMatrix<int_8>, DiagonalMatrix<int_8>);
|
---|
166 | DObjRegister(FIO_SpecialSquareMatrix<int_8>, LowerTriangularMatrix<int_8>);
|
---|
167 | DObjRegister(FIO_SpecialSquareMatrix<int_8>, SymmetricMatrix<int_8>);
|
---|
168 |
|
---|
169 | PPRegister(FIO_SpecialSquareMatrix<r_4>);
|
---|
170 | DObjRegister(FIO_SpecialSquareMatrix<r_4>, DiagonalMatrix<r_4>);
|
---|
171 | DObjRegister(FIO_SpecialSquareMatrix<r_4>, LowerTriangularMatrix<r_4>);
|
---|
172 | DObjRegister(FIO_SpecialSquareMatrix<r_4>, SymmetricMatrix<r_4>);
|
---|
173 |
|
---|
174 | PPRegister(FIO_SpecialSquareMatrix<r_8>);
|
---|
175 | DObjRegister(FIO_SpecialSquareMatrix<r_8>, DiagonalMatrix<r_8>);
|
---|
176 | DObjRegister(FIO_SpecialSquareMatrix<r_8>, LowerTriangularMatrix<r_8>);
|
---|
177 | DObjRegister(FIO_SpecialSquareMatrix<r_8>, SymmetricMatrix<r_8>);
|
---|
178 |
|
---|
179 | PPRegister(FIO_SpecialSquareMatrix< complex<r_4> >);
|
---|
180 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_4> >, DiagonalMatrix< complex<r_4> >);
|
---|
181 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_4> >, LowerTriangularMatrix< complex<r_4> >);
|
---|
182 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_4> >, SymmetricMatrix< complex<r_4> >);
|
---|
183 |
|
---|
184 | PPRegister(FIO_SpecialSquareMatrix< complex<r_8> >);
|
---|
185 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_8> >, DiagonalMatrix< complex<r_8> >);
|
---|
186 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_8> >, LowerTriangularMatrix< complex<r_8> >);
|
---|
187 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_4> >, SymmetricMatrix< complex<r_8> >);
|
---|
188 |
|
---|
189 | #ifdef SO_LDBLE128
|
---|
190 | PPRegister(FIO_SpecialSquareMatrix<r_16>);
|
---|
191 | DObjRegister(FIO_SpecialSquareMatrix<r_16>, DiagonalMatrix<r_16>);
|
---|
192 | DObjRegister(FIO_SpecialSquareMatrix<r_16>, LowerTriangularMatrix<r_16>);
|
---|
193 | DObjRegister(FIO_SpecialSquareMatrix<r_16>, SymmetricMatrix<r_16>);
|
---|
194 |
|
---|
195 | PPRegister(FIO_SpecialSquareMatrix< complex<r_16> >);
|
---|
196 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_16> >, DiagonalMatrix< complex<r_16> >);
|
---|
197 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_16> >, LowerTriangularMatrix< complex<r_16> >);
|
---|
198 | DObjRegister(FIO_SpecialSquareMatrix< complex<r_16> >, SymmetricMatrix< complex<r_16> >);
|
---|
199 | #endif
|
---|
200 |
|
---|
201 | return;
|
---|
202 | }
|
---|
203 |
|
---|
204 |
|
---|
205 |
|
---|
206 |
|
---|
207 | // On met un objet initiator en statique, pour les loaders qui savent
|
---|
208 | // appeler le constructeur des objets statiques Reza 08/98
|
---|
209 | static TArrayInitiator tarrayinit;
|
---|
210 |
|
---|