pub trait SimdInt32: SimdInt<Scalar = i32, HorizontalAddScalar = i64> + SimdTransmuteI32 {
// Required methods
fn bitcast_f32(self) -> <Self::Engine as Simd>::Vf32;
fn cast_f32(self) -> <Self::Engine as Simd>::Vf32;
fn extend_to_i64(
self
) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64);
fn unsigned_extend_to_i64(
self
) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64);
// Provided methods
fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi64 { ... }
fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi64 { ... }
}
Expand description
Operations shared by 32 bit int types
Required Methods§
sourcefn bitcast_f32(self) -> <Self::Engine as Simd>::Vf32
fn bitcast_f32(self) -> <Self::Engine as Simd>::Vf32
Bit cast to f32. This function is only used for compilation and does not generate any instructions, thus it has zero latency.
sourcefn extend_to_i64(
self
) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
fn extend_to_i64( self ) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
Splits the vector into two halves, then extends them both to be i64. This is useful for horizontal adding.
sourcefn unsigned_extend_to_i64(
self
) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
fn unsigned_extend_to_i64( self ) -> (<Self::Engine as Simd>::Vi64, <Self::Engine as Simd>::Vi64)
Splits the vector into two halves, then extends them both to be i32. This is useful for horizontal adding. The numbers are treated as unsigned, so the sign bit isn’t moved. This is more efficient on some instruction sets.
Provided Methods§
sourcefn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi64
fn partial_horizontal_add(self) -> <Self::Engine as Simd>::Vi64
Adds (arbitrary) pairs of values in the vector, returning a i64 version of the vector. The way the pairs are chosen is implementation-defined.
sourcefn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi64
fn partial_horizontal_unsigned_add(self) -> <Self::Engine as Simd>::Vi64
Adds (arbitrary) pairs of values in the vector, returning a i64 version of the vector. When extending the numbers, they’re treated as unsigned wich performs more efficiently on some instruction sets. The way the pairs are chosen is implementation-defined.