File tree Expand file tree Collapse file tree 3 files changed +25
-43
lines changed Expand file tree Collapse file tree 3 files changed +25
-43
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ mod lane_count;
14
14
mod masks;
15
15
mod ops;
16
16
mod ord;
17
- mod round;
18
17
mod select;
19
18
mod vector;
20
19
mod vendor;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -217,6 +217,31 @@ where
217
217
unsafe { intrinsics:: simd_as ( self ) }
218
218
}
219
219
220
+ /// Rounds toward zero and converts to the same-width integer type, assuming that
221
+ /// the value is finite and fits in that type.
222
+ ///
223
+ /// # Safety
224
+ /// The value must:
225
+ ///
226
+ /// * Not be NaN
227
+ /// * Not be infinite
228
+ /// * Be representable in the return type, after truncating off its fractional part
229
+ ///
230
+ /// If these requirements are infeasible or costly, consider using the safe function [cast],
231
+ /// which saturates on conversion.
232
+ ///
233
+ /// [cast]: Simd::cast
234
+ #[ inline]
235
+ pub unsafe fn to_int_unchecked < I > ( self ) -> Simd < I , LANES >
236
+ where
237
+ T : core:: convert:: FloatToInt < I > ,
238
+ I : SimdElement ,
239
+ {
240
+ // Safety: `self` is a vector, and `FloatToInt` ensures the type can be casted to
241
+ // an integer.
242
+ unsafe { intrinsics:: simd_cast ( self ) }
243
+ }
244
+
220
245
/// Reads from potentially discontiguous indices in `slice` to construct a SIMD vector.
221
246
/// If an index is out-of-bounds, the lane is instead selected from the `or` vector.
222
247
///
You can’t perform that action at this time.
0 commit comments