Skip to content

Commit 66a462c

Browse files
authored
Merge pull request hsivonen#2 from liebharc/master
Added to_i32 and to_u32 methods to f32x8 type
2 parents cdf7e3d + b370eb3 commit 66a462c

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)