TensorSortContextFor

Trait TensorSortContextFor 

Source
pub trait TensorSortContextFor<Alg: Algebra>
where Alg::Scalar: PartialOrd,
{ type SortBackend: TensorSortPrims<Alg, Context = Self>; }
Expand description

Bridge trait that binds a sort-family execution context to its backend.

High-level crates use this trait to stay generic over runtime context types while dispatching sort, argsort, and top-k operations through the correct backend marker type.

§Examples

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

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

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

Required Associated Types§

Source

type SortBackend: TensorSortPrims<Alg, Context = Self>

Backend associated with this context for the sort family.

Implementors§