Skip to content

Commit

Permalink
Add simd_relaxed_fma intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
calebzulawski authored and gitbot committed Feb 20, 2025
1 parent cd8867f commit 91d7f95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,16 @@ extern "rust-intrinsic" {
#[rustc_nounwind]
pub fn simd_fma<T>(x: T, y: T, z: T) -> T;

/// Computes `(x*y) + z` for each element, with unspecified rounding.
///
/// This may be equivalent to `simd_fma`, or it may relax to rounding each
/// operation if that's more efficient.
///
/// `T` must be a vector of floats.
#[cfg(not(bootstrap))]
#[rustc_nounwind]
pub fn simd_relaxed_fma<T>(x: T, y: T, z: T) -> T;

// Computes the sine of each element.
///
/// `T` must be a vector of floats.
Expand Down

0 comments on commit 91d7f95

Please sign in to comment.