Function core::core_simd::intrinsics::simd_cast
source · pub(crate) unsafe extern "platform-intrinsic" fn simd_cast<T, U>(
x: T
) -> U
🔬This is a nightly-only experimental API. (
portable_simd
#86656)Expand description
fptoui/fptosi/uitofp/sitofp
casting floats to integers is truncating, so it is safe to convert values like e.g. 1.5
but the truncated value must fit in the target type or the result is poison.
use simd_as
instead for a cast that performs a saturating conversion.