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 (inc_x == 1) {
|
||||||
|
|
||||||
if (da == 0.0) {
|
if (da == 0.0) {
|
||||||
|
if (dummy2 == 0) {
|
||||||
BLASLONG n1 = n & -16;
|
BLASLONG n1 = n & -16;
|
||||||
if (n1 > 0) {
|
if (n1 > 0) {
|
||||||
|
|
||||||
|
@ -109,7 +109,14 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
|
||||||
x[j] = 0.0;
|
x[j] = 0.0;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
while (j < n) {
|
||||||
|
if (!isnan(x[i])&& !isinf(x[i]))
|
||||||
|
x[i] = 0.0;
|
||||||
|
else
|
||||||
|
x[i] = NAN;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
BLASLONG n1 = n & -16;
|
BLASLONG n1 = n & -16;
|
||||||
|
@ -127,11 +134,9 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x,
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (da == 0.0) {
|
if (da == 0.0) {
|
||||||
|
if (dummy2 == 0) {
|
||||||
BLASLONG n1 = n & -4;
|
BLASLONG n1 = n & -4;
|
||||||
|
|
||||||
while (j < n1) {
|
while (j < n1) {
|
||||||
|
|
||||||
x[i] = 0.0;
|
x[i] = 0.0;
|
||||||
x[i + inc_x] = 0.0;
|
x[i + inc_x] = 0.0;
|
||||||
x[i + 2 * 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;
|
i += inc_x * 4;
|
||||||
j += 4;
|
j += 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (j < n) {
|
while (j < n) {
|
||||||
|
if (dummy2==0 || isfinite(x[i]))
|
||||||
x[i] = 0.0;
|
x[i] = 0.0;
|
||||||
|
else
|
||||||
|
x[i] = NAN;
|
||||||
i += inc_x;
|
i += inc_x;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue