pub struct GetParentOperation<'c> { /* private fields */ }
Expand description
A get_parent_op
operation. Gets handles to the closest isolated-from-above parents.
The handle defined by this Transform op corresponds to the parents of the targeted payload ops (in the same order).
Requirements that parent ops must fulfill can be optionally specified. In that case for each target op, the closest parent op that fulfills all requirements, is returned.
isolated_from_above
: the parent op must be isolated from aboveop_name
: the parent op must have the specified name
If deduplicate
is set, the result handle does not contain any duplicate
ops. For example, given the list
“(childof(A), childof(B), childof(B), childof(A), childof(B))”, the
resulting list will be just “(A, B)”. Note that no other semantic ordering
is applied, e.g., “B” may itself be a parent of “A”. This may have an impact
on the further transformation applied to the handle produced here.
If any of the given Payload IR ops has no such suitable parent, the transformation fails silently.
Implementations§
source§impl<'c> GetParentOperation<'c>
impl<'c> GetParentOperation<'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>
) -> GetParentOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> GetParentOperationBuilder<'c, Unset, Unset>
Creates a builder.