pub struct TensorStoreOperation<'c> { /* private fields */ }
Expand description
A tensor_store
operation. Tensor store operation.
Stores the contents of a tensor into a memref. The first operand is a value of tensor type, the second operand is a value of memref type. The shapes and element types of these must match, and are specified by the memref type.
Example:
%9 = dim %8, 1 : tensor<4x?xf32>
%10 = memref.alloc(%9) : memref<4x?xf32, #layout, memspace0>
memref.tensor_store %8, %10 : memref<4x?xf32, #layout, memspace0>
Implementations§
source§impl<'c> TensorStoreOperation<'c>
impl<'c> TensorStoreOperation<'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>
) -> TensorStoreOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> TensorStoreOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn tensor(&self) -> Result<Value<'c, '_>, Error>
pub fn memref(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<TensorStoreOperation<'c>> for Operation<'c>
impl<'c> From<TensorStoreOperation<'c>> for Operation<'c>
source§fn from(operation: TensorStoreOperation<'c>) -> Self
fn from(operation: TensorStoreOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for TensorStoreOperation<'c>
impl<'c> !Send for TensorStoreOperation<'c>
impl<'c> !Sync for TensorStoreOperation<'c>
impl<'c> Unpin for TensorStoreOperation<'c>
impl<'c> UnwindSafe for TensorStoreOperation<'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