11use crate :: LanesAtMost32 ;
22
33macro_rules! implement_mask_ops {
4- { $( $vector: ident => $mask: ident ( $inner_mask_ty : ident , $ inner_ty: ident) , ) * } => {
4+ { $( $vector: ident => $mask: ident ( $inner_ty: ident) , ) * } => {
55 $(
66 impl <const LANES : usize > crate :: $vector<LANES >
77 where
88 crate :: $vector<LANES >: LanesAtMost32 ,
99 crate :: $inner_ty<LANES >: LanesAtMost32 ,
10+ crate :: $mask<LANES >: crate :: Mask ,
1011 {
1112 /// Test if each lane is equal to the corresponding lane in `other`.
1213 #[ inline]
1314 pub fn lanes_eq( self , other: Self ) -> crate :: $mask<LANES > {
1415 unsafe {
15- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_eq( self , other) )
16- . into( )
16+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_eq( self , other) )
1717 }
1818 }
1919
2020 /// Test if each lane is not equal to the corresponding lane in `other`.
2121 #[ inline]
2222 pub fn lanes_ne( self , other: Self ) -> crate :: $mask<LANES > {
2323 unsafe {
24- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_ne( self , other) )
25- . into( )
24+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_ne( self , other) )
2625 }
2726 }
2827
2928 /// Test if each lane is less than the corresponding lane in `other`.
3029 #[ inline]
3130 pub fn lanes_lt( self , other: Self ) -> crate :: $mask<LANES > {
3231 unsafe {
33- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_lt( self , other) )
34- . into( )
32+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_lt( self , other) )
3533 }
3634 }
3735
3836 /// Test if each lane is greater than the corresponding lane in `other`.
3937 #[ inline]
4038 pub fn lanes_gt( self , other: Self ) -> crate :: $mask<LANES > {
4139 unsafe {
42- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_gt( self , other) )
43- . into( )
40+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_gt( self , other) )
4441 }
4542 }
4643
4744 /// Test if each lane is less than or equal to the corresponding lane in `other`.
4845 #[ inline]
4946 pub fn lanes_le( self , other: Self ) -> crate :: $mask<LANES > {
5047 unsafe {
51- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_le( self , other) )
52- . into( )
48+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_le( self , other) )
5349 }
5450 }
5551
5652 /// Test if each lane is greater than or equal to the corresponding lane in `other`.
5753 #[ inline]
5854 pub fn lanes_ge( self , other: Self ) -> crate :: $mask<LANES > {
5955 unsafe {
60- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_ge( self , other) )
61- . into( )
56+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_ge( self , other) )
6257 }
6358 }
6459 }
@@ -67,18 +62,18 @@ macro_rules! implement_mask_ops {
6762}
6863
6964implement_mask_ops ! {
70- SimdI8 => Mask8 ( SimdMask8 , SimdI8 ) ,
71- SimdI16 => Mask16 ( SimdMask16 , SimdI16 ) ,
72- SimdI32 => Mask32 ( SimdMask32 , SimdI32 ) ,
73- SimdI64 => Mask64 ( SimdMask64 , SimdI64 ) ,
74- SimdIsize => MaskSize ( SimdMaskSize , SimdIsize ) ,
65+ SimdI8 => Mask8 ( SimdI8 ) ,
66+ SimdI16 => Mask16 ( SimdI16 ) ,
67+ SimdI32 => Mask32 ( SimdI32 ) ,
68+ SimdI64 => Mask64 ( SimdI64 ) ,
69+ SimdIsize => MaskSize ( SimdIsize ) ,
7570
76- SimdU8 => Mask8 ( SimdMask8 , SimdI8 ) ,
77- SimdU16 => Mask16 ( SimdMask16 , SimdI16 ) ,
78- SimdU32 => Mask32 ( SimdMask32 , SimdI32 ) ,
79- SimdU64 => Mask64 ( SimdMask64 , SimdI64 ) ,
80- SimdUsize => MaskSize ( SimdMaskSize , SimdIsize ) ,
71+ SimdU8 => Mask8 ( SimdI8 ) ,
72+ SimdU16 => Mask16 ( SimdI16 ) ,
73+ SimdU32 => Mask32 ( SimdI32 ) ,
74+ SimdU64 => Mask64 ( SimdI64 ) ,
75+ SimdUsize => MaskSize ( SimdIsize ) ,
8176
82- SimdF32 => Mask32 ( SimdMask32 , SimdI32 ) ,
83- SimdF64 => Mask64 ( SimdMask64 , SimdI64 ) ,
77+ SimdF32 => Mask32 ( SimdI32 ) ,
78+ SimdF64 => Mask64 ( SimdI64 ) ,
8479}
0 commit comments