Skip to content

Commit f918d06

Browse files
committed
fix(openjphjs): keep WASM SIMD enabled for OpenJPH 0.30.1
0.30.1 deprecated OJPH_DISABLE_INTEL_SIMD and bridges it onto the new OJPH_DISABLE_SIMD; our old 'OJPH_DISABLE_INTEL_SIMD=ON' therefore disabled ALL SIMD (OJPH_ENABLE_WASM_SIMD=OFF), shipping a scalar wasm ~2x slower on decode/ encode. Stop setting the deprecated option and force OJPH_DISABLE_SIMD=OFF so 0.30.1's Emscripten path builds the WASM SIMD kernels (-msimd128).
1 parent 40e7fd8 commit f918d06

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/openjphjs/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/openjph/CMakeLists.txt")
1515
endif()
1616

1717
if(EMSCRIPTEN)
18-
option(OJPH_DISABLE_INTEL_SIMD "Disables the use of SIMD instructions and associated files" ON)
18+
# OpenJPH 0.30.1 builds WASM SIMD by default (OJPH_DISABLE_SIMD=OFF) and emits
19+
# -msimd128 + the *_wasm.cpp kernels. Do NOT set the deprecated
20+
# OJPH_DISABLE_INTEL_SIMD: 0.30.1 bridges it onto OJPH_DISABLE_SIMD
21+
# (extern/openjph/CMakeLists.txt), so the old "=ON" — which used to mean
22+
# "skip Intel SIMD, use the WASM path" — now disables ALL SIMD and ships a
23+
# ~2x-slower scalar wasm. Keep SIMD explicitly enabled.
24+
set(OJPH_DISABLE_SIMD OFF CACHE BOOL "Enable OpenJPH WASM SIMD" FORCE)
1925
endif()
2026

2127
option(BUILD_SHARED_LIBS "" OFF)

0 commit comments

Comments
 (0)