pub struct ConstShapeOperation<'c> { /* private fields */ }
Expand description
A const_shape
operation. Creates a constant shape or extent tensor.
Creates a constant shape or extent tensor. The individual extents are given
as the shape
attribute. The number of these values equals the shape’s
rank.
%0 = shape.const_shape [] : !shape.shape
%1 = shape.const_shape [1, 2, 3] : !shape.shape
%2 = shape.const_shape [4, 5, 6] : tensor<3xindex>
Implementations§
source§impl<'c> ConstShapeOperation<'c>
impl<'c> ConstShapeOperation<'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>
) -> ConstShapeOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ConstShapeOperationBuilder<'c, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn shape(&self) -> Result<Attribute<'c>, Error>
pub fn set_shape(&mut self, value: Attribute<'c>)
Trait Implementations§
source§impl<'c> From<ConstShapeOperation<'c>> for Operation<'c>
impl<'c> From<ConstShapeOperation<'c>> for Operation<'c>
source§fn from(operation: ConstShapeOperation<'c>) -> Self
fn from(operation: ConstShapeOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ConstShapeOperation<'c>
impl<'c> !Send for ConstShapeOperation<'c>
impl<'c> !Sync for ConstShapeOperation<'c>
impl<'c> Unpin for ConstShapeOperation<'c>
impl<'c> UnwindSafe for ConstShapeOperation<'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