TensorIndexingContextFor

Trait TensorIndexingContextFor 

Source
pub trait TensorIndexingContextFor<Alg: Algebra> {
    type IndexingBackend: TensorIndexingPrims<Alg, Context = Self>;
}
Expand description

Bridge trait that binds an indexing-family execution context to its backend.

High-level crates use this trait to stay generic over runtime context types while dispatching index-based selection, gathering, and scattering through the correct backend marker type.

§Examples

use tenferro_algebra::Standard;
use tenferro_prims::{CpuContext, TensorIndexingContextFor};

fn accepts_context<C>(_: &mut C)
where
    C: TensorIndexingContextFor<Standard<f64>>,
{
}

let mut ctx = CpuContext::new(1);
accepts_context(&mut ctx);

Required Associated Types§

Source

type IndexingBackend: TensorIndexingPrims<Alg, Context = Self>

Backend associated with this context for the indexing family.

Implementors§