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
pub fn __expand_to_source_pos( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <S as CubeType>::ExpandType
pub fn __expand_to_source_pos_checked( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <(S, bool) as CubeType>::ExpandType
pub fn __expand_shape( scope: &mut Scope, this: <Self as CubeType>::ExpandType, ) -> <C as CubeType>::ExpandType
pub fn __expand_is_in_bounds( scope: &mut Scope, this: <Self as CubeType>::ExpandType, pos: <C as CubeType>::ExpandType, ) -> <bool as CubeType>::ExpandType
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: &mut Scope,
layout: L::ExpandType,
) -> VirtualLayoutExpand<C, S>
pub fn __expand_new<L: Layout<Coordinates = C, SourceCoordinates = S> + 'static>( _scope: &mut 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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 an input variable during compilation that fill the
KernelBuilder.Source§fn expand_output(
arg: &Self::CompilationArg,
builder: &mut KernelBuilder,
) -> <Self as CubeType>::ExpandType
fn expand_output( arg: &Self::CompilationArg, builder: &mut KernelBuilder, ) -> <Self as CubeType>::ExpandType
Register an output variable during compilation that fill the
KernelBuilder.impl<C: Coordinates, S: Coordinates> Copy for VirtualLayout<C, S>
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
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
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
Source§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ViewLayoutLaunchArg for Twhere
T: LaunchArg,
impl<T> ViewLayoutLaunchArg for Twhere
T: LaunchArg,
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: &<T as ViewLayoutLaunchArg>::CompilationArg,
_ty: Type,
builder: &mut KernelBuilder,
) -> <T as CubeType>::ExpandType
fn expand_output( arg: &<T as ViewLayoutLaunchArg>::CompilationArg, _ty: Type, builder: &mut KernelBuilder, ) -> <T as CubeType>::ExpandType
Register an output variable during compilation that fill the
KernelBuilder.