mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-21 15:57:38 +00:00
Only compute if absent/present if compute is not needed (locking opts)
This commit is contained in:
1 parent
ca961e8498
commit
eeab12ed86
18 files changed
+25
-64
No files matched your search
@@ -892,7 +892,7 @@ public class IrisInterpolation {
|
||||
int fj = j;
|
||||
for (k = 0; k < d; k++) {
|
||||
int fk = k;
|
||||
hunk.set(i, j, k, cache.compute((k * w * h) + (j * w) + i, (p, v)
|
||||
hunk.set(i, j, k, cache.computeIfAbsent((k * w * h) + (j * w) + i, (p)
|
||||
-> getNoise3D(method, fi + xo, fj + yo, fk + zo,
|
||||
radX, radY, radZ, n)));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user