pub trait MatmulArgs:
Send
+ Sync
+ 'static
+ Clone {
type Input<Lhs: Numeric, Rhs: Numeric, EO: Numeric>: LaunchArg + CubeType;
type Output<EO: Numeric>: LaunchArg + CubeType;
type State<Lhs: Numeric, Rhs: Numeric, EO: Numeric>: CubeType;
// Required methods
fn init_state<Lhs: Numeric, Rhs: Numeric, EO: Numeric, G: GlobalConfig>(
input: &Self::Input<Lhs, Rhs, EO>,
output: &mut Self::Output<EO>,
config: G,
) -> Self::State<Lhs, Rhs, EO>;
fn __expand_init_state<Lhs: Numeric, Rhs: Numeric, EO: Numeric, G: GlobalConfig>(
scope: &mut Scope,
input: <Self::Input<Lhs, Rhs, EO> as CubeType>::ExpandType,
output: <Self::Output<EO> as CubeType>::ExpandType,
config: G,
) -> <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType;
fn __expand_view_lhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
scope: &mut Scope,
_state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType,
) -> <View<Line<Lhs>, Coords3d> as CubeType>::ExpandType;
fn __expand_view_rhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
scope: &mut Scope,
_state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType,
) -> <View<Line<Rhs>, Coords3d> as CubeType>::ExpandType;
fn __expand_view_acc<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
scope: &mut Scope,
_state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType,
) -> <CubeOption<View<Line<EO>, Coords3d>> as CubeType>::ExpandType;
fn __expand_view_out<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
scope: &mut Scope,
_state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType,
) -> <View<Line<EO>, Coords3d, ReadWrite> as CubeType>::ExpandType;
// Provided methods
fn view_lhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
_state: &Self::State<Lhs, Rhs, EO>,
) -> View<Line<Lhs>, Coords3d> { ... }
fn view_rhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
_state: &Self::State<Lhs, Rhs, EO>,
) -> View<Line<Rhs>, Coords3d> { ... }
fn view_acc<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
_state: &Self::State<Lhs, Rhs, EO>,
) -> CubeOption<View<Line<EO>, Coords3d>> { ... }
fn view_out<Lhs: Numeric, Rhs: Numeric, EO: Numeric>(
_state: &mut Self::State<Lhs, Rhs, EO>,
) -> View<Line<EO>, Coords3d, ReadWrite> { ... }
}Expand description
Arguments for the matrix multiplication algorithm.
Required Associated Types§
Sourcetype Input<Lhs: Numeric, Rhs: Numeric, EO: Numeric>: LaunchArg + CubeType
type Input<Lhs: Numeric, Rhs: Numeric, EO: Numeric>: LaunchArg + CubeType
Type used for the input.
Sourcetype State<Lhs: Numeric, Rhs: Numeric, EO: Numeric>: CubeType
type State<Lhs: Numeric, Rhs: Numeric, EO: Numeric>: CubeType
Inner state that is used to create tensor inputs and tensor outputs .
Required Methods§
Sourcefn init_state<Lhs: Numeric, Rhs: Numeric, EO: Numeric, G: GlobalConfig>(
input: &Self::Input<Lhs, Rhs, EO>,
output: &mut Self::Output<EO>,
config: G,
) -> Self::State<Lhs, Rhs, EO>
fn init_state<Lhs: Numeric, Rhs: Numeric, EO: Numeric, G: GlobalConfig>( input: &Self::Input<Lhs, Rhs, EO>, output: &mut Self::Output<EO>, config: G, ) -> Self::State<Lhs, Rhs, EO>
Init the state.
fn __expand_init_state<Lhs: Numeric, Rhs: Numeric, EO: Numeric, G: GlobalConfig>( scope: &mut Scope, input: <Self::Input<Lhs, Rhs, EO> as CubeType>::ExpandType, output: <Self::Output<EO> as CubeType>::ExpandType, config: G, ) -> <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType
fn __expand_view_lhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( scope: &mut Scope, _state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType, ) -> <View<Line<Lhs>, Coords3d> as CubeType>::ExpandType
fn __expand_view_rhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( scope: &mut Scope, _state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType, ) -> <View<Line<Rhs>, Coords3d> as CubeType>::ExpandType
fn __expand_view_acc<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( scope: &mut Scope, _state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType, ) -> <CubeOption<View<Line<EO>, Coords3d>> as CubeType>::ExpandType
fn __expand_view_out<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( scope: &mut Scope, _state: <Self::State<Lhs, Rhs, EO> as CubeType>::ExpandType, ) -> <View<Line<EO>, Coords3d, ReadWrite> as CubeType>::ExpandType
Provided Methods§
fn view_lhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( _state: &Self::State<Lhs, Rhs, EO>, ) -> View<Line<Lhs>, Coords3d>
fn view_rhs<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( _state: &Self::State<Lhs, Rhs, EO>, ) -> View<Line<Rhs>, Coords3d>
fn view_acc<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( _state: &Self::State<Lhs, Rhs, EO>, ) -> CubeOption<View<Line<EO>, Coords3d>>
fn view_out<Lhs: Numeric, Rhs: Numeric, EO: Numeric>( _state: &mut Self::State<Lhs, Rhs, EO>, ) -> View<Line<EO>, Coords3d, ReadWrite>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.