pub struct IIteratorLayer { /* private fields */ }Expand description
IIteratorLayer
A layer to do iterations.
The iterator layer iterates over a tensor along the given axis and in the given direction. It enables each loop iteration to inspect a different slice of the tensor.
Implementations§
Source§impl IIteratorLayer
impl IIteratorLayer
Sourcepub fn setAxis(self: Pin<&mut IIteratorLayer>, axis: i32)
pub fn setAxis(self: Pin<&mut IIteratorLayer>, axis: i32)
Set axis to iterate over.
Sourcepub fn getAxis(self: &IIteratorLayer) -> i32
pub fn getAxis(self: &IIteratorLayer) -> i32
Get axis being iterated over.
Sourcepub fn setReverse(self: Pin<&mut IIteratorLayer>, reverse: bool)
pub fn setReverse(self: Pin<&mut IIteratorLayer>, reverse: bool)
Set iteration order to be reverse.
For reverse=false, the layer is equivalent to addGather(tensor, I, 0) where I is a scalar tensor containing the loop iteration number. For reverse=true, the layer is equivalent to addGather(tensor, M-1-I, 0) where M is the trip count computed from TripLimits of kind kCOUNT. The default is reverse=false.
Sourcepub fn getReverse(self: &IIteratorLayer) -> bool
pub fn getReverse(self: &IIteratorLayer) -> bool
Check if the iteration order is reverse.
True if and only if reversing input.
Trait Implementations§
Source§impl AsLayer for IIteratorLayer
impl AsLayer for IIteratorLayer
Source§impl AsLayerTyped for IIteratorLayer
impl AsLayerTyped for IIteratorLayer
Source§impl AsRef<ILoopBoundaryLayer> for IIteratorLayer
impl AsRef<ILoopBoundaryLayer> for IIteratorLayer
Source§fn as_ref(self: &IIteratorLayer) -> &ILoopBoundaryLayer
fn as_ref(self: &IIteratorLayer) -> &ILoopBoundaryLayer
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl ExternType for IIteratorLayer
impl ExternType for IIteratorLayer
Source§impl MakeCppStorage for IIteratorLayer
impl MakeCppStorage for IIteratorLayer
Source§unsafe fn allocate_uninitialized_cpp_storage() -> *mut IIteratorLayer
unsafe fn allocate_uninitialized_cpp_storage() -> *mut IIteratorLayer
Allocates heap space for this type in C++ and return a pointer
to that space, but do not initialize that space (i.e. do not
yet call a constructor). Read more
Source§unsafe fn free_uninitialized_cpp_storage(arg0: *mut IIteratorLayer)
unsafe fn free_uninitialized_cpp_storage(arg0: *mut IIteratorLayer)
Frees a C++ allocation which has not yet
had a constructor called. Read more
Auto Trait Implementations§
impl !Freeze for IIteratorLayer
impl !RefUnwindSafe for IIteratorLayer
impl !Send for IIteratorLayer
impl !Sync for IIteratorLayer
impl Unpin for IIteratorLayer
impl UnsafeUnpin for IIteratorLayer
impl UnwindSafe for IIteratorLayer
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