pub struct MultiOutputHandle {
pub source: NodeId,
pub sub_shapes: Vec<Shape>,
pub offsets: Vec<usize>,
}Expand description
Handle to a multi-output Op::CustomFn built via
Graph::custom_fn_multi. Internally the op produces a flat 1-D
concatenated output; this handle remembers each sub-output’s
offset + original shape so Self::output can materialize
component i lazily via Op::Narrow + Op::Reshape.
Fields§
§source: NodeIdNodeId of the wrapped Op::CustomFn (1-D F32, length =
Σ sub_shapes[i].num_elements).
sub_shapes: Vec<Shape>Original per-sub-output shapes (in declaration order).
offsets: Vec<usize>Per-sub-output start offsets into source (element-counted,
not byte-counted).
Implementations§
Trait Implementations§
Source§impl Clone for MultiOutputHandle
impl Clone for MultiOutputHandle
Source§fn clone(&self) -> MultiOutputHandle
fn clone(&self) -> MultiOutputHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiOutputHandle
impl RefUnwindSafe for MultiOutputHandle
impl Send for MultiOutputHandle
impl Sync for MultiOutputHandle
impl Unpin for MultiOutputHandle
impl UnsafeUnpin for MultiOutputHandle
impl UnwindSafe for MultiOutputHandle
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