diff options
| author | Caleb Zulawski <caleb.zulawski@gmail.com> | 2024-11-23 19:17:27 -0500 |
|---|---|---|
| committer | Caleb Zulawski <caleb.zulawski@gmail.com> | 2024-11-23 19:17:27 -0500 |
| commit | 402f6a3530e23b5c822bae0ba10ea1bb4bd55047 (patch) | |
| tree | 326fdcc4f8552eff2be086f13190dd7f23542a32 | |
| parent | e73e9f9af202206372d1fc0bbe215aad376c0482 (diff) | |
| download | rust-402f6a3530e23b5c822bae0ba10ea1bb4bd55047.tar.gz rust-402f6a3530e23b5c822bae0ba10ea1bb4bd55047.zip | |
Match simd_relaxed_fma documentation to fmuladd intrinsic
| -rw-r--r-- | library/core/src/intrinsics/simd.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/library/core/src/intrinsics/simd.rs b/library/core/src/intrinsics/simd.rs index 945bbe34df3..0d24b0558c5 100644 --- a/library/core/src/intrinsics/simd.rs +++ b/library/core/src/intrinsics/simd.rs @@ -612,10 +612,14 @@ 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. + /// Computes `(x*y) + z` for each element, non-deterministically executing either + /// a fused multiply-add or two operations with rounding of the intermediate result. + /// + /// The operation is fused if the code generator determines that target instruction + /// set has support for a fused operation, and that the fused operation is more efficient + /// than the equivalent, separate pair of mul and add instructions. It is unspecified + /// whether or not a fused operation is selected, and that may depend on optimization + /// level and context, for example. /// /// `T` must be a vector of floats. #[cfg(not(bootstrap))] |
