Function core::arch::wasm32::v128_load16_lane

1.54.0 · source ·
pub unsafe fn v128_load16_lane<const L: usize>(v: v128, m: *const u16) -> v128
Available on target_family="wasm" and target feature simd128 and WebAssembly only.
Expand description

Loads a 16-bit value from m and sets lane L of v to that value.

This intrinsic is provided for completeness and is equivalent to u16x8_replace_lane::<L>(v, *m) (which doesn’t 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.

This documentation is an old archive. Please see https://rust.docs.kernel.org instead.