Skip to content

Commit bf82140

Browse files
authored
Update sort for small splat count (#420)
* Update splat sort for small splat count
1 parent c3cd322 commit bf82140

File tree

7 files changed

+5
-1
lines changed

7 files changed

+5
-1
lines changed

src/worker/compile_wasm_no_simd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
em++ -std=c++11 sorter_no_simd.cpp -Os -s WASM=1 -s SIDE_MODULE=2 -o sorter_no_simd.wasm -s IMPORTED_MEMORY=1 -s SHARED_MEMORY=1
1+
em++ -std=c++11 sorter_no_simd.cpp -Os -s WASM=1 -s SIDE_MODULE=2 -o sorter_no_simd.wasm -s IMPORTED_MEMORY=1 -s USE_PTHREADS=1

src/worker/sorter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ EXTERN EMSCRIPTEN_KEEPALIVE void sortIndexes(unsigned int* indexes, void* center
2424
int maxDistance = -2147483640;
2525
int minDistance = 2147483640;
2626

27+
if (distanceMapRange > sortCount) distanceMapRange = sortCount;
28+
2729
float fMVPTRow3[4];
2830
unsigned int sortStart = renderCount - sortCount;
2931
if (useIntegerSort) {

src/worker/sorter.wasm

16 Bytes
Binary file not shown.

src/worker/sorter_no_simd.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ EXTERN EMSCRIPTEN_KEEPALIVE void sortIndexes(unsigned int* indexes, void* center
2323
int maxDistance = -2147483640;
2424
int minDistance = 2147483640;
2525

26+
if (distanceMapRange > sortCount) distanceMapRange = sortCount;
27+
2628
float fMVPTRow3[4];
2729
int iMVPTRow3[4];
2830
unsigned int sortStart = renderCount - sortCount;

src/worker/sorter_no_simd.wasm

93 Bytes
Binary file not shown.
45 Bytes
Binary file not shown.

src/worker/sorter_non_shared.wasm

54 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)