We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would convert some part of the code to WASM simd, i would start with the
jsartoolkitNFT/emscripten/ARToolKitNFT_js.cpp
Lines 23 to 30 in c5486f0
this could be converted to this:
#include <wasm_simd128.h> void matrixLerp(ARdouble src[3][4], ARdouble dst[3][4], float interpolationFactor) { v128_t factor = wasm_f64x2_splat(interpolationFactor); v128_t one_minus_factor = wasm_f64x2_splat(1.0 - interpolationFactor); for (int i = 0; i < 3; i++) { for (int j = 0; j < 4; j += 2) { v128_t src_vec = wasm_v128_load(&src[i][j]); v128_t dst_vec = wasm_v128_load(&dst[i][j]); v128_t result = wasm_f64x2_add( wasm_f64x2_mul(src_vec, one_minus_factor), wasm_f64x2_mul(dst_vec, factor) ); wasm_v128_store(&dst[i][j], result); } } }
The text was updated successfully, but these errors were encountered:
kalwalt
No branches or pull requests
I would convert some part of the code to WASM simd, i would start with the
jsartoolkitNFT/emscripten/ARToolKitNFT_js.cpp
Lines 23 to 30 in c5486f0
this could be converted to this:
The text was updated successfully, but these errors were encountered: