Skip to content

Commit

Permalink
Merge pull request OpenMathLib#4557 from martin-frbg/4552-2
Browse files Browse the repository at this point in the history
Fix support for a negative INC_X in the "generic" NRM2 kernels
  • Loading branch information
martin-frbg authored Mar 12, 2024
2 parents 4a6025a + 6b89e1f commit 42584b4
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kernel/arm/nrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
if ( n == 1 ) return( ABS(x[0]) );

n *= inc_x;
while(i < n)
while(abs(i) < abs(n))
{

if ( x[i] != 0.0 )
Expand Down
2 changes: 1 addition & 1 deletion kernel/arm/znrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
inc_x2 = 2 * inc_x;

n *= inc_x2;
while(i < n)
while(abs(i) < abs(n))
{

if ( x[i] != 0.0 )
Expand Down
2 changes: 1 addition & 1 deletion kernel/mips/nrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
if ( n == 1 ) return( ABS(x[0]) );

n *= inc_x;
while(i < n)
while(abs(i) < abs(n))
{

if ( x[i] != 0.0 )
Expand Down
2 changes: 1 addition & 1 deletion kernel/mips/znrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
inc_x2 = 2 * inc_x;

n *= inc_x2;
while(i < n)
while(abs(i) < abs(n))
{

if ( x[i] != 0.0 )
Expand Down
2 changes: 1 addition & 1 deletion kernel/riscv64/nrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
if ( n == 1 ) return( ABS(x[0]) );

n *= inc_x;
while(i < n)
while(abs(i) < abs(n))
{

if ( x[i] != 0.0 )
Expand Down
2 changes: 1 addition & 1 deletion kernel/riscv64/znrm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
inc_x2 = 2 * inc_x;

n *= inc_x2;
while(i < n)
while(abs(i) < abs(n))
{

if ( x[i] != 0.0 )
Expand Down

0 comments on commit 42584b4

Please sign in to comment.