Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 871d588

Browse files
authored
Add 32-bit SIMD types i/u16x2 and i/u8x4. (rust-lang#145)
These types are useful for the "SIMD32" instructions available on ARMv6 (except M-class), ARMv7 (M-class with DSP), and ARMv8.
1 parent 715f9ac commit 871d588

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

crates/core_simd/src/vector/int.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ pub type isizex4 = SimdIsize<4>;
136136
/// Vector of eight `isize` values
137137
pub type isizex8 = SimdIsize<8>;
138138

139+
/// Vector of two `i16` values
140+
pub type i16x2 = SimdI16<2>;
141+
139142
/// Vector of four `i16` values
140143
pub type i16x4 = SimdI16<4>;
141144

@@ -169,6 +172,9 @@ pub type i64x4 = SimdI64<4>;
169172
/// Vector of eight `i64` values
170173
pub type i64x8 = SimdI64<8>;
171174

175+
/// Vector of four `i8` values
176+
pub type i8x4 = SimdI8<4>;
177+
172178
/// Vector of eight `i8` values
173179
pub type i8x8 = SimdI8<8>;
174180

crates/core_simd/src/vector/uint.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ pub type usizex4 = SimdUsize<4>;
105105
/// Vector of eight `usize` values
106106
pub type usizex8 = SimdUsize<8>;
107107

108+
/// Vector of two `u16` values
109+
pub type u16x2 = SimdU16<2>;
110+
108111
/// Vector of four `u16` values
109112
pub type u16x4 = SimdU16<4>;
110113

@@ -138,6 +141,9 @@ pub type u64x4 = SimdU64<4>;
138141
/// Vector of eight `u64` values
139142
pub type u64x8 = SimdU64<8>;
140143

144+
/// Vector of four `u8` values
145+
pub type u8x4 = SimdU8<4>;
146+
141147
/// Vector of eight `u8` values
142148
pub type u8x8 = SimdU8<8>;
143149

0 commit comments

Comments
 (0)