1 use crate::simd
::intrinsics
;
2 use crate::simd
::{LaneCount, Simd, SimdElement, SupportedLaneCount}
;
3 use core
::convert
::FloatToInt
;
5 macro_rules
! implement
{
9 impl<const LANES
: usize> Simd
<$
type, LANES
>
11 LaneCount
<LANES
>: SupportedLaneCount
,
13 /// Rounds toward zero and converts to the same-width integer type, assuming that
14 /// the value is finite and fits in that type.
21 /// * Be representable in the return type, after truncating off its fractional part
23 /// If these requirements are infeasible or costly, consider using the safe function [cast],
24 /// which saturates on conversion.
26 /// [cast]: Simd::cast
28 pub unsafe fn to_int_unchecked
<I
>(self) -> Simd
<I
, LANES
>
33 unsafe { intrinsics::simd_cast(self) }