summaryrefslogtreecommitdiffhomepage
path: root/misc/benchmarks/various/cspan_bench.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/benchmarks/various/cspan_bench.c')
-rw-r--r--misc/benchmarks/various/cspan_bench.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/misc/benchmarks/various/cspan_bench.c b/misc/benchmarks/various/cspan_bench.c
index f4b067f8..b5caca83 100644
--- a/misc/benchmarks/various/cspan_bench.c
+++ b/misc/benchmarks/various/cspan_bench.c
@@ -49,9 +49,8 @@ static void TraditionalForLoop(intptr_t n)
for (int x = lx; x < hx; ++x) {
for (int y = ly; y < hy; ++y) {
for (int z = lz; z < hz; ++z) {
- int i = nz*(ny*x + y) + z;
- double d = Vin[i];
- Vout[i] += d;
+ double d = Vin[nz*(ny*x + y) + z];
+ Vout[nz*(ny*x + y) + z] += d;
sum += d;
}
}