comparison third_party/emsdk/bazel/hello-world/hello-world-simd.cc @ 186:8cf4ec5e2191 hg-web

Fixed merge conflict.
author MrJuneJune <me@mrjunejune.com>
date Fri, 23 Jan 2026 22:38:59 -0800
parents 8d17f6e6e290
children
comparison
equal deleted inserted replaced
176:fed99fc04e12 186:8cf4ec5e2191
1 #include <wasm_simd128.h>
2
3 void multiply_arrays(int* out, int* in_a, int* in_b, int size) {
4 for (int i = 0; i < size; i += 4) {
5 v128_t a = wasm_v128_load(&in_a[i]);
6 v128_t b = wasm_v128_load(&in_b[i]);
7 v128_t prod = wasm_i32x4_mul(a, b);
8 wasm_v128_store(&out[i], prod);
9 }
10 }