VirtualTensorOperationsExpand

Trait VirtualTensorOperationsExpand 

Source
pub trait VirtualTensorOperationsExpand<E: Numeric>: LinedExpand {
    // Required methods
    fn __expand_as_tensor_map_method(
        &self,
        scope: &mut Scope,
    ) -> <CubeOption<TensorMap<E>> as CubeType>::ExpandType;
    fn __expand_read_method(
        &self,
        scope: &mut Scope,
        _index: <u32 as CubeType>::ExpandType,
    ) -> <Line<E> as CubeType>::ExpandType;
    fn __expand_read_window_method(
        &self,
        scope: &mut Scope,
        _start: <u32 as CubeType>::ExpandType,
        _end: <u32 as CubeType>::ExpandType,
    ) -> <Slice<Line<E>, ReadOnly> as CubeType>::ExpandType;
    fn __expand_write_method(
        &self,
        scope: &mut Scope,
        _index: <u32 as CubeType>::ExpandType,
        _value: <Line<E> as CubeType>::ExpandType,
    ) -> <() as CubeType>::ExpandType;
    fn __expand_shape_method(
        &self,
        scope: &mut Scope,
        _axis: <u32 as CubeType>::ExpandType,
    ) -> <u32 as CubeType>::ExpandType;
    fn __expand_stride_method(
        &self,
        scope: &mut Scope,
        _axis: <u32 as CubeType>::ExpandType,
    ) -> <u32 as CubeType>::ExpandType;
    fn __expand_rank_method(
        &self,
        scope: &mut Scope,
    ) -> <u32 as CubeType>::ExpandType;
    fn __expand_len_method(
        &self,
        scope: &mut Scope,
    ) -> <u32 as CubeType>::ExpandType;
    fn __expand_buffer_len_method(
        &self,
        scope: &mut Scope,
    ) -> <u32 as CubeType>::ExpandType;
}
Expand description

Trait to be implemented by a type that can become a virtual tensor.

The expand trait also need to be implemented for the type’s expand type.

§Warning

This trait is kind of unsafe, VirtualTensorOperations::write doesn’t follow the mutability rules, but it won’t lead to any undefined behavior.

Required Methods§

Source

fn __expand_as_tensor_map_method( &self, scope: &mut Scope, ) -> <CubeOption<TensorMap<E>> as CubeType>::ExpandType

Source

fn __expand_read_method( &self, scope: &mut Scope, _index: <u32 as CubeType>::ExpandType, ) -> <Line<E> as CubeType>::ExpandType

Source

fn __expand_read_window_method( &self, scope: &mut Scope, _start: <u32 as CubeType>::ExpandType, _end: <u32 as CubeType>::ExpandType, ) -> <Slice<Line<E>, ReadOnly> as CubeType>::ExpandType

Source

fn __expand_write_method( &self, scope: &mut Scope, _index: <u32 as CubeType>::ExpandType, _value: <Line<E> as CubeType>::ExpandType, ) -> <() as CubeType>::ExpandType

Source

fn __expand_shape_method( &self, scope: &mut Scope, _axis: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType

Source

fn __expand_stride_method( &self, scope: &mut Scope, _axis: <u32 as CubeType>::ExpandType, ) -> <u32 as CubeType>::ExpandType

Source

fn __expand_rank_method( &self, scope: &mut Scope, ) -> <u32 as CubeType>::ExpandType

Source

fn __expand_len_method( &self, scope: &mut Scope, ) -> <u32 as CubeType>::ExpandType

Source

fn __expand_buffer_len_method( &self, scope: &mut Scope, ) -> <u32 as CubeType>::ExpandType

Implementations on Foreign Types§

Source§

impl<E: Numeric> VirtualTensorOperationsExpand<E> for ExpandElementTyped<Tensor<Line<E>>>

Source§

impl<E: Numeric> VirtualTensorOperationsExpand<E> for ExpandElementTyped<TensorMap<E>>

Implementors§