pub struct LayoutHint {
pub operation: OperationType,
pub preferred_layout: DataLayout,
pub priority: f32,
}Expand description
Layout optimization hint for specific operations
Fields§
§operation: OperationType§preferred_layout: DataLayout§priority: f32Implementations§
Source§impl LayoutHint
impl LayoutHint
Sourcepub fn new(
operation: OperationType,
preferred_layout: DataLayout,
priority: f32,
) -> Self
pub fn new( operation: OperationType, preferred_layout: DataLayout, priority: f32, ) -> Self
Create a new layout hint
Sourcepub fn convolution_hint(layout: DataLayout) -> Self
pub fn convolution_hint(layout: DataLayout) -> Self
High priority hint for convolution operations
Sourcepub fn dense_hint(layout: DataLayout) -> Self
pub fn dense_hint(layout: DataLayout) -> Self
Medium priority hint for fully connected operations
Sourcepub fn elementwise_hint(layout: DataLayout) -> Self
pub fn elementwise_hint(layout: DataLayout) -> Self
Low priority hint for element-wise operations
Trait Implementations§
Source§impl Clone for LayoutHint
impl Clone for LayoutHint
Auto Trait Implementations§
impl Freeze for LayoutHint
impl RefUnwindSafe for LayoutHint
impl Send for LayoutHint
impl Sync for LayoutHint
impl Unpin for LayoutHint
impl UnsafeUnpin for LayoutHint
impl UnwindSafe for LayoutHint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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