Skip to content

Commit 8e4c416

Browse files
committed
add more missing simd intrinsics
1 parent a1b5879 commit 8e4c416

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

library/core/src/intrinsics/simd.rs

+32
Original file line numberDiff line numberDiff line change
@@ -483,4 +483,36 @@ extern "platform-intrinsic" {
483483
///
484484
/// `T` must be a vector of integers.
485485
pub fn simd_cttz<T>(x: T) -> T;
486+
487+
/// Round up each element to the next highest integer.
488+
///
489+
/// `T` must be a vector of floats.
490+
pub fn simd_ceil<T>(x: T) -> T;
491+
492+
/// Round down each element to the next lowest integer.
493+
///
494+
/// `T` must be a vector of floats.
495+
pub fn simd_floor<T>(x: T) -> T;
496+
497+
/// Round each element to the closest integer.
498+
/// Ties are resolving by rounding away from 0.
499+
///
500+
/// `T` must be a vector of floats.
501+
pub fn simd_round<T>(x: T) -> T;
502+
503+
/// Return the integer part of each element.
504+
/// This means that non-integer numbers are always truncated towards zero.
505+
///
506+
/// `T` must be a vector of floats.
507+
pub fn simd_trunc<T>(x: T) -> T;
508+
509+
/// Takes the square root of each element.
510+
///
511+
/// `T` must be a vector of floats.
512+
pub fn simd_fsqrt<T>(x: T) -> T;
513+
514+
/// Computes `(x*y) + y` for each element, but without any intermediate rounding.
515+
///
516+
/// `T` must be a vector of floats.
517+
pub fn simd_fma<T>(x: T, y: T, z: T) -> T;
486518
}

0 commit comments

Comments
 (0)