Skip to main content

IndexedMovement

Trait IndexedMovement 

Source
pub trait IndexedMovement<B>{
    type Error;

    // Required methods
    fn index_demands(
        &mut self,
        indices: &B::Tensor,
        upper_bound: usize,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<Vec<(usize, u64)>, Self::Error>;
    fn remap_indices(
        &mut self,
        indices: &B::Tensor,
        mapping: &[(usize, usize)],
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<B::Tensor, Self::Error>;
    fn select_rows(
        &mut self,
        value: &B::Tensor,
        start: usize,
        end: usize,
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<B::Tensor, Self::Error>;
    fn concatenate_rows(
        &mut self,
        values: &[B::Tensor],
        context: &<B::Tensor as Tensor>::Context,
    ) -> Result<B::Tensor, Self::Error>;
}
Expand description

Generic indexed tensor movement required by bounded grouped execution.

Implementations expose integer-index discovery and tensor movement without receiving architecture plans, bank meaning, or text lifecycle policy.

Required Associated Types§

Source

type Error

Indexed movement failure.

Required Methods§

Source

fn index_demands( &mut self, indices: &B::Tensor, upper_bound: usize, context: &<B::Tensor as Tensor>::Context, ) -> Result<Vec<(usize, u64)>, Self::Error>

Returns deterministic demand counts for integer indices below upper_bound.

Source

fn remap_indices( &mut self, indices: &B::Tensor, mapping: &[(usize, usize)], context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, Self::Error>

Rewrites source indices through one exact source-to-compact mapping.

Source

fn select_rows( &mut self, value: &B::Tensor, start: usize, end: usize, context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, Self::Error>

Selects a contiguous range along the leading row axis.

Source

fn concatenate_rows( &mut self, values: &[B::Tensor], context: &<B::Tensor as Tensor>::Context, ) -> Result<B::Tensor, Self::Error>

Concatenates row partitions in their original order.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§