pub trait ComplexField:
Debug
+ Clone
+ Conjugate<Canonical = Self>
+ PartialEq
+ AddByRef<Output = Self>
+ SubByRef<Output = Self>
+ MulByRef<Output = Self>
+ NegByRef<Output = Self> {
type Arch: SimdArch;
type Unit: ComplexField;
type SimdCtx<S: Simd>: Copy;
type Index: IndexCore;
type Real: RealField;
type SimdMask<S: Simd>: Copy + Debug;
type SimdMemMask<S: Simd>: Copy + Debug;
type SimdVec<S: Simd>: Pod + Debug;
type SimdIndex<S: Simd>: Pod + Debug;
const IS_REAL: bool;
const SIMD_CAPABILITIES: SimdCapabilities;
const SIMD_ABS_SPLIT_REAL_IMAG: bool = false;
Show 65 methods
// Required methods
fn zero_impl() -> Self;
fn one_impl() -> Self;
fn nan_impl() -> Self;
fn infinity_impl() -> Self;
fn from_real_impl(real: &Self::Real) -> Self;
fn from_f64_impl(real: f64) -> Self;
fn real_part_impl(value: &Self) -> Self::Real;
fn imag_part_impl(value: &Self) -> Self::Real;
fn copy_impl(value: &Self) -> Self;
fn conj_impl(value: &Self) -> Self;
fn recip_impl(value: &Self) -> Self;
fn sqrt_impl(value: &Self) -> Self;
fn abs_impl(value: &Self) -> Self::Real;
fn abs1_impl(value: &Self) -> Self::Real;
fn abs2_impl(value: &Self) -> Self::Real;
fn mul_real_impl(lhs: &Self, rhs: &Self::Real) -> Self;
fn mul_pow2_impl(lhs: &Self, rhs: &Self::Real) -> Self;
fn is_finite_impl(value: &Self) -> bool;
fn simd_ctx<S: Simd>(simd: S) -> Self::SimdCtx<S>;
fn ctx_from_simd<S: Simd>(ctx: &Self::SimdCtx<S>) -> S;
fn simd_mask_between<S: Simd>(
ctx: &Self::SimdCtx<S>,
start: Self::Index,
end: Self::Index,
) -> Self::SimdMask<S>;
fn simd_mem_mask_between<S: Simd>(
ctx: &Self::SimdCtx<S>,
start: Self::Index,
end: Self::Index,
) -> Self::SimdMemMask<S>;
unsafe fn simd_mask_load_raw<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMemMask<S>,
ptr: *const Self::SimdVec<S>,
) -> Self::SimdVec<S>;
unsafe fn simd_mask_store_raw<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMemMask<S>,
ptr: *mut Self::SimdVec<S>,
values: Self::SimdVec<S>,
);
fn simd_splat<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: &Self,
) -> Self::SimdVec<S>;
fn simd_splat_real<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: &Self::Real,
) -> Self::SimdVec<S>;
fn simd_add<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_sub<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_neg<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_conj<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_abs1<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_abs_max<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_mul_real<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_mul_pow2<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_mul<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_conj_mul<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_mul_add<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
acc: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_conj_mul_add<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
acc: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_abs2<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_abs2_add<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
acc: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_reduce_sum<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self;
fn simd_reduce_max<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdVec<S>,
) -> Self;
fn simd_equal<S: Simd>(
ctx: &Self::SimdCtx<S>,
real_lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdMask<S>;
fn simd_less_than<S: Simd>(
ctx: &Self::SimdCtx<S>,
real_lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdMask<S>;
fn simd_less_than_or_equal<S: Simd>(
ctx: &Self::SimdCtx<S>,
real_lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdMask<S>;
fn simd_greater_than<S: Simd>(
ctx: &Self::SimdCtx<S>,
real_lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdMask<S>;
fn simd_greater_than_or_equal<S: Simd>(
ctx: &Self::SimdCtx<S>,
real_lhs: Self::SimdVec<S>,
real_rhs: Self::SimdVec<S>,
) -> Self::SimdMask<S>;
fn simd_select<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMask<S>,
lhs: Self::SimdVec<S>,
rhs: Self::SimdVec<S>,
) -> Self::SimdVec<S>;
fn simd_index_select<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMask<S>,
lhs: Self::SimdIndex<S>,
rhs: Self::SimdIndex<S>,
) -> Self::SimdIndex<S>;
fn simd_index_splat<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::Index,
) -> Self::SimdIndex<S>;
fn simd_index_add<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdIndex<S>,
rhs: Self::SimdIndex<S>,
) -> Self::SimdIndex<S>;
fn simd_index_less_than<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdIndex<S>,
rhs: Self::SimdIndex<S>,
) -> Self::SimdMask<S>;
fn simd_and_mask<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdMask<S>,
rhs: Self::SimdMask<S>,
) -> Self::SimdMask<S>;
fn simd_or_mask<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdMask<S>,
rhs: Self::SimdMask<S>,
) -> Self::SimdMask<S>;
fn simd_not_mask<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMask<S>,
) -> Self::SimdMask<S>;
fn simd_first_true_mask<S: Simd>(
ctx: &Self::SimdCtx<S>,
value: Self::SimdMask<S>,
) -> usize;
// Provided methods
fn is_nan_impl(value: &Self) -> bool { ... }
fn simd_index_greater_than<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdIndex<S>,
rhs: Self::SimdIndex<S>,
) -> Self::SimdMask<S> { ... }
fn simd_index_less_than_or_equal<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdIndex<S>,
rhs: Self::SimdIndex<S>,
) -> Self::SimdMask<S> { ... }
fn simd_index_greater_than_or_equal<S: Simd>(
ctx: &Self::SimdCtx<S>,
lhs: Self::SimdIndex<S>,
rhs: Self::SimdIndex<S>,
) -> Self::SimdMask<S> { ... }
fn simd_load<S: Simd>(
ctx: &Self::SimdCtx<S>,
ptr: &Self::SimdVec<S>,
) -> Self::SimdVec<S> { ... }
fn simd_store<S: Simd>(
ctx: &Self::SimdCtx<S>,
ptr: &mut Self::SimdVec<S>,
value: Self::SimdVec<S>,
) { ... }
unsafe fn simd_mask_load<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMemMask<S>,
ptr: *const Self::SimdVec<S>,
) -> Self::SimdVec<S> { ... }
unsafe fn simd_mask_store<S: Simd>(
ctx: &Self::SimdCtx<S>,
mask: Self::SimdMemMask<S>,
ptr: *mut Self::SimdVec<S>,
value: Self::SimdVec<S>,
) { ... }
fn simd_iota<S: Simd>(ctx: &Self::SimdCtx<S>) -> Self::SimdIndex<S> { ... }
}Required Associated Constants§
const IS_REAL: bool
const SIMD_CAPABILITIES: SimdCapabilities
Provided Associated Constants§
const SIMD_ABS_SPLIT_REAL_IMAG: bool = false
Required Associated Types§
type Arch: SimdArch
type Unit: ComplexField
type SimdCtx<S: Simd>: Copy
type Index: IndexCore
type Real: RealField
type SimdMask<S: Simd>: Copy + Debug
type SimdMemMask<S: Simd>: Copy + Debug
type SimdVec<S: Simd>: Pod + Debug
type SimdIndex<S: Simd>: Pod + Debug
Required Methods§
fn zero_impl() -> Self
fn one_impl() -> Self
fn nan_impl() -> Self
fn infinity_impl() -> Self
fn from_real_impl(real: &Self::Real) -> Self
fn from_f64_impl(real: f64) -> Self
fn real_part_impl(value: &Self) -> Self::Real
fn imag_part_impl(value: &Self) -> Self::Real
fn copy_impl(value: &Self) -> Self
fn conj_impl(value: &Self) -> Self
fn recip_impl(value: &Self) -> Self
fn sqrt_impl(value: &Self) -> Self
fn abs_impl(value: &Self) -> Self::Real
fn abs1_impl(value: &Self) -> Self::Real
fn abs2_impl(value: &Self) -> Self::Real
fn mul_real_impl(lhs: &Self, rhs: &Self::Real) -> Self
fn mul_pow2_impl(lhs: &Self, rhs: &Self::Real) -> Self
fn is_finite_impl(value: &Self) -> bool
fn simd_ctx<S: Simd>(simd: S) -> Self::SimdCtx<S>
fn ctx_from_simd<S: Simd>(ctx: &Self::SimdCtx<S>) -> S
fn simd_mask_between<S: Simd>( ctx: &Self::SimdCtx<S>, start: Self::Index, end: Self::Index, ) -> Self::SimdMask<S>
fn simd_mem_mask_between<S: Simd>( ctx: &Self::SimdCtx<S>, start: Self::Index, end: Self::Index, ) -> Self::SimdMemMask<S>
unsafe fn simd_mask_load_raw<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMemMask<S>, ptr: *const Self::SimdVec<S>, ) -> Self::SimdVec<S>
unsafe fn simd_mask_store_raw<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMemMask<S>, ptr: *mut Self::SimdVec<S>, values: Self::SimdVec<S>, )
fn simd_splat<S: Simd>(ctx: &Self::SimdCtx<S>, value: &Self) -> Self::SimdVec<S>
fn simd_splat_real<S: Simd>( ctx: &Self::SimdCtx<S>, value: &Self::Real, ) -> Self::SimdVec<S>
fn simd_add<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_sub<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_neg<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_conj<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_abs1<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_abs_max<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_mul_real<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_mul_pow2<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_mul<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_conj_mul<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_mul_add<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, acc: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_conj_mul_add<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, acc: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_abs2<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_abs2_add<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, acc: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_reduce_sum<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self
fn simd_reduce_max<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdVec<S>, ) -> Self
fn simd_equal<S: Simd>( ctx: &Self::SimdCtx<S>, real_lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdMask<S>
fn simd_less_than<S: Simd>( ctx: &Self::SimdCtx<S>, real_lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdMask<S>
fn simd_less_than_or_equal<S: Simd>( ctx: &Self::SimdCtx<S>, real_lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdMask<S>
fn simd_greater_than<S: Simd>( ctx: &Self::SimdCtx<S>, real_lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdMask<S>
fn simd_greater_than_or_equal<S: Simd>( ctx: &Self::SimdCtx<S>, real_lhs: Self::SimdVec<S>, real_rhs: Self::SimdVec<S>, ) -> Self::SimdMask<S>
fn simd_select<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMask<S>, lhs: Self::SimdVec<S>, rhs: Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_index_select<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMask<S>, lhs: Self::SimdIndex<S>, rhs: Self::SimdIndex<S>, ) -> Self::SimdIndex<S>
fn simd_index_splat<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::Index, ) -> Self::SimdIndex<S>
fn simd_index_add<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdIndex<S>, rhs: Self::SimdIndex<S>, ) -> Self::SimdIndex<S>
fn simd_index_less_than<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdIndex<S>, rhs: Self::SimdIndex<S>, ) -> Self::SimdMask<S>
fn simd_and_mask<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdMask<S>, rhs: Self::SimdMask<S>, ) -> Self::SimdMask<S>
fn simd_or_mask<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdMask<S>, rhs: Self::SimdMask<S>, ) -> Self::SimdMask<S>
fn simd_not_mask<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMask<S>, ) -> Self::SimdMask<S>
fn simd_first_true_mask<S: Simd>( ctx: &Self::SimdCtx<S>, value: Self::SimdMask<S>, ) -> usize
Provided Methods§
fn is_nan_impl(value: &Self) -> bool
fn simd_index_greater_than<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdIndex<S>, rhs: Self::SimdIndex<S>, ) -> Self::SimdMask<S>
fn simd_index_less_than_or_equal<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdIndex<S>, rhs: Self::SimdIndex<S>, ) -> Self::SimdMask<S>
fn simd_index_greater_than_or_equal<S: Simd>( ctx: &Self::SimdCtx<S>, lhs: Self::SimdIndex<S>, rhs: Self::SimdIndex<S>, ) -> Self::SimdMask<S>
fn simd_load<S: Simd>( ctx: &Self::SimdCtx<S>, ptr: &Self::SimdVec<S>, ) -> Self::SimdVec<S>
fn simd_store<S: Simd>( ctx: &Self::SimdCtx<S>, ptr: &mut Self::SimdVec<S>, value: Self::SimdVec<S>, )
unsafe fn simd_mask_load<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMemMask<S>, ptr: *const Self::SimdVec<S>, ) -> Self::SimdVec<S>
unsafe fn simd_mask_store<S: Simd>( ctx: &Self::SimdCtx<S>, mask: Self::SimdMemMask<S>, ptr: *mut Self::SimdVec<S>, value: Self::SimdVec<S>, )
fn simd_iota<S: Simd>(ctx: &Self::SimdCtx<S>) -> Self::SimdIndex<S>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.