Skip to content

Commit 0a177c3

Browse files
authored
Merge pull request #1089 from Idclip/fast_sweep_dilate
Invoke single call to dilateActiveValues ~10% faster
2 parents 8521bc1 + e1ec9de commit 0a177c3

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

openvdb/openvdb/tools/FastSweeping.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -783,11 +783,7 @@ struct FastSweeping<SdfGridT, ExtValueT>::DilateKernel
783783
//timer.restart("Dilating and updating mgr (serial)");
784784
#endif
785785

786-
const int delta = 5;
787-
for (int i=0, d = dilation/delta; i<d; ++i) dilateActiveValues(mgr, delta, nn, IGNORE_TILES);
788-
dilateActiveValues(mgr, dilation % delta, nn, IGNORE_TILES);
789-
//for (int i=0, n=5, d=dilation/n; i<d; ++i) dilateActiveValues(mgr, n, nn, IGNORE_TILES);
790-
//dilateVoxels(mgr, dilation, nn);
786+
dilateActiveValues(mgr, dilation, nn, IGNORE_TILES);
791787

792788
#ifdef BENCHMARK_FAST_SWEEPING
793789
timer.restart("Initializing grid and sweep mask");
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Improvements:
2+
- Minor performance improvements to dilation calls in fast sweeping algorithms

0 commit comments

Comments
 (0)