make NAN handling depend on DUMMY2 argument
This commit is contained in:
parent
d11e734002
commit
ee09657cf1
|
@ -96,7 +96,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
|
|||
if (inc_x == 1) {
|
||||
|
||||
if (da == 0.0) {
|
||||
|
||||
if (dummy2 == 0) {
|
||||
BLASLONG n1 = n & -16;
|
||||
if (n1 > 0) {
|
||||
|
||||
|
@ -109,7 +109,14 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
|
|||
x[j] = 0.0;
|
||||
j++;
|
||||
}
|
||||
|
||||
} else {
|
||||
while (j < n) {
|
||||
if (!isnan(x[i])&& !isinf(x[i]))
|
||||
x[i] = 0.0;
|
||||
else
|
||||
x[i] = NAN;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
BLASLONG n1 = n & -16;
|
||||
|
@ -127,11 +134,9 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
|
|||
} else {
|
||||
|
||||
if (da == 0.0) {
|
||||
|
||||
if (dummy2 == 0) {
|
||||
BLASLONG n1 = n & -4;
|
||||
|
||||
while (j < n1) {
|
||||
|
||||
x[i] = 0.0;
|
||||
x[i + inc_x] = 0.0;
|
||||
x[i + 2 * inc_x] = 0.0;
|
||||
|
@ -139,11 +144,13 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
|
|||
|
||||
i += inc_x * 4;
|
||||
j += 4;
|
||||
|
||||
}
|
||||
}
|
||||
while (j < n) {
|
||||
|
||||
x[i] = 0.0;
|
||||
if (dummy2==0 || isfinite(x[i]))
|
||||
x[i] = 0.0;
|
||||
else
|
||||
x[i] = NAN;
|
||||
i += inc_x;
|
||||
j++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue