diff options
| author | Caleb Zulawski <caleb.zulawski@gmail.com> | 2021-08-07 01:16:23 +0000 |
|---|---|---|
| committer | Caleb Zulawski <caleb.zulawski@gmail.com> | 2021-08-07 01:16:23 +0000 |
| commit | 8cc38ae292b1dbc27713cd8e267fa9b4d32c12b9 (patch) | |
| tree | f7b98e4a695403c89b7343802fe3d19819ebf000 | |
| parent | dc4dc99649471a06a3fd5dbffabf71eab8ff8f95 (diff) | |
| download | rust-8cc38ae292b1dbc27713cd8e267fa9b4d32c12b9.tar.gz rust-8cc38ae292b1dbc27713cd8e267fa9b4d32c12b9.zip | |
Remove Vector trait
| -rw-r--r-- | crates/core_simd/src/vector.rs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs index 2e3855bff3c..9fb6d17d40a 100644 --- a/crates/core_simd/src/vector.rs +++ b/crates/core_simd/src/vector.rs @@ -400,39 +400,3 @@ impl Sealed for f64 {} unsafe impl SimdElement for f64 { type Mask = i64; } - -/// A representation of a vector as an "array" with indices, implementing -/// operations applicable to any vector type based solely on "having lanes", -/// and describing relationships between vector and scalar types. -pub trait Vector: sealed::Sealed { - /// The scalar type in every lane of this vector type. - type Scalar: Copy + Sized; - - /// The number of lanes for this vector. - const LANES: usize; - - /// Generates a SIMD vector with the same value in every lane. - #[must_use] - fn splat(val: Self::Scalar) -> Self; -} - -impl<Element, const LANES: usize> Sealed for Simd<Element, LANES> -where - LaneCount<LANES>: SupportedLaneCount, - Element: SimdElement, -{ -} - -impl<Element, const LANES: usize> Vector for Simd<Element, LANES> -where - LaneCount<LANES>: SupportedLaneCount, - Element: SimdElement, -{ - type Scalar = Element; - const LANES: usize = LANES; - - #[inline] - fn splat(val: Self::Scalar) -> Self { - Self::splat(val) - } -} |
