From 9baa7579056a156cdda55f5f1c957eee0b6da8eb Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 13 Mar 2024 11:40:14 +0100 Subject: [PATCH] Update nrm2_vector.c --- kernel/riscv64/nrm2_vector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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