1
1
use crate :: LanesAtMost32 ;
2
2
3
3
macro_rules! implement_mask_ops {
4
- { $( $vector: ident => $mask: ident ( $inner_mask_ty : ident , $ inner_ty: ident) , ) * } => {
4
+ { $( $vector: ident => $mask: ident ( $inner_ty: ident) , ) * } => {
5
5
$(
6
6
impl <const LANES : usize > crate :: $vector<LANES >
7
7
where
@@ -12,53 +12,47 @@ macro_rules! implement_mask_ops {
12
12
#[ inline]
13
13
pub fn lanes_eq( self , other: Self ) -> crate :: $mask<LANES > {
14
14
unsafe {
15
- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_eq( self , other) )
16
- . into( )
15
+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_eq( self , other) )
17
16
}
18
17
}
19
18
20
19
/// Test if each lane is not equal to the corresponding lane in `other`.
21
20
#[ inline]
22
21
pub fn lanes_ne( self , other: Self ) -> crate :: $mask<LANES > {
23
22
unsafe {
24
- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_ne( self , other) )
25
- . into( )
23
+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_ne( self , other) )
26
24
}
27
25
}
28
26
29
27
/// Test if each lane is less than the corresponding lane in `other`.
30
28
#[ inline]
31
29
pub fn lanes_lt( self , other: Self ) -> crate :: $mask<LANES > {
32
30
unsafe {
33
- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_lt( self , other) )
34
- . into( )
31
+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_lt( self , other) )
35
32
}
36
33
}
37
34
38
35
/// Test if each lane is greater than the corresponding lane in `other`.
39
36
#[ inline]
40
37
pub fn lanes_gt( self , other: Self ) -> crate :: $mask<LANES > {
41
38
unsafe {
42
- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_gt( self , other) )
43
- . into( )
39
+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_gt( self , other) )
44
40
}
45
41
}
46
42
47
43
/// Test if each lane is less than or equal to the corresponding lane in `other`.
48
44
#[ inline]
49
45
pub fn lanes_le( self , other: Self ) -> crate :: $mask<LANES > {
50
46
unsafe {
51
- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_le( self , other) )
52
- . into( )
47
+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_le( self , other) )
53
48
}
54
49
}
55
50
56
51
/// Test if each lane is greater than or equal to the corresponding lane in `other`.
57
52
#[ inline]
58
53
pub fn lanes_ge( self , other: Self ) -> crate :: $mask<LANES > {
59
54
unsafe {
60
- crate :: $inner_mask_ty:: from_int_unchecked( crate :: intrinsics:: simd_ge( self , other) )
61
- . into( )
55
+ crate :: $mask:: from_int_unchecked( crate :: intrinsics:: simd_ge( self , other) )
62
56
}
63
57
}
64
58
}
@@ -67,18 +61,18 @@ macro_rules! implement_mask_ops {
67
61
}
68
62
69
63
implement_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 ) ,
64
+ SimdI8 => Mask8 ( SimdI8 ) ,
65
+ SimdI16 => Mask16 ( SimdI16 ) ,
66
+ SimdI32 => Mask32 ( SimdI32 ) ,
67
+ SimdI64 => Mask64 ( SimdI64 ) ,
68
+ SimdIsize => MaskSize ( SimdIsize ) ,
75
69
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 ) ,
70
+ SimdU8 => Mask8 ( SimdI8 ) ,
71
+ SimdU16 => Mask16 ( SimdI16 ) ,
72
+ SimdU32 => Mask32 ( SimdI32 ) ,
73
+ SimdU64 => Mask64 ( SimdI64 ) ,
74
+ SimdUsize => MaskSize ( SimdIsize ) ,
81
75
82
- SimdF32 => Mask32 ( SimdMask32 , SimdI32 ) ,
83
- SimdF64 => Mask64 ( SimdMask64 , SimdI64 ) ,
76
+ SimdF32 => Mask32 ( SimdI32 ) ,
77
+ SimdF64 => Mask64 ( SimdI64 ) ,
84
78
}
0 commit comments