Skip to content

Commit b370eb3

Browse files
committed
Added to_i32 and to_u32 methods to f32x8 type so that it is consistent with other types (e.g. f32x4)
1 parent cdf7e3d commit b370eb3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/v256.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,19 @@ impl i32x8 {
329329
}
330330
}
331331

332+
impl f32x8 {
333+
/// Convert each lane to a signed integer.
334+
#[inline]
335+
pub fn to_i32(self) -> i32x8 {
336+
unsafe {simd_cast(self)}
337+
}
338+
/// Convert each lane to an unsigned integer.
339+
#[inline]
340+
pub fn to_u32(self) -> u32x8 {
341+
unsafe {simd_cast(self)}
342+
}
343+
}
344+
332345
impl i16x16 {
333346
/// Convert each lane to an unsigned integer.
334347
#[inline]

0 commit comments

Comments
 (0)