pub struct TensorView<T: CubePrimitive> { /* private fields */ }Implementations§
Source§impl<T: CubePrimitive> TensorView<T>
impl<T: CubePrimitive> TensorView<T>
pub fn new(buffer: &[T], shape: Sequence<u32>) -> TensorViewBuilder<T>
pub fn slice( &self, offsets: Sequence<u32>, shape: Sequence<u32>, ) -> TensorView<T>
pub fn __expand_new( scope: &Scope, buffer: &<[T] as CubeType>::ExpandType, shape: <Sequence<u32> as CubeType>::ExpandType, ) -> <TensorViewBuilder<T> as CubeType>::ExpandType
pub fn __expand_slice( scope: &Scope, this: &<Self as CubeType>::ExpandType, offsets: <Sequence<u32> as CubeType>::ExpandType, shape: <Sequence<u32> as CubeType>::ExpandType, ) -> <TensorView<T> as CubeType>::ExpandType
Source§impl<T: CubePrimitive> TensorView<T>
impl<T: CubePrimitive> TensorView<T>
pub fn permuted(&self, _permutation: Sequence<usize>) -> TensorView<T>
Trait Implementations§
Source§impl<T: Clone + CubePrimitive> Clone for TensorView<T>
impl<T: Clone + CubePrimitive> Clone for TensorView<T>
Source§fn clone(&self) -> TensorView<T>
fn clone(&self) -> TensorView<T>
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 moreSource§impl<T: CubePrimitive> CubeType for TensorView<T>
impl<T: CubePrimitive> CubeType for TensorView<T>
type ExpandType = TensorViewExpand<T>
Source§impl<T: CubePrimitive> LaunchArg for TensorView<T>
impl<T: CubePrimitive> LaunchArg for TensorView<T>
Source§type RuntimeArg<R: Runtime> = TensorViewBuilderLaunch<T, R>
type RuntimeArg<R: Runtime> = TensorViewBuilderLaunch<T, R>
The runtime argument for the kernel.
Source§type CompilationArg = TensorViewBuilderCompilationArg<T>
type CompilationArg = TensorViewBuilderCompilationArg<T>
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.Auto Trait Implementations§
impl<T> Freeze for TensorView<T>
impl<T> RefUnwindSafe for TensorView<T>where
T: RefUnwindSafe,
impl<T> Send for TensorView<T>
impl<T> Sync for TensorView<T>
impl<T> Unpin for TensorView<T>
impl<T> UnsafeUnpin for TensorView<T>
impl<T> UnwindSafe for TensorView<T>where
T: 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 more