Skip to content

Commit c4885de

Browse files
authored
Update simd example code. NFC (#22410)
Fixes #22409
1 parent 4ecf99c commit c4885de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/source/docs/porting/simd.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ LLVM maintains a WebAssembly SIMD Intrinsics header file that is provided with E
5454
5555
int main() {
5656
#ifdef __wasm_simd128__
57-
v128 v1 = wasm_f32x4_make(1.2f, 3.4f, 5.6f, 7.8f);
58-
v128 v2 = wasm_f32x4_make(2.1f, 4.3f, 6.5f, 8.7f);
59-
v128 v3 = v1 + v2;
57+
v128_t v1 = wasm_f32x4_make(1.2f, 3.4f, 5.6f, 7.8f);
58+
v128_t v2 = wasm_f32x4_make(2.1f, 4.3f, 6.5f, 8.7f);
59+
v128_t v3 = wasm_f32x4_add(v1, v2);
6060
// Prints "v3: [3.3, 7.7, 12.1, 16.5]"
6161
printf("v3: [%.1f, %.1f, %.1f, %.1f]\n",
6262
wasm_f32x4_extract_lane(v3, 0),

0 commit comments

Comments
 (0)