Add Mask::cast

This commit is contained in:
Jubilee Young 2022-03-02 20:09:01 -08:00 committed by Caleb Zulawski
parent af53b5de24
commit 98cd636d58

View File

@ -181,6 +181,13 @@ where
self.0.to_int()
}
/// Converts the mask to a mask of any other lane size.
#[inline]
#[must_use = "method returns a new mask and does not mutate the original value"]
pub fn cast<U: MaskElement>(self) -> Mask<U, LANES> {
Mask(self.0.convert())
}
/// Tests the value of the specified lane.
///
/// # Safety