@@ -165,7 +165,7 @@ pub trait Swizzle<const N: usize> {
165
165
LaneCount < M > : SupportedLaneCount ,
166
166
{
167
167
// SAFETY: all elements of this mask come from another mask
168
- unsafe { Mask :: from_int_unchecked ( Self :: swizzle ( mask. to_int ( ) ) ) }
168
+ unsafe { Mask :: from_simd_unchecked ( Self :: swizzle ( mask. to_simd ( ) ) ) }
169
169
}
170
170
171
171
/// Creates a new mask from the elements of `first` and `second`.
@@ -181,7 +181,9 @@ pub trait Swizzle<const N: usize> {
181
181
LaneCount < M > : SupportedLaneCount ,
182
182
{
183
183
// SAFETY: all elements of this mask come from another mask
184
- unsafe { Mask :: from_int_unchecked ( Self :: concat_swizzle ( first. to_int ( ) , second. to_int ( ) ) ) }
184
+ unsafe {
185
+ Mask :: from_simd_unchecked ( Self :: concat_swizzle ( first. to_simd ( ) , second. to_simd ( ) ) )
186
+ }
185
187
}
186
188
}
187
189
@@ -524,7 +526,7 @@ where
524
526
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
525
527
pub fn reverse ( self ) -> Self {
526
528
// Safety: swizzles are safe for masks
527
- unsafe { Self :: from_int_unchecked ( self . to_int ( ) . reverse ( ) ) }
529
+ unsafe { Self :: from_simd_unchecked ( self . to_simd ( ) . reverse ( ) ) }
528
530
}
529
531
530
532
/// Rotates the mask such that the first `OFFSET` elements of the slice move to the end
@@ -534,7 +536,7 @@ where
534
536
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
535
537
pub fn rotate_elements_left < const OFFSET : usize > ( self ) -> Self {
536
538
// Safety: swizzles are safe for masks
537
- unsafe { Self :: from_int_unchecked ( self . to_int ( ) . rotate_elements_left :: < OFFSET > ( ) ) }
539
+ unsafe { Self :: from_simd_unchecked ( self . to_simd ( ) . rotate_elements_left :: < OFFSET > ( ) ) }
538
540
}
539
541
540
542
/// Rotates the mask such that the first `self.len() - OFFSET` elements of the mask move to
@@ -544,7 +546,7 @@ where
544
546
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
545
547
pub fn rotate_elements_right < const OFFSET : usize > ( self ) -> Self {
546
548
// Safety: swizzles are safe for masks
547
- unsafe { Self :: from_int_unchecked ( self . to_int ( ) . rotate_elements_right :: < OFFSET > ( ) ) }
549
+ unsafe { Self :: from_simd_unchecked ( self . to_simd ( ) . rotate_elements_right :: < OFFSET > ( ) ) }
548
550
}
549
551
550
552
/// Shifts the mask elements to the left by `OFFSET`, filling in with
@@ -554,7 +556,7 @@ where
554
556
pub fn shift_elements_left < const OFFSET : usize > ( self , padding : bool ) -> Self {
555
557
// Safety: swizzles are safe for masks
556
558
unsafe {
557
- Self :: from_int_unchecked ( self . to_int ( ) . shift_elements_left :: < OFFSET > ( if padding {
559
+ Self :: from_simd_unchecked ( self . to_simd ( ) . shift_elements_left :: < OFFSET > ( if padding {
558
560
T :: TRUE
559
561
} else {
560
562
T :: FALSE
@@ -569,7 +571,7 @@ where
569
571
pub fn shift_elements_right < const OFFSET : usize > ( self , padding : bool ) -> Self {
570
572
// Safety: swizzles are safe for masks
571
573
unsafe {
572
- Self :: from_int_unchecked ( self . to_int ( ) . shift_elements_right :: < OFFSET > ( if padding {
574
+ Self :: from_simd_unchecked ( self . to_simd ( ) . shift_elements_right :: < OFFSET > ( if padding {
573
575
T :: TRUE
574
576
} else {
575
577
T :: FALSE
@@ -598,9 +600,9 @@ where
598
600
#[ inline]
599
601
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
600
602
pub fn interleave ( self , other : Self ) -> ( Self , Self ) {
601
- let ( lo, hi) = self . to_int ( ) . interleave ( other. to_int ( ) ) ;
603
+ let ( lo, hi) = self . to_simd ( ) . interleave ( other. to_simd ( ) ) ;
602
604
// Safety: swizzles are safe for masks
603
- unsafe { ( Self :: from_int_unchecked ( lo) , Self :: from_int_unchecked ( hi) ) }
605
+ unsafe { ( Self :: from_simd_unchecked ( lo) , Self :: from_simd_unchecked ( hi) ) }
604
606
}
605
607
606
608
/// Deinterleave two masks.
@@ -627,12 +629,12 @@ where
627
629
#[ inline]
628
630
#[ must_use = "method returns a new vector and does not mutate the original inputs" ]
629
631
pub fn deinterleave ( self , other : Self ) -> ( Self , Self ) {
630
- let ( even, odd) = self . to_int ( ) . deinterleave ( other. to_int ( ) ) ;
632
+ let ( even, odd) = self . to_simd ( ) . deinterleave ( other. to_simd ( ) ) ;
631
633
// Safety: swizzles are safe for masks
632
634
unsafe {
633
635
(
634
- Self :: from_int_unchecked ( even) ,
635
- Self :: from_int_unchecked ( odd) ,
636
+ Self :: from_simd_unchecked ( even) ,
637
+ Self :: from_simd_unchecked ( odd) ,
636
638
)
637
639
}
638
640
}
@@ -659,7 +661,7 @@ where
659
661
{
660
662
// Safety: swizzles are safe for masks
661
663
unsafe {
662
- Mask :: < T , M > :: from_int_unchecked ( self . to_int ( ) . resize :: < M > ( if value {
664
+ Mask :: < T , M > :: from_simd_unchecked ( self . to_simd ( ) . resize :: < M > ( if value {
663
665
T :: TRUE
664
666
} else {
665
667
T :: FALSE
@@ -684,6 +686,6 @@ where
684
686
LaneCount < LEN > : SupportedLaneCount ,
685
687
{
686
688
// Safety: swizzles are safe for masks
687
- unsafe { Mask :: < T , LEN > :: from_int_unchecked ( self . to_int ( ) . extract :: < START , LEN > ( ) ) }
689
+ unsafe { Mask :: < T , LEN > :: from_simd_unchecked ( self . to_simd ( ) . extract :: < START , LEN > ( ) ) }
688
690
}
689
691
}
0 commit comments