diff --git a/fixed_wide_vectors/src/lib.rs b/fixed_wide_vectors/src/lib.rs index a9c0b41..94bd058 100644 --- a/fixed_wide_vectors/src/lib.rs +++ b/fixed_wide_vectors/src/lib.rs @@ -10,5 +10,11 @@ pub use matrix::Matrix2; pub use matrix::Matrix3; pub use matrix::Matrix4; +//internal trait for matrix wide_dot +trait Transpose{ + type Output; + fn transpose(self)->Self::Output; +} + #[cfg(test)] mod tests; diff --git a/fixed_wide_vectors/src/macros/matrix.rs b/fixed_wide_vectors/src/macros/matrix.rs index 1cbd791..fe311a2 100644 --- a/fixed_wide_vectors/src/macros/matrix.rs +++ b/fixed_wide_vectors/src/macros/matrix.rs @@ -34,6 +34,12 @@ macro_rules! impl_matrix { } } } + impl $crate::Transpose for $struct_outer<$struct_inner>{ + type Output=$struct_inner<$struct_outer>; + fn transpose(self)->Self::Output{ + self.transpose() + } + } impl $struct_outer<$struct_inner> { #[inline(always)]