make NAN handling depend on dummy2 parameter

This commit is contained in:
Martin Kroeker 2024-07-17 23:41:26 +02:00 committed by GitHub
parent b9bfc8ce09
commit 73751218a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 2 deletions

View File

@ -43,9 +43,22 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
if ( (n <= 0) || (inc_x <= 0)) if ( (n <= 0) || (inc_x <= 0))
return(0); return(0);
if (dummy2 == 0)
while(j < n)
{
while(j < n) if ( da == 0.0 )
{ x[i]=0.0;
else
x[i] = da * x[i] ;
i += inc_x ;
j++;
}
} else {
while(j < n)
{
if ( da == 0.0 ) if ( da == 0.0 )
if (!isnan(x[i]) && !isinf(x[i])) { if (!isnan(x[i]) && !isinf(x[i])) {
@ -59,6 +72,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
i += inc_x ; i += inc_x ;
j++; j++;
}
} }
return 0; return 0;