Skip to content

Commit a34a0a7

Browse files
authored
Allow negative INCX (API change from version 3.10 of the reference implementation)
1 parent 54d3246 commit a34a0a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernel/riscv64/nrm2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
5757
FLOAT absxi = 0.0;
5858

5959

60-
if (n <= 0 || inc_x <= 0) return(0.0);
60+
if (n <= 0 || inc_x == 0) return(0.0);
6161
if ( n == 1 ) return( ABS(x[0]) );
6262

6363
n *= inc_x;

kernel/riscv64/znrm2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
5757
BLASLONG inc_x2;
5858
FLOAT temp;
5959

60-
if (n <= 0 || inc_x <= 0) return(0.0);
60+
if (n <= 0 || inc_x == 0) return(0.0);
6161

6262
inc_x2 = 2 * inc_x;
6363

0 commit comments

Comments
 (0)