pub struct FunctionLibraryOperation<'c> { /* private fields */ }
Expand description
A function_library
operation. Represents shape functions and corresponding ops.
Represents a list of shape functions and the ops whose shape transfer functions they represent.
Example:
shape.function_library {
func @same_result_shape(%arg: !shape.value_shape) -> !shape.shape {
%0 = shape_of %arg : !shape.value_shape -> !shape.shape
return %0 : !shape.shape
}
} mapping {
std.atan = @same_result_shape
}
Implementations§
source§impl<'c> FunctionLibraryOperation<'c>
impl<'c> FunctionLibraryOperation<'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>
) -> FunctionLibraryOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> FunctionLibraryOperationBuilder<'c, Unset, Unset, Unset>
Creates a builder.
pub fn body(&self) -> Result<RegionRef<'c, '_>, Error>
pub fn sym_name(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_sym_name(&mut self, value: StringAttribute<'c>)
pub fn sym_visibility(&self) -> Result<StringAttribute<'c>, Error>
pub fn set_sym_visibility(&mut self, value: StringAttribute<'c>)
pub fn remove_sym_visibility(&mut self) -> Result<(), Error>
pub fn mapping(&self) -> Result<Attribute<'c>, Error>
pub fn set_mapping(&mut self, value: Attribute<'c>)
Trait Implementations§
source§impl<'c> From<FunctionLibraryOperation<'c>> for Operation<'c>
impl<'c> From<FunctionLibraryOperation<'c>> for Operation<'c>
source§fn from(operation: FunctionLibraryOperation<'c>) -> Self
fn from(operation: FunctionLibraryOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for FunctionLibraryOperation<'c>
impl<'c> !Send for FunctionLibraryOperation<'c>
impl<'c> !Sync for FunctionLibraryOperation<'c>
impl<'c> Unpin for FunctionLibraryOperation<'c>
impl<'c> UnwindSafe for FunctionLibraryOperation<'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