cubek_std/tile/data/
kind.rs1use cubecl::prelude::*;
2
3use crate::tile::data::strided::StridedTile;
4
5pub trait TileKind<IO: SliceVisibility = ReadOnly>: CubeType + Send + Sync + 'static {
7 type Tile<E: Numeric, N: Size>: CubeType;
9}
10
11#[derive(CubeType)]
13pub struct Strided {}
14
15#[derive(CubeType)]
17pub struct Filled {}
18
19impl<IO: SliceVisibility> TileKind<IO> for Strided {
20 type Tile<E: Numeric, N: Size> = StridedTile<E, N, IO>;
21}
22
23impl TileKind<ReadOnly> for Filled {
24 type Tile<E: Numeric, N: Size> = E;
25}
26
27impl<Inner: TileKind<IO>, IO: SliceVisibility> TileKind<IO> for Option<Inner> {
28 type Tile<E: Numeric, N: Size> = ComptimeOption<Inner::Tile<E, N>>;
29}