pub struct IndexingThunk(pub Thunk);Expand description
Opaque wrapper so GPU backends can store a native indexing Thunk in
Debug-derived enums without requiring Thunk: Debug.
Tuple Fields§
§0: ThunkImplementations§
Source§impl IndexingThunk
impl IndexingThunk
pub fn from_node( graph: &Graph, node: &Node, byte_off: impl FnMut(NodeId) -> usize, ) -> Self
pub fn inner(&self) -> &Thunk
Sourcepub fn force_indices_f32(self) -> Self
pub fn force_indices_f32(self) -> Self
For f32-uniform GPU arenas (CUDA / wgpu / ROCm): I64 index tensors are stored as f32 slots. Force the f32→i64 reader so ScatterNd does not reinterpret float bits as i64 (that bug drifted F5 DiT vs CPU/Metal).
Trait Implementations§
Source§impl Clone for IndexingThunk
impl Clone for IndexingThunk
Source§fn clone(&self) -> IndexingThunk
fn clone(&self) -> IndexingThunk
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 !RefUnwindSafe for IndexingThunk
impl !UnwindSafe for IndexingThunk
impl Freeze for IndexingThunk
impl Send for IndexingThunk
impl Sync for IndexingThunk
impl Unpin for IndexingThunk
impl UnsafeUnpin for IndexingThunk
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more