Skip to main content

VirtualTensorOperationsExpand

Trait VirtualTensorOperationsExpand 

Source
pub trait VirtualTensorOperationsExpand<E: Numeric, N: Size>: VectorizedExpand {
    // Required methods
    fn __expand_as_tensor_map_method(
        &self,
        scope: &Scope,
    ) -> <ComptimeOption<TensorMap<E, Tiled>> as CubeType>::ExpandType;
    fn __expand_read_method(
        &self,
        scope: &Scope,
        _index: <usize as CubeType>::ExpandType,
    ) -> <Vector<E, N> as CubeType>::ExpandType;
    fn __expand_read_window_method<'infer, 'scope>(
        &'infer self,
        scope: &'scope Scope,
        _start: <usize as CubeType>::ExpandType,
        _end: <usize as CubeType>::ExpandType,
    ) -> &'infer <[Vector<E, N>] as CubeType>::ExpandType ;
    fn __expand_write_method(
        &mut self,
        scope: &Scope,
        _index: <usize as CubeType>::ExpandType,
        value: <Vector<E, N> as CubeType>::ExpandType,
    );
    fn __expand_shape_method(
        &self,
        scope: &Scope,
        _axis: <usize as CubeType>::ExpandType,
    ) -> <usize as CubeType>::ExpandType;
    fn __expand_stride_method(
        &self,
        scope: &Scope,
        _axis: <usize as CubeType>::ExpandType,
    ) -> <usize as CubeType>::ExpandType;
    fn __expand_rank_method(
        &self,
        scope: &Scope,
    ) -> <usize as CubeType>::ExpandType;
    fn __expand_len_method(
        &self,
        scope: &Scope,
    ) -> <usize as CubeType>::ExpandType;
    fn __expand_buffer_len_method(
        &self,
        scope: &Scope,
    ) -> <usize 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: &Scope, ) -> <ComptimeOption<TensorMap<E, Tiled>> as CubeType>::ExpandType

Source

fn __expand_read_method( &self, scope: &Scope, _index: <usize as CubeType>::ExpandType, ) -> <Vector<E, N> as CubeType>::ExpandType

Source

fn __expand_read_window_method<'infer, 'scope>( &'infer self, scope: &'scope Scope, _start: <usize as CubeType>::ExpandType, _end: <usize as CubeType>::ExpandType, ) -> &'infer <[Vector<E, N>] as CubeType>::ExpandType

Source

fn __expand_write_method( &mut self, scope: &Scope, _index: <usize as CubeType>::ExpandType, value: <Vector<E, N> as CubeType>::ExpandType, )

Source

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

Source

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

Source

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

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<E: Numeric, N: Size> VirtualTensorOperationsExpand<E, N> for NativeExpand<TensorMap<E, Tiled>>

Source§

impl<E: Numeric, N: Size> VirtualTensorOperationsExpand<E, N> for TensorExpand<Vector<E, N>>

Implementors§