wide_dot
This commit is contained in:
parent
b14c84bdad
commit
83434a89c7
@ -10,18 +10,15 @@ macro_rules! impl_wide_vector_operations_const {
|
|||||||
$( $field: self.$field.[<wide_mul_ $lhs _ $rhs>](rhs.$field) ), +
|
$( $field: self.$field.[<wide_mul_ $lhs _ $rhs>](rhs.$field) ), +
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn [<wide_dot_ $lhs _ $rhs>](self,rhs:$struct<fixed_wide::fixed::Fixed<{$rhs},{$rhs*32}>>)->fixed_wide::fixed::Fixed<{$lhs+$rhs},{($lhs+$rhs)*32}>{
|
||||||
|
$crate::sum_repeating!(
|
||||||
|
$( + (self.$field.[<wide_mul_ $lhs _ $rhs>](rhs.$field)) ) +
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
impl<V:core::ops::Add<Output=V>,U,T:fixed_wide_traits::wide::WideMul<U,Output=V>> fixed_wide_traits::wide::WideDot<$struct<U>> for $struct<T> {
|
|
||||||
type Output=V;
|
|
||||||
#[inline]
|
|
||||||
fn wide_dot(self, rhs: $struct<U>) -> Self::Output {
|
|
||||||
$crate::sum_repeating!(
|
|
||||||
$( + (self.$field.wide_mul(rhs.$field)) ) +
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl<U:std::ops::Add<Output=U>,T:Copy+fixed_wide_traits::wide::WideMul<Output=U>> $struct<T> {
|
impl<U:std::ops::Add<Output=U>,T:Copy+fixed_wide_traits::wide::WideMul<Output=U>> $struct<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn wide_length_squared(&self) -> U {
|
pub fn wide_length_squared(&self) -> U {
|
||||||
|
Loading…
Reference in New Issue
Block a user