Skip to content

Commit f5618a5

Browse files
committed
make simd_reduce_{mul,add}_unordered use only the 'reassoc' flag, not all fast-math flags
1 parent afaa36e commit f5618a5

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

core/src/intrinsics/simd.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -335,16 +335,12 @@ extern "platform-intrinsic" {
335335
/// Starting with the value `y`, add the elements of `x` and accumulate.
336336
pub fn simd_reduce_add_ordered<T, U>(x: T, y: U) -> U;
337337

338-
/// Add elements within a vector in arbitrary order, and without regard
339-
/// for signed zeros.
338+
/// Add elements within a vector in arbitrary order. May also be re-associated with
339+
/// unordered additions on the inputs/outputs.
340340
///
341341
/// `T` must be a vector of integer or floating-point primitive types.
342342
///
343343
/// `U` must be the element type of `T`.
344-
///
345-
/// # Safety
346-
///
347-
/// All input elements must be finite (i.e., not NAN and not +/- INF).
348344
pub fn simd_reduce_add_unordered<T, U>(x: T) -> U;
349345

350346
/// Multiply elements within a vector from left to right.
@@ -356,16 +352,12 @@ extern "platform-intrinsic" {
356352
/// Starting with the value `y`, multiply the elements of `x` and accumulate.
357353
pub fn simd_reduce_mul_ordered<T, U>(x: T, y: U) -> U;
358354

359-
/// Multiply elements within a vector in arbitrary order, and without regard
360-
/// for signed zeros.
355+
/// Add elements within a vector in arbitrary order. May also be re-associated with
356+
/// unordered additions on the inputs/outputs.
361357
///
362358
/// `T` must be a vector of integer or floating-point primitive types.
363359
///
364360
/// `U` must be the element type of `T`.
365-
///
366-
/// # Safety
367-
///
368-
/// All input elements must be finite (i.e., not NAN and not +/- INF).
369361
pub fn simd_reduce_mul_unordered<T, U>(x: T) -> U;
370362

371363
/// Check if all mask values are true.

0 commit comments

Comments
 (0)