pub struct InsertOperation<'c> { /* private fields */ }Expand description
An insert operation. Insert operation.
Inserts an (n - k)-D sub-vector (value-to-store) into an n-D destination vector at a specified k-D position. When n = 0, value-to-store degenerates to a scalar element inserted into the n-D destination vector.
Static and dynamic indices must be greater or equal to zero and less than
the size of the corresponding dimension. The result is undefined if any
index is out-of-bounds. The value -1 represents a poison index, which
specifies that the resulting vector is poison.
Example:
%2 = vector.insert %0, %1[3] : vector<8x16xf32> into vector<4x8x16xf32>
%5 = vector.insert %3, %4[2, 1, 3] : f32 into vector<4x8x16xf32>
%11 = vector.insert %9, %10[%a, %b, %c] : f32 into vector<4x8x16xf32>
%12 = vector.insert %4, %10[2, %b] : vector<16xf32> into vector<4x8x16xf32>
%13 = vector.insert %20, %1[-1, %c] : f32 into vector<4x16xf32>Implementations§
Source§impl<'c> InsertOperation<'c>
impl<'c> InsertOperation<'c>
Sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
Sourcepub fn builder(
context: &'c Context,
location: Location<'c>,
) -> InsertOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c>, ) -> InsertOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn value_to_store(&self) -> Result<Value<'c, '_>, Error>
pub fn dest(&self) -> Result<Value<'c, '_>, Error>
pub fn dynamic_position(&self) -> impl Iterator<Item = Value<'c, '_>>
pub fn static_position(&self) -> Result<Attribute<'c>, Error>
pub fn set_static_position(&mut self, value: Attribute<'c>)
Trait Implementations§
Source§impl<'c> Clone for InsertOperation<'c>
impl<'c> Clone for InsertOperation<'c>
Source§fn clone(&self) -> InsertOperation<'c>
fn clone(&self) -> InsertOperation<'c>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'c> Debug for InsertOperation<'c>
impl<'c> Debug for InsertOperation<'c>
Source§impl<'b> From<InsertOperation<'b>> for VectorDialectOperation<'b>
impl<'b> From<InsertOperation<'b>> for VectorDialectOperation<'b>
Source§fn from(op: InsertOperation<'b>) -> Self
fn from(op: InsertOperation<'b>) -> Self
Converts to this type from the input type.
Source§impl<'c> From<InsertOperation<'c>> for Operation<'c>
impl<'c> From<InsertOperation<'c>> for Operation<'c>
Source§fn from(operation: InsertOperation<'c>) -> Self
fn from(operation: InsertOperation<'c>) -> Self
Converts to this type from the input type.
Source§impl<'c> PartialEq for InsertOperation<'c>
impl<'c> PartialEq for InsertOperation<'c>
Source§impl<'c> TryFrom<Operation<'c>> for InsertOperation<'c>
impl<'c> TryFrom<Operation<'c>> for InsertOperation<'c>
impl<'c> Eq for InsertOperation<'c>
impl<'c> StructuralPartialEq for InsertOperation<'c>
Auto Trait Implementations§
impl<'c> Freeze for InsertOperation<'c>
impl<'c> RefUnwindSafe for InsertOperation<'c>
impl<'c> !Send for InsertOperation<'c>
impl<'c> !Sync for InsertOperation<'c>
impl<'c> Unpin for InsertOperation<'c>
impl<'c> UnwindSafe for InsertOperation<'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