summaryrefslogtreecommitdiffhomepage
path: root/misc/benchmarks
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-08-21 08:58:44 +0200
committerTyge Lovset <[email protected]>2023-08-21 08:58:44 +0200
commitf354a2d11df91becfd7b3fb16abe54533737b1ad (patch)
tree82650e51c38ad567d6090adb6564c449ef43a48c /misc/benchmarks
parent7cf924a174a509bee2162169adc5c82d011c7116 (diff)
parent7ae6e4d155e9c4835d2dbf80f6e27873b7c7439a (diff)
downloadSTC-modified-f354a2d11df91becfd7b3fb16abe54533737b1ad.tar.gz
STC-modified-f354a2d11df91becfd7b3fb16abe54533737b1ad.zip
Merge branch 'master' of github.com:stclib/STC
Diffstat (limited to 'misc/benchmarks')
-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;
}
}