Skip to content

Commit

Permalink
Update simd example code. NFC (#22410)
Browse files Browse the repository at this point in the history
Fixes #22409
  • Loading branch information
1ndy authored Aug 21, 2024
1 parent 4ecf99c commit c4885de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/source/docs/porting/simd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ LLVM maintains a WebAssembly SIMD Intrinsics header file that is provided with E
int main() {
#ifdef __wasm_simd128__
v128 v1 = wasm_f32x4_make(1.2f, 3.4f, 5.6f, 7.8f);
v128 v2 = wasm_f32x4_make(2.1f, 4.3f, 6.5f, 8.7f);
v128 v3 = v1 + v2;
v128_t v1 = wasm_f32x4_make(1.2f, 3.4f, 5.6f, 7.8f);
v128_t v2 = wasm_f32x4_make(2.1f, 4.3f, 6.5f, 8.7f);
v128_t v3 = wasm_f32x4_add(v1, v2);
// Prints "v3: [3.3, 7.7, 12.1, 16.5]"
printf("v3: [%.1f, %.1f, %.1f, %.1f]\n",
wasm_f32x4_extract_lane(v3, 0),
Expand Down

0 comments on commit c4885de

Please sign in to comment.