pub struct TypeCastOperation<'c> { /* private fields */ }
Expand description
A type_cast
operation. Type_cast op converts a scalar memref to a vector memref.
Performs a conversion from a memref with scalar element to a memref with a
single vector element, copying the shape of the memref to the vector. This
is the minimal viable operation that is required to makeke
super-vectorization operational. It can be seen as a special case of the
view
operation but scoped in the super-vectorization context.
Syntax:
operation ::= `vector.type_cast` ssa-use : memref-type to memref-type
Example:
%A = memref.alloc() : memref<5x4x3xf32>
%VA = vector.type_cast %A : memref<5x4x3xf32> to memref<vector<5x4x3xf32>>
Implementations§
source§impl<'c> TypeCastOperation<'c>
impl<'c> TypeCastOperation<'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>
) -> TypeCastOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> TypeCastOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn memref(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<TypeCastOperation<'c>> for Operation<'c>
impl<'c> From<TypeCastOperation<'c>> for Operation<'c>
source§fn from(operation: TypeCastOperation<'c>) -> Self
fn from(operation: TypeCastOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for TypeCastOperation<'c>
impl<'c> !Send for TypeCastOperation<'c>
impl<'c> !Sync for TypeCastOperation<'c>
impl<'c> Unpin for TypeCastOperation<'c>
impl<'c> UnwindSafe for TypeCastOperation<'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