pub struct VirtualLayout<C: Coordinates, S: Coordinates> { /* private fields */ }Expand description
A virtual layout, to carry a layout without the need for generic parameters everywhere.
C represents the coordinate space of the underlying layout.
Implementations§
Source§impl<C: Coordinates, S: Coordinates> VirtualLayout<C, S>
impl<C: Coordinates, S: Coordinates> VirtualLayout<C, S>
Sourcepub fn to_source_pos(&self, pos: C) -> S
pub fn to_source_pos(&self, pos: C) -> S
Virtual version of Layout::to_source_pos
Sourcepub fn to_source_pos_checked(&self, pos: C) -> (S, bool)
pub fn to_source_pos_checked(&self, pos: C) -> (S, bool)
Virtual version of Layout::to_source_pos_checked
Sourcepub fn shape(&self) -> C
pub fn shape(&self) -> C
Virtual version of Layout::shape
Sourcepub fn is_in_bounds(&self, pos: C) -> bool
pub fn is_in_bounds(&self, pos: C) -> bool
Virtual version of Layout::is_in_bounds
Sourcepub fn __expand_to_source_pos(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> <S as CubeType>::ExpandType
pub fn __expand_to_source_pos( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <S as CubeType>::ExpandType
Virtual version of Layout::to_source_pos
Sourcepub fn __expand_to_source_pos_checked(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> (<S as CubeType>::ExpandType, <bool as CubeType>::ExpandType)
pub fn __expand_to_source_pos_checked( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> (<S as CubeType>::ExpandType, <bool as CubeType>::ExpandType)
Virtual version of Layout::to_source_pos_checked
Sourcepub fn __expand_shape(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
) -> <C as CubeType>::ExpandType
pub fn __expand_shape( scope: &Scope, this: &<Self as CubeType>::ExpandType, ) -> <C as CubeType>::ExpandType
Virtual version of Layout::shape
Sourcepub fn __expand_is_in_bounds(
scope: &Scope,
this: &<Self as CubeType>::ExpandType,
pos: <C as CubeType>::ExpandType,
) -> <bool as CubeType>::ExpandType
pub fn __expand_is_in_bounds( scope: &Scope, this: &<Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
Virtual version of Layout::is_in_bounds
Source§impl<C: Coordinates, S: Coordinates> VirtualLayout<C, S>
impl<C: Coordinates, S: Coordinates> VirtualLayout<C, S>
Sourcepub fn new<L: Layout<Coordinates = C, SourceCoordinates = S>>(
_layout: L,
) -> VirtualLayout<C, S>
pub fn new<L: Layout<Coordinates = C, SourceCoordinates = S>>( _layout: L, ) -> VirtualLayout<C, S>
Create a new virtual layout from a concrete one
Sourcepub fn __expand_new<L: Layout<Coordinates = C, SourceCoordinates = S> + 'static>(
_scope: &Scope,
layout: L::ExpandType,
) -> VirtualLayoutExpand<C, S>
pub fn __expand_new<L: Layout<Coordinates = C, SourceCoordinates = S> + 'static>( _scope: &Scope, layout: L::ExpandType, ) -> VirtualLayoutExpand<C, S>
Expand function of VirtualLayout::__expand_new
Trait Implementations§
Source§impl<C: Clone + Coordinates, S: Clone + Coordinates> Clone for VirtualLayout<C, S>
impl<C: Clone + Coordinates, S: Clone + Coordinates> Clone for VirtualLayout<C, S>
Source§fn clone(&self) -> VirtualLayout<C, S>
fn clone(&self) -> VirtualLayout<C, S>
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 moreimpl<C: Coordinates, S: Coordinates> Copy for VirtualLayout<C, S>
Source§impl<C: Coordinates, S: Coordinates> CubeType for VirtualLayout<C, S>
impl<C: Coordinates, S: Coordinates> CubeType for VirtualLayout<C, S>
type ExpandType = VirtualLayoutExpand<C, S>
Source§impl<L: Layout + 'static> From<L> for VirtualLayout<L::Coordinates, L::SourceCoordinates>
impl<L: Layout + 'static> From<L> for VirtualLayout<L::Coordinates, L::SourceCoordinates>
Source§impl<C: Coordinates + 'static, S: Coordinates + 'static> LaunchArg for VirtualLayout<C, S>
impl<C: Coordinates + 'static, S: Coordinates + 'static> LaunchArg for VirtualLayout<C, S>
Source§type RuntimeArg<R: Runtime> = VirtualLayoutLaunch<C, S, R>
type RuntimeArg<R: Runtime> = VirtualLayoutLaunch<C, S, R>
The runtime argument for the kernel.
Source§type CompilationArg = VirtualLayoutCompilationArg<C, S>
type CompilationArg = VirtualLayoutCompilationArg<C, S>
Compilation argument.
fn register<R: Runtime>( arg: Self::RuntimeArg<R>, launcher: &mut KernelLauncher<R>, ) -> Self::CompilationArg
Source§fn expand(
arg: &Self::CompilationArg,
builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
fn expand( arg: &Self::CompilationArg, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register a variable during compilation that fill the
KernelBuilder.impl<C: Coordinates, S: Coordinates> Send for VirtualLayout<C, S>
impl<C: Coordinates, S: Coordinates> Sync for VirtualLayout<C, S>
Auto Trait Implementations§
impl<C, S> Freeze for VirtualLayout<C, S>
impl<C, S> RefUnwindSafe for VirtualLayout<C, S>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
C: RefUnwindSafe,
S: RefUnwindSafe,
impl<C, S> Unpin for VirtualLayout<C, S>
impl<C, S> UnsafeUnpin for VirtualLayout<C, S>
impl<C, S> UnwindSafe for VirtualLayout<C, S>where
<S as CubeType>::ExpandType: Sized,
<C as CubeType>::ExpandType: Sized,
C: UnwindSafe,
S: UnwindSafe,
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> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TuneInputs for T
impl<T> TuneInputs for T
Source§impl<T> ViewLayoutLaunchArg for T
impl<T> ViewLayoutLaunchArg for T
Source§type RuntimeArg<R: Runtime> = <T as LaunchArg>::RuntimeArg<R>
type RuntimeArg<R: Runtime> = <T as LaunchArg>::RuntimeArg<R>
The runtime argument for the kernel.
Source§type CompilationArg = <T as LaunchArg>::CompilationArg
type CompilationArg = <T as LaunchArg>::CompilationArg
Compilation argument.
fn register<R, B>( arg: <T as ViewLayoutLaunchArg>::RuntimeArg<R>, _buffer: &B, _ty: Type, launcher: &mut KernelLauncher<R>, ) -> <T as ViewLayoutLaunchArg>::CompilationArg
Source§fn expand(
arg: &<T as ViewLayoutLaunchArg>::CompilationArg,
_ty: Type,
builder: &mut KernelBuilder,
) -> <T as CubeType>::ExpandType
fn expand( arg: &<T as ViewLayoutLaunchArg>::CompilationArg, _ty: Type, builder: &mut KernelBuilder, ) -> <T as CubeType>::ExpandType
Register an input variable during compilation that fill the
KernelBuilder.Source§fn expand_output(
arg: &Self::CompilationArg,
ty: Type,
builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
fn expand_output( arg: &Self::CompilationArg, ty: Type, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register an output variable during compilation that fill the
KernelBuilder.