pub struct EmptyOperation<'c> { /* private fields */ }
Expand description
An empty
operation. Empty tensor operation.
tensor.empty
is an operation that defines a tensor of a particular shape.
The shape could be dynamic or static. The contents of the tensor are
unspecified and the only purpose of the op result is to materialize the
specified shape in IR and make it available to other transformations.
tensor.empty
is useful in transformations that expect destination style
ops. I.e., ops that implement DestinationStyleOpInterface
. Ops that are
not in destination style can be made compatible with such transformations
with a tensor.empty
destination.
Note: This op can be lowered to a bufferization.alloc_tensor
, at which
point it turns into an explicit buffer allocation.
Implementations§
source§impl<'c> EmptyOperation<'c>
impl<'c> EmptyOperation<'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>
) -> EmptyOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> EmptyOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn dynamic_sizes(&self) -> impl Iterator<Item = Value<'c, '_>>
Trait Implementations§
source§impl<'c> From<EmptyOperation<'c>> for Operation<'c>
impl<'c> From<EmptyOperation<'c>> for Operation<'c>
source§fn from(operation: EmptyOperation<'c>) -> Self
fn from(operation: EmptyOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for EmptyOperation<'c>
impl<'c> !Send for EmptyOperation<'c>
impl<'c> !Sync for EmptyOperation<'c>
impl<'c> Unpin for EmptyOperation<'c>
impl<'c> UnwindSafe for EmptyOperation<'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