From 20f2ba014143f195ff5cafa9b3bb98d5c89a3a03 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Wed, 21 May 2025 23:44:17 +0200 Subject: [PATCH] Move declaration of i for pre-C99 compilers --- driver/level3/level3_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/level3/level3_thread.c b/driver/level3/level3_thread.c index 05d349d97..db3bffc10 100644 --- a/driver/level3/level3_thread.c +++ b/driver/level3/level3_thread.c @@ -852,7 +852,8 @@ int CNAME(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, IFLOAT *sa, IF /* (n / nthreads_n) + (m / nthreads_m) */ /* = (n * nthreads_m + m * nthreads_n) / (nthreads_n * nthreads_m) */ BLASLONG cost = 0, div = 0; - for (BLASLONG i = 1; i <= sqrt(nthreads_m); i++) { + BLASLONG i; + for (i = 1; i <= sqrt(nthreads_m); i++) { if (nthreads_m % i) continue; BLASLONG j = nthreads_m / i; BLASLONG cost_i = n * j + m * nthreads_n * i;