v128_load16_splat in core::arch::wasm32 - Rust
Description: Load a single element and splat to all lanes of a v128 vector.

Skip to main content

## v128_load16_splat

# Function v128_load16_splat

1.54.0 · Source

    pub unsafe fn v128_load16_splat(m: *const u16) -> v128

Available on WebAssembly and `target_family=wasm` and target feature `simd128` only.
Expand description

Load a single element and splat to all lanes of a v128 vector.

While this intrinsic is provided for completeness it can also be replaced with `u16x8_splat(*m)` and it should generate equivalent code (and also not require `unsafe`).

## §Unsafety

This intrinsic is unsafe because it takes a raw pointer as an argument, and the pointer must be valid to load 2 bytes from. Note that there is no alignment requirement on this pointer since this intrinsic performs a 1-aligned load.