W3cubDocs

/Rust

Function simd_insert

pub const unsafe fn simd_insert<T, U>(x: T, idx: u32, val: U) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)

Inserts an element into a vector, returning the updated vector.

T must be a vector with element type U, and idx must be const.

Safety

idx must be in-bounds of the vector.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/intrinsics/simd/fn.simd_insert.html