pub struct CreateMaskOperation<'c> { /* private fields */ }
Expand description
A create_mask
operation. Creates a vector mask.
Creates and returns a vector mask where elements of the result vector are set to ‘0’ or ‘1’, based on whether the element indices are contained within a hyper-rectangular region specified by the operands. Specifically, each operand specifies a range [0, operand-value) for a unique dimension in the vector result. The conjunction of the operand ranges define a hyper-rectangular region within which elements values are set to 1 (otherwise element values are set to 0). If operand-value is negative, it is treated as if it were zero, and if it is greater than the corresponding dimension size, it is treated as if it were equal to the dimension size.
Example:
// create a vector mask of size 4x3xi1 where elements in range
// 0 <= row <= 2 and 0 <= col <= 1 are set to 1 (others to 0).
%1 = vector.create_mask %c3, %c2 : vector<4x3xi1>
print %1
columns
0 1 2
|------------
0 | 1 1 0
rows 1 | 1 1 0
2 | 1 1 0
3 | 0 0 0
Implementations§
source§impl<'c> CreateMaskOperation<'c>
impl<'c> CreateMaskOperation<'c>
Trait Implementations§
source§impl<'c> From<CreateMaskOperation<'c>> for Operation<'c>
impl<'c> From<CreateMaskOperation<'c>> for Operation<'c>
source§fn from(operation: CreateMaskOperation<'c>) -> Self
fn from(operation: CreateMaskOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CreateMaskOperation<'c>
impl<'c> !Send for CreateMaskOperation<'c>
impl<'c> !Sync for CreateMaskOperation<'c>
impl<'c> Unpin for CreateMaskOperation<'c>
impl<'c> UnwindSafe for CreateMaskOperation<'c>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more