make NAN handling depend on dummy2 parameter

This commit is contained in:
Martin Kroeker 2024-07-17 23:50:40 +02:00 committed by GitHub
parent 73751218a4
commit 7284c533b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 3 deletions

View File

@ -43,7 +43,7 @@ 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)
{ {
@ -57,7 +57,19 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
i += inc_x ; i += inc_x ;
j++; j++;
}
} else {
while(j < n)
{
if ( da == 0.0 )
x[i]=0.0;
else
x[i] = da * x[i] ;
i += inc_x ;
j++;
}
} }
return 0; return 0;