Skip to main content

CubeType

Trait CubeType 

Source
pub trait CubeType {
    type ExpandType: Clone + IntoMut + CubeDebug;
}
Expand description

Types used in a cube function must implement this trait

Variables whose values will be known at runtime must have ManagedVariable as associated type Variables whose values will be known at compile time must have the primitive type as associated type

Note: Cube functions should be written using CubeTypes, so that the code generated uses the associated ExpandType. This allows Cube code to not necessitate cloning, which is cumbersome in algorithmic code. The necessary cloning will automatically appear in the generated code.

Required Associated Types§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl CubeType for Ordering

Source§

impl CubeType for LinearViewLayout

Source§

impl CubeType for bool

Source§

impl CubeType for f32

Source§

impl CubeType for f64

Source§

impl CubeType for i8

Source§

impl CubeType for i16

Source§

impl CubeType for i32

Source§

impl CubeType for i64

Source§

impl CubeType for isize

Source§

impl CubeType for u8

Source§

impl CubeType for u16

Source§

impl CubeType for u32

Source§

impl CubeType for u64

Source§

impl CubeType for ()

Source§

impl CubeType for usize

Source§

impl CubeType for bf16

Source§

impl CubeType for f16

Source§

impl CubeType for ComptimeEventBus

Source§

impl CubeType for Swizzle

Source§

impl CubeType for PermutedLayout

Source§

impl CubeType for PlainLayout

Source§

impl CubeType for SimpleLayout

Source§

impl CubeType for StridedLayout

Source§

impl<C> CubeType for SliceLayout<C>
where C: Coordinates,

Source§

impl<C, S> CubeType for VirtualLayout<C, S>
where C: Coordinates, S: Coordinates,

Source§

impl<D> CubeType for FixedDimLayout<D>
where D: IntoDyn,

Source§

impl<E, C, IO> CubeType for View<E, C, IO>
where E: CubePrimitive, C: Coordinates, IO: Clone,

Source§

impl<E, K> CubeType for *const TensorMap<E, K>

Source§

impl<E, K> CubeType for *mut TensorMap<E, K>

Source§

impl<E, N, IO> CubeType for VirtualTensor<E, N, IO>
where E: Numeric, N: Size, IO: Clone,

Source§

impl<I> CubeType for FastDivmod<I>
where I: FastDivmodInt,

Source§

impl<L0, L1> CubeType for Chain<L0, L1>
where L0: Layout, L1: Layout<SourceCoordinates = <L0 as Layout>::Coordinates>,

Source§

impl<L> CubeType for IntoDynLayout<L>

Source§

impl<L> CubeType for ConcreteLayout<L>

Source§

impl<L, P, O> CubeType for IntoDyn2Layout<L, P, O>
where L: Layout<SourceCoordinates = (P, O)> + ViewLayoutLaunchArg, P: IntoDyn, O: IntoDyn,

Source§

impl<P0> CubeType for (P0,)
where P0: CubeType,

Source§

impl<P0, P1> CubeType for (P0, P1)
where P0: CubeType, P1: CubeType,

Source§

impl<P0, P1, P2> CubeType for (P0, P1, P2)
where P0: CubeType, P1: CubeType, P2: CubeType,

Source§

impl<P0, P1, P2, P3> CubeType for (P0, P1, P2, P3)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType,

Source§

impl<P0, P1, P2, P3, P4> CubeType for (P0, P1, P2, P3, P4)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5> CubeType for (P0, P1, P2, P3, P4, P5)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6> CubeType for (P0, P1, P2, P3, P4, P5, P6)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType, P9: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType, P9: CubeType, P10: CubeType,

Source§

impl<P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11> CubeType for (P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11)
where P0: CubeType, P1: CubeType, P2: CubeType, P3: CubeType, P4: CubeType, P5: CubeType, P6: CubeType, P7: CubeType, P8: CubeType, P9: CubeType, P10: CubeType, P11: CubeType,

Source§

impl<Q, NQ, S, F, NF, C> CubeType for QuantizedView<Q, NQ, S, F, NF, C>
where Q: Scalar, NQ: Size, S: Scalar, F: Numeric, NF: Size, C: Coordinates + 'static,

Source§

type ExpandType = QuantizedViewExpand<Q, NQ, S, F, NF, C>

Source§

impl<S, T> CubeType for ReinterpretSlice<S, T>

Source§

impl<S, T> CubeType for ReinterpretSliceMut<S, T>

Source§

impl<T> CubeType for &mut Vec<T>
where T: CubeType,

Source§

impl<T> CubeType for Option<T>
where T: CubeType,

Source§

impl<T> CubeType for *const Tensor<T>
where T: CubeType,

Source§

impl<T> CubeType for *mut Tensor<T>
where T: CubeType,

Source§

impl<T> CubeType for Vec<T>
where T: CubeType,

Source§

impl<T, C, S, V> CubeType for VirtualView<T, C, S, V>

Source§

impl<T, C, S, V> CubeType for VirtualViewMut<T, C, S, V>

Implementors§

Source§

impl CubeType for MatrixLayout

Source§

impl CubeType for e2m1

Source§

impl CubeType for e2m1x2

Source§

impl CubeType for e2m3

Source§

impl CubeType for e3m2

Source§

impl CubeType for e4m3

Source§

impl CubeType for e5m2

Source§

impl CubeType for flex32

Source§

impl CubeType for tf32

Source§

impl CubeType for ue8m0

Source§

impl CubeType for Barrier

Source§

impl CubeType for BarrierToken

Source§

impl CubeType for Im2col

Source§

impl CubeType for Im2colWide

Source§

impl CubeType for InputScalar

Source§

impl CubeType for Tiled

Source§

impl<A, B, CD> CubeType for MmaDefinition<A, B, CD>
where A: CubeType, B: CubeType, CD: CubeType,

Source§

impl<C> CubeType for &Array<C>
where C: CubeType,

Source§

impl<C> CubeType for Matrix<C>
where C: CubeType,

Source§

impl<C> CubeType for Array<C>
where C: CubeType,

Source§

impl<E> CubeType for SliceOrigin<E>
where E: CubePrimitive,

Source§

impl<E, IO> CubeType for &Slice<E, IO>

Source§

impl<E, IO> CubeType for &mut Slice<E, IO>

Source§

impl<E, IO> CubeType for Slice<E, IO>

Source§

impl<E, K> CubeType for TensorMap<E, K>

Source§

impl<Inner> CubeType for Atomic<Inner>
where Inner: CubePrimitive,

Source§

impl<K, V> CubeType for Registry<K, V>
where K: PartialOrd + Ord, V: CubeType,

Source§

impl<Marker> CubeType for DynamicScalar<Marker>
where Marker: 'static,

Source§

impl<P, N> CubeType for &Vector<P, N>
where P: Scalar, N: Size,

Source§

impl<P, N> CubeType for &mut Vector<P, N>
where P: Scalar, N: Size,

Source§

impl<P, N> CubeType for Vector<P, N>
where P: Scalar, N: Size,

Source§

impl<T> CubeType for &Tensor<T>
where T: CubeType,

Source§

impl<T> CubeType for &mut Tensor<T>
where T: CubeType,

Source§

impl<T> CubeType for ComptimeOption<T>
where T: CubeType,

Source§

impl<T> CubeType for ComptimeCell<T>
where T: CubeType,

Source§

impl<T> CubeType for RuntimeCell<T>
where T: CubeType,

Source§

impl<T> CubeType for Sequence<T>
where T: CubeType,

Source§

impl<T> CubeType for Shared<T>
where T: CubePrimitive,

Source§

impl<T> CubeType for SharedMemory<T>
where T: CubePrimitive,

Source§

impl<T> CubeType for Tensor<T>
where T: CubeType,