Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / external / coinmp / register.patch
blobcf4ca4d06c0147d38b168dcfadd84059c436eb5e
1 --- CoinUtils/src/CoinHelperFunctions.hpp
2 +++ CoinUtils/src/CoinHelperFunctions.hpp
3 @@ -41,7 +41,7 @@
4 handled correctly. */
6 template <class T> inline void
7 -CoinCopyN(register const T* from, const int size, register T* to)
8 +CoinCopyN(const T* from, const int size, T* to)
10 if (size == 0 || from == to)
11 return;
12 @@ -52,10 +52,10 @@
13 "CoinCopyN", "");
14 #endif
16 - register int n = (size + 7) / 8;
17 + int n = (size + 7) / 8;
18 if (to > from) {
19 - register const T* downfrom = from + size;
20 - register T* downto = to + size;
21 + const T* downfrom = from + size;
22 + T* downto = to + size;
23 // Use Duff's device to copy
24 switch (size % 8) {
25 case 0: do{ *--downto = *--downfrom;
26 @@ -99,7 +99,7 @@
27 the difference down to int. -- lh, 100823 --
29 template <class T> inline void
30 -CoinCopy(register const T* first, register const T* last, register T* to)
31 +CoinCopy(const T* first, const T* last, T* to)
33 CoinCopyN(first, static_cast<int>(last-first), to);
35 @@ -114,7 +114,7 @@
36 Note JJF - the speed claim seems to be false on IA32 so I have added
37 CoinMemcpyN which can be used for atomic data */
38 template <class T> inline void
39 -CoinDisjointCopyN(register const T* from, const int size, register T* to)
40 +CoinDisjointCopyN(const T* from, const int size, T* to)
42 #ifndef _MSC_VER
43 if (size == 0 || from == to)
44 @@ -135,7 +135,7 @@
45 throw CoinError("overlapping arrays", "CoinDisjointCopyN", "");
46 #endif
48 - for (register int n = size / 8; n > 0; --n, from += 8, to += 8) {
49 + for (int n = size / 8; n > 0; --n, from += 8, to += 8) {
50 to[0] = from[0];
51 to[1] = from[1];
52 to[2] = from[2];
53 @@ -167,8 +167,8 @@
54 are copied at a time. The source array is given by its first and "after
55 last" entry; the target array is given by its first entry. */
56 template <class T> inline void
57 -CoinDisjointCopy(register const T* first, register const T* last,
58 - register T* to)
59 +CoinDisjointCopy(const T* first, const T* last,
60 + T* to)
62 CoinDisjointCopyN(first, static_cast<int>(last - first), to);
64 @@ -256,7 +256,7 @@
65 alternative coding if USE_MEMCPY defined*/
66 #ifndef COIN_USE_RESTRICT
67 template <class T> inline void
68 -CoinMemcpyN(register const T* from, const int size, register T* to)
69 +CoinMemcpyN(const T* from, const int size, T* to)
71 #ifndef _MSC_VER
72 #ifdef USE_MEMCPY
73 @@ -296,7 +296,7 @@
74 throw CoinError("overlapping arrays", "CoinMemcpyN", "");
75 #endif
77 - for (register int n = size / 8; n > 0; --n, from += 8, to += 8) {
78 + for (int n = size / 8; n > 0; --n, from += 8, to += 8) {
79 to[0] = from[0];
80 to[1] = from[1];
81 to[2] = from[2];
82 @@ -343,8 +343,8 @@
83 are copied at a time. The source array is given by its first and "after
84 last" entry; the target array is given by its first entry. */
85 template <class T> inline void
86 -CoinMemcpy(register const T* first, register const T* last,
87 - register T* to)
88 +CoinMemcpy(const T* first, const T* last,
89 + T* to)
91 CoinMemcpyN(first, static_cast<int>(last - first), to);
93 @@ -358,7 +358,7 @@
94 Note JJF - the speed claim seems to be false on IA32 so I have added
95 CoinZero to allow for memset. */
96 template <class T> inline void
97 -CoinFillN(register T* to, const int size, register const T value)
98 +CoinFillN(T* to, const int size, const T value)
100 if (size == 0)
101 return;
102 @@ -369,7 +369,7 @@
103 "CoinFillN", "");
104 #endif
105 #if 1
106 - for (register int n = size / 8; n > 0; --n, to += 8) {
107 + for (int n = size / 8; n > 0; --n, to += 8) {
108 to[0] = value;
109 to[1] = value;
110 to[2] = value;
111 @@ -413,7 +413,7 @@
112 entries are filled at a time. The array is given by its first and "after
113 last" entry. */
114 template <class T> inline void
115 -CoinFill(register T* first, register T* last, const T value)
116 +CoinFill(T* first, T* last, const T value)
118 CoinFillN(first, last - first, value);
120 @@ -427,7 +427,7 @@
121 Note JJF - the speed claim seems to be false on IA32 so I have allowed
122 for memset as an alternative */
123 template <class T> inline void
124 -CoinZeroN(register T* to, const int size)
125 +CoinZeroN(T* to, const int size)
127 #ifdef USE_MEMCPY
128 // Use memset - seems faster on Intel with gcc
129 @@ -448,7 +448,7 @@
130 "CoinZeroN", "");
131 #endif
132 #if 1
133 - for (register int n = size / 8; n > 0; --n, to += 8) {
134 + for (int n = size / 8; n > 0; --n, to += 8) {
135 to[0] = 0;
136 to[1] = 0;
137 to[2] = 0;
138 @@ -519,7 +519,7 @@
139 entries are filled at a time. The array is given by its first and "after
140 last" entry. */
141 template <class T> inline void
142 -CoinZero(register T* first, register T* last)
143 +CoinZero(T* first, T* last)
145 CoinZeroN(first, last - first);
147 @@ -545,7 +545,7 @@
148 This function was introduced because for some reason compiler tend to
149 handle the <code>max()</code> function differently. */
150 template <class T> inline T
151 -CoinMax(register const T x1, register const T x2)
152 +CoinMax(const T x1, const T x2)
154 return (x1 > x2) ? x1 : x2;
156 @@ -556,7 +556,7 @@
157 This function was introduced because for some reason compiler tend to
158 handle the min() function differently. */
159 template <class T> inline T
160 -CoinMin(register const T x1, register const T x2)
161 +CoinMin(const T x1, const T x2)
163 return (x1 < x2) ? x1 : x2;
165 @@ -578,7 +578,7 @@
166 according to operator<. The array is given by a pointer to its first entry
167 and by its size. */
168 template <class T> inline bool
169 -CoinIsSorted(register const T* first, const int size)
170 +CoinIsSorted(const T* first, const int size)
172 if (size == 0)
173 return true;
174 @@ -590,7 +590,7 @@
175 #if 1
176 // size1 is the number of comparisons to be made
177 const int size1 = size - 1;
178 - for (register int n = size1 / 8; n > 0; --n, first += 8) {
179 + for (int n = size1 / 8; n > 0; --n, first += 8) {
180 if (first[8] < first[7]) return false;
181 if (first[7] < first[6]) return false;
182 if (first[6] < first[5]) return false;
183 @@ -627,7 +627,7 @@
184 according to operator<. The array is given by its first and "after
185 last" entry. */
186 template <class T> inline bool
187 -CoinIsSorted(register const T* first, register const T* last)
188 +CoinIsSorted(const T* first, const T* last)
190 return CoinIsSorted(first, static_cast<int>(last - first));
192 @@ -638,7 +638,7 @@
193 etc. For speed 8 entries are filled at a time. The array is given by a
194 pointer to its first entry and its size. */
195 template <class T> inline void
196 -CoinIotaN(register T* first, const int size, register T init)
197 +CoinIotaN(T* first, const int size, T init)
199 if (size == 0)
200 return;
201 @@ -648,7 +648,7 @@
202 throw CoinError("negative number of entries", "CoinIotaN", "");
203 #endif
204 #if 1
205 - for (register int n = size / 8; n > 0; --n, first += 8, init += 8) {
206 + for (int n = size / 8; n > 0; --n, first += 8, init += 8) {
207 first[0] = init;
208 first[1] = init + 1;
209 first[2] = init + 2;
210 @@ -706,7 +706,7 @@
211 integer array specified by the last two arguments (again, first and "after
212 last" entry). */
213 template <class T> inline T *
214 -CoinDeleteEntriesFromArray(register T * arrayFirst, register T * arrayLast,
215 +CoinDeleteEntriesFromArray(T * arrayFirst, T * arrayLast,
216 const int * firstDelPos, const int * lastDelPos)
218 int delNum = static_cast<int>(lastDelPos - firstDelPos);
219 --- CoinUtils/src/CoinModelUseful2.cpp
220 +++ CoinUtils/src/CoinModelUseful2.cpp
221 @@ -917,8 +917,8 @@
223 int position=0;
224 int nEof=0; // Number of time send of string
225 - register int yystate;
226 - register int yyn;
227 + int yystate;
228 + int yyn;
229 int yyresult;
230 /* Number of tokens to shift before error messages enabled. */
231 int yyerrstatus;
232 @@ -936,12 +936,12 @@
233 /* The state stack. */
234 short yyssa[YYINITDEPTH];
235 short *yyss = yyssa;
236 - register short *yyssp;
237 + short *yyssp;
239 /* The semantic value stack. */
240 YYSTYPE yyvsa[YYINITDEPTH];
241 YYSTYPE *yyvs = yyvsa;
242 - register YYSTYPE *yyvsp;
243 + YYSTYPE *yyvsp;
247 --- CoinUtils/src/CoinOslC.h
248 +++ CoinUtils/src/CoinOslC.h
249 @@ -34,30 +34,30 @@
250 extern "C"{
251 #endif
253 -int c_ekkbtrn( register const EKKfactinfo *fact,
254 +int c_ekkbtrn( const EKKfactinfo *fact,
255 double *dwork1,
256 int * mpt,int first_nonzero);
257 -int c_ekkbtrn_ipivrw( register const EKKfactinfo *fact,
258 +int c_ekkbtrn_ipivrw( const EKKfactinfo *fact,
259 double *dwork1,
260 int * mpt, int ipivrw,int * spare);
262 -int c_ekketsj( register /*const*/ EKKfactinfo *fact,
263 +int c_ekketsj( /*const*/ EKKfactinfo *fact,
264 double *dwork1,
265 int *mpt2, double dalpha, int orig_nincol,
266 int npivot, int *nuspikp,
267 const int ipivrw, int * spare);
268 -int c_ekkftrn( register const EKKfactinfo *fact,
269 +int c_ekkftrn( const EKKfactinfo *fact,
270 double *dwork1,
271 double * dpermu,int * mpt, int numberNonZero);
273 -int c_ekkftrn_ft( register EKKfactinfo *fact,
274 +int c_ekkftrn_ft( EKKfactinfo *fact,
275 double *dwork1, int *mpt, int *nincolp);
276 -void c_ekkftrn2( register EKKfactinfo *fact, double *dwork1,
277 +void c_ekkftrn2( EKKfactinfo *fact, double *dwork1,
278 double * dpermu1,int * mpt1, int *nincolp,
279 double *dwork1_ft, int *mpt_ft, int *nincolp_ft);
281 -int c_ekklfct( register EKKfactinfo *fact);
282 -int c_ekkslcf( register const EKKfactinfo *fact);
283 +int c_ekklfct( EKKfactinfo *fact);
284 +int c_ekkslcf( const EKKfactinfo *fact);
285 inline void c_ekkscpy(int n, const int *marr1,int *marr2)
286 { CoinMemcpyN(marr1,n,marr2);}
287 inline void c_ekkdcpy(int n, const double *marr1,double *marr2)
288 --- CoinUtils/src/CoinOslFactorization2.cpp
289 +++ CoinUtils/src/CoinOslFactorization2.cpp
290 @@ -20,9 +20,9 @@
291 extern int ets_count;
292 extern int ets_check;
293 #endif
294 -#define COIN_REGISTER register
295 +#define COIN_REGISTER
296 #define COIN_REGISTER2
297 -#define COIN_REGISTER3 register
298 +#define COIN_REGISTER3
299 #ifdef COIN_USE_RESTRICT
300 # define COIN_RESTRICT2 __restrict
301 #else
302 --- CoinUtils/src/CoinOslFactorization3.cpp
303 +++ CoinUtils/src/CoinOslFactorization3.cpp
304 @@ -1378,7 +1378,7 @@
307 } /* c_ekkmltf */
308 -int c_ekklfct( register EKKfactinfo *fact)
309 +int c_ekklfct( EKKfactinfo *fact)
311 const int nrow = fact->nrow;
312 int ninbas = fact->xcsadr[nrow+1]-1;
313 @@ -2607,7 +2607,7 @@
316 } /* c_ekkclcp */
317 -int c_ekkslcf( register const EKKfactinfo *fact)
318 +int c_ekkslcf( const EKKfactinfo *fact)
320 int * hrow = fact->xeradr;
321 int * hcol = fact->xecadr;
322 --- CoinUtils/src/CoinPackedVectorBase.cpp
323 +++ CoinUtils/src/CoinPackedVectorBase.cpp
324 @@ -194,8 +194,8 @@
325 double
326 CoinPackedVectorBase::oneNorm() const
328 - register double norm = 0.0;
329 - register const double* elements = getElements();
330 + double norm = 0.0;
331 + const double* elements = getElements();
332 for (int i = getNumElements() - 1; i >= 0; --i) {
333 norm += fabs(elements[i]);
335 @@ -224,8 +224,8 @@
336 double
337 CoinPackedVectorBase::infNorm() const
339 - register double norm = 0.0;
340 - register const double* elements = getElements();
341 + double norm = 0.0;
342 + const double* elements = getElements();
343 for (int i = getNumElements() - 1; i >= 0; --i) {
344 norm = CoinMax(norm, fabs(elements[i]));
346 --- CoinUtils/src/CoinSearchTree.hpp
347 +++ CoinUtils/src/CoinSearchTree.hpp
348 @@ -153,8 +153,8 @@
349 static inline const char* name() { return "CoinSearchTreeComparePreferred"; }
350 inline bool operator()(const CoinTreeSiblings* x,
351 const CoinTreeSiblings* y) const {
352 - register const CoinTreeNode* xNode = x->currentNode();
353 - register const CoinTreeNode* yNode = y->currentNode();
354 + const CoinTreeNode* xNode = x->currentNode();
355 + const CoinTreeNode* yNode = y->currentNode();
356 const BitVector128 xPref = xNode->getPreferred();
357 const BitVector128 yPref = yNode->getPreferred();
358 bool retval = true;
359 --- CoinUtils/src/CoinSimpFactorization.cpp
360 +++ CoinUtils/src/CoinSimpFactorization.cpp
361 @@ -2440,7 +2440,7 @@
362 const int row=secRowOfU_[i];
363 const int column=colOfU_[i];
364 if ( denseVector_[column]==0.0 ) continue;
365 - register const double multiplier=denseVector_[column]*invOfPivots_[row];
366 + const double multiplier=denseVector_[column]*invOfPivots_[row];
367 denseVector_[column]=0.0;
368 const int rowBeg=UrowStarts_[row];
369 const int rowEnd=rowBeg+UrowLengths_[row];