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