pub trait TensorComplexRealContextFor<Input: ComplexFloat + Scalar> {
type ComplexRealBackend: TensorComplexRealPrims<Input, Context = Self, Real = Input::Real>;
}Expand description
Bridge trait that binds a complex-to-real execution context to its backend.
High-level crates use this trait to stay generic over runtime context types while dispatching cross-dtype complex-to-real families through the correct backend marker type.
§Examples
ⓘ
use num_complex::Complex64;
use tenferro_prims::{CpuContext, TensorComplexRealContextFor};
fn accepts_context<C>(_: &mut C)
where
C: TensorComplexRealContextFor<Complex64>,
{
}
let mut ctx = CpuContext::new(1);
accepts_context(&mut ctx);Required Associated Types§
Sourcetype ComplexRealBackend: TensorComplexRealPrims<Input, Context = Self, Real = Input::Real>
type ComplexRealBackend: TensorComplexRealPrims<Input, Context = Self, Real = Input::Real>
Backend associated with this context for the complex-to-real family.