pub struct CstrBroadcastableOperation<'c> { /* private fields */ }
Expand description
A cstr_broadcastable
operation. Determines if 2+ shapes can be successfully broadcasted.
Given input shapes or extent tensors, return a witness specifying if they are broadcastable. This broadcastable follows the same logic as what shape.broadcast documents.
“cstr” operations represent runtime assertions.
Example:
%w0 = shape.cstr_broadcastable [2,2], [3,1,2] // Passing
%w1 = shape.cstr_broadcastable [2,2], [3,2] // Failure
Implementations§
source§impl<'c> CstrBroadcastableOperation<'c>
impl<'c> CstrBroadcastableOperation<'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>
) -> CstrBroadcastableOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> CstrBroadcastableOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn shapes(&self) -> impl Iterator<Item = Value<'c, '_>>
Trait Implementations§
source§impl<'c> From<CstrBroadcastableOperation<'c>> for Operation<'c>
impl<'c> From<CstrBroadcastableOperation<'c>> for Operation<'c>
source§fn from(operation: CstrBroadcastableOperation<'c>) -> Self
fn from(operation: CstrBroadcastableOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CstrBroadcastableOperation<'c>
impl<'c> !Send for CstrBroadcastableOperation<'c>
impl<'c> !Sync for CstrBroadcastableOperation<'c>
impl<'c> Unpin for CstrBroadcastableOperation<'c>
impl<'c> UnwindSafe for CstrBroadcastableOperation<'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