pub trait ReduceArgs:
Send
+ Sync
+ 'static
+ Clone {
type Input<E: Numeric>: LaunchArg + CubeType;
type Output<E: Numeric>: LaunchArg + CubeType;
type State<P: ReduceDType>: CubeType;
Show 28 methods
// Required methods
fn init_state<P: ReduceDType>(
input: &Self::Input<P::In>,
output: &mut Self::Output<P::Out>,
) -> Self::State<P>;
fn read_input<P: ReduceDType>(
state: &Self::State<P>,
index: u32,
) -> Line<P::In>;
fn read_output<P: ReduceDType>(
state: &Self::State<P>,
index: u32,
) -> Line<P::Out>;
fn write_output<P: ReduceDType>(
state: &mut Self::State<P>,
index: u32,
value: Line<P::Out>,
);
fn len_input<P: ReduceDType>(state: &Self::State<P>) -> u32;
fn len_output<P: ReduceDType>(state: &Self::State<P>) -> u32;
fn buffer_len_input<P: ReduceDType>(state: &Self::State<P>) -> u32;
fn buffer_len_output<P: ReduceDType>(state: &Self::State<P>) -> u32;
fn rank_input<P: ReduceDType>(state: &Self::State<P>) -> u32;
fn rank_output<P: ReduceDType>(state: &Self::State<P>) -> u32;
fn shape_input<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32;
fn shape_output<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32;
fn stride_input<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32;
fn stride_output<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32;
fn __expand_init_state<P: ReduceDType>(
context: &mut Scope,
input: <Self::Input<P::In> as CubeType>::ExpandType,
output: <Self::Output<P::Out> as CubeType>::ExpandType,
) -> <Self::State<P> as CubeType>::ExpandType;
fn __expand_read_input<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
index: <u32 as CubeType>::ExpandType,
) -> <Line<P::In> as CubeType>::ExpandType;
fn __expand_read_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
index: <u32 as CubeType>::ExpandType,
) -> <Line<P::Out> as CubeType>::ExpandType;
fn __expand_write_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
index: <u32 as CubeType>::ExpandType,
value: <Line<P::Out> as CubeType>::ExpandType,
) -> <() as CubeType>::ExpandType;
fn __expand_len_input<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_len_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_buffer_len_input<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_buffer_len_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_rank_input<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_rank_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_shape_input<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
dim: <u32 as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_shape_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
dim: <u32 as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_stride_input<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
dim: <u32 as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
fn __expand_stride_output<P: ReduceDType>(
context: &mut Scope,
state: <Self::State<P> as CubeType>::ExpandType,
dim: <u32 as CubeType>::ExpandType,
) -> <u32 as CubeType>::ExpandType;
}
Required Associated Types§
type Input<E: Numeric>: LaunchArg + CubeType
type Output<E: Numeric>: LaunchArg + CubeType
type State<P: ReduceDType>: CubeType
Required Methods§
fn init_state<P: ReduceDType>( input: &Self::Input<P::In>, output: &mut Self::Output<P::Out>, ) -> Self::State<P>
fn read_input<P: ReduceDType>(state: &Self::State<P>, index: u32) -> Line<P::In>
fn read_output<P: ReduceDType>( state: &Self::State<P>, index: u32, ) -> Line<P::Out>
fn write_output<P: ReduceDType>( state: &mut Self::State<P>, index: u32, value: Line<P::Out>, )
fn len_input<P: ReduceDType>(state: &Self::State<P>) -> u32
fn len_output<P: ReduceDType>(state: &Self::State<P>) -> u32
fn buffer_len_input<P: ReduceDType>(state: &Self::State<P>) -> u32
fn buffer_len_output<P: ReduceDType>(state: &Self::State<P>) -> u32
fn rank_input<P: ReduceDType>(state: &Self::State<P>) -> u32
fn rank_output<P: ReduceDType>(state: &Self::State<P>) -> u32
fn shape_input<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32
fn shape_output<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32
fn stride_input<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32
fn stride_output<P: ReduceDType>(state: &Self::State<P>, dim: u32) -> u32
fn __expand_init_state<P: ReduceDType>( context: &mut Scope, input: <Self::Input<P::In> as CubeType>::ExpandType, output: <Self::Output<P::Out> as CubeType>::ExpandType, ) -> <Self::State<P> as CubeType>::ExpandType
fn __expand_read_input<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, index: <u32 as CubeType>::ExpandType, ) -> <Line<P::In> as CubeType>::ExpandType
fn __expand_read_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, index: <u32 as CubeType>::ExpandType, ) -> <Line<P::Out> as CubeType>::ExpandType
fn __expand_write_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, index: <u32 as CubeType>::ExpandType, value: <Line<P::Out> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType
fn __expand_len_input<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_len_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_buffer_len_input<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_buffer_len_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_rank_input<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_rank_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_shape_input<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, dim: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_shape_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, dim: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_stride_input<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, dim: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
fn __expand_stride_output<P: ReduceDType>( context: &mut Scope, state: <Self::State<P> as CubeType>::ExpandType, dim: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType
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.