fix 'register' storage class specifier is deprecated and incompatible with C++17

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7008 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a4117309c3aff3aab63c169f7acc247daa0371e9
Former-commit-id: 31343fa1b0b243adedbd1efe1ddfdae236da4989
This commit is contained in:
iobyte 2020-04-30 04:00:54 +00:00
parent 49bde44ef8
commit 1b2cc640b6

View file

@ -180,7 +180,7 @@ real SquareNorm (real* a, real* b, int n)
{
real sum = 0;
for (int i=0; i<n; i++) {
register real d = (*a++) - (*b++);
real d = (*a++) - (*b++);
sum += d*d;
}
return sum;
@ -190,7 +190,7 @@ real EuclideanNorm (real* a, real* b, int n)
{
real sum = 0;
for (int i=0; i<n; i++) {
register real d = (*a++) - (*b++);
real d = (*a++) - (*b++);
sum += d*d;
}
return (real) sqrt(sum);
@ -200,7 +200,7 @@ real LNorm (real* a, real* b, int n, real p)
{
real sum = 0;
for (int i=0; i<n; i++) {
register real d = (*a++) - (*b++);
real d = (*a++) - (*b++);
sum += (real) pow(d,p);
}
return (real) pow((real)sum,(real)1.0/p);
@ -209,7 +209,7 @@ real LNorm (real* a, real* b, int n, real p)
real Sum (real* a, int n)
{
real sum = 0;
for (register int i=0; i<n; i++) {
for (int i=0; i<n; i++) {
sum += *a++;
}
return sum;