@@ -165,7 +165,7 @@ pub trait Swizzle<const N: usize> {
165165 LaneCount < M > : SupportedLaneCount ,
166166 {
167167 // 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 ( ) ) ) }
169169 }
170170
171171 /// Creates a new mask from the elements of `first` and `second`.
@@ -181,7 +181,9 @@ pub trait Swizzle<const N: usize> {
181181 LaneCount < M > : SupportedLaneCount ,
182182 {
183183 // 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+ }
185187 }
186188}
187189
@@ -524,7 +526,7 @@ where
524526 #[ must_use = "method returns a new vector and does not mutate the original inputs" ]
525527 pub fn reverse ( self ) -> Self {
526528 // 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 ( ) ) }
528530 }
529531
530532 /// Rotates the mask such that the first `OFFSET` elements of the slice move to the end
@@ -534,7 +536,7 @@ where
534536 #[ must_use = "method returns a new vector and does not mutate the original inputs" ]
535537 pub fn rotate_elements_left < const OFFSET : usize > ( self ) -> Self {
536538 // 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 > ( ) ) }
538540 }
539541
540542 /// Rotates the mask such that the first `self.len() - OFFSET` elements of the mask move to
@@ -544,7 +546,7 @@ where
544546 #[ must_use = "method returns a new vector and does not mutate the original inputs" ]
545547 pub fn rotate_elements_right < const OFFSET : usize > ( self ) -> Self {
546548 // 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 > ( ) ) }
548550 }
549551
550552 /// Shifts the mask elements to the left by `OFFSET`, filling in with
@@ -554,7 +556,7 @@ where
554556 pub fn shift_elements_left < const OFFSET : usize > ( self , padding : bool ) -> Self {
555557 // Safety: swizzles are safe for masks
556558 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 {
558560 T :: TRUE
559561 } else {
560562 T :: FALSE
@@ -569,7 +571,7 @@ where
569571 pub fn shift_elements_right < const OFFSET : usize > ( self , padding : bool ) -> Self {
570572 // Safety: swizzles are safe for masks
571573 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 {
573575 T :: TRUE
574576 } else {
575577 T :: FALSE
@@ -598,9 +600,9 @@ where
598600 #[ inline]
599601 #[ must_use = "method returns a new vector and does not mutate the original inputs" ]
600602 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 ( ) ) ;
602604 // 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) ) }
604606 }
605607
606608 /// Deinterleave two masks.
@@ -627,12 +629,12 @@ where
627629 #[ inline]
628630 #[ must_use = "method returns a new vector and does not mutate the original inputs" ]
629631 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 ( ) ) ;
631633 // Safety: swizzles are safe for masks
632634 unsafe {
633635 (
634- Self :: from_int_unchecked ( even) ,
635- Self :: from_int_unchecked ( odd) ,
636+ Self :: from_simd_unchecked ( even) ,
637+ Self :: from_simd_unchecked ( odd) ,
636638 )
637639 }
638640 }
@@ -659,7 +661,7 @@ where
659661 {
660662 // Safety: swizzles are safe for masks
661663 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 {
663665 T :: TRUE
664666 } else {
665667 T :: FALSE
@@ -684,6 +686,6 @@ where
684686 LaneCount < LEN > : SupportedLaneCount ,
685687 {
686688 // 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 > ( ) ) }
688690 }
689691}
0 commit comments