Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions library/core/src/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,23 @@ pub const unsafe fn simd_splat<T, U>(value: U) -> T;
/// Adds two simd vectors elementwise.
///
/// `T` must be a vector of integers or floats.
/// For integers, wrapping arithmetic is used.
#[rustc_intrinsic]
#[rustc_nounwind]
pub const unsafe fn simd_add<T>(x: T, y: T) -> T;

/// Subtracts `rhs` from `lhs` elementwise.
///
/// `T` must be a vector of integers or floats.
/// For integers, wrapping arithmetic is used.
#[rustc_intrinsic]
#[rustc_nounwind]
pub const unsafe fn simd_sub<T>(lhs: T, rhs: T) -> T;

/// Multiplies two simd vectors elementwise.
///
/// `T` must be a vector of integers or floats.
/// For integers, wrapping arithmetic is used.
#[rustc_intrinsic]
#[rustc_nounwind]
pub const unsafe fn simd_mul<T>(x: T, y: T) -> T;
Expand Down Expand Up @@ -233,8 +236,7 @@ pub const unsafe fn simd_as<T, U>(x: T) -> U;
/// Negates a vector elementwise.
///
/// `T` must be a vector of integers or floats.
///
/// Rust panics for `-<int>::Min` due to overflow, but it is not UB with this intrinsic.
/// For integers, wrapping arithmetic is used.
#[rustc_intrinsic]
#[rustc_nounwind]
pub const unsafe fn simd_neg<T>(x: T) -> T;
Expand Down
Loading