std::intrinsics::simd

Function simd_neg

source
pub unsafe extern "rust-intrinsic" fn simd_neg<T>(x: T) -> T
🔬This is a nightly-only experimental API. (core_intrinsics)
Expand description

Negates a vector elementwise.

T must be a vector of integer or floating-point primitive types.

Rust panics for -<int>::Min due to overflow, but it is not UB with this intrinsic.