diff --git a/kernel/riscv64/nrm2_vector.c b/kernel/riscv64/nrm2_vector.c index 2d07b3ee2..fc349a0b3 100644 --- a/kernel/riscv64/nrm2_vector.c +++ b/kernel/riscv64/nrm2_vector.c @@ -122,7 +122,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) unsigned int stride_x = inc_x * sizeof(FLOAT); int idx = 0; - if( n >= gvl ) // don't pay overheads if we're not doing useful work + if( n >= gvl && inc_x > 0) // don't pay overheads if we're not doing useful work { for(i=0; i