|
1 | 1 | //! This module defines the API of portable vector types. |
2 | | -//! |
3 | | -//! # API |
4 | | -//! |
5 | | -//! ## Traits |
6 | | -//! |
7 | | -//! All portable vector types implement the following traits: |
8 | | -//! |
9 | | -//! * [x] `Copy`, |
10 | | -//! * [x] `Clone`, |
11 | | -//! * [x] `Debug`, |
12 | | -//! * [x] `Default` |
13 | | -//! * [x] `PartialEq` |
14 | | -//! * [x] `PartialOrd` (TODO: tests) |
15 | | -//! |
16 | | -//! Non-floating-point vector types also implement: |
17 | | -//! |
18 | | -//! * [x] `Hash`, |
19 | | -//! * [x] `Eq`, and |
20 | | -//! * [x] `Ord`. |
21 | | -//! |
22 | | -//! Integer vector types also implement: |
23 | | -//! |
24 | | -//! * [x] `fmt::LowerHex`. |
25 | | -//! |
26 | | -//! ## Conversions |
27 | | -//! |
28 | | -//! * [x]: `FromBits/IntoBits`: bitwise lossless transmutes between vectors of |
29 | | -//! the same size (i.e., same `mem::size_of`). |
30 | | -//! * [x]: `From/Into`: casts between vectors with the same number of lanes |
31 | | -//! (potentially lossy). |
32 | | -//! |
33 | | -//! ## Inherent methods |
34 | | -//! |
35 | | -//! * [x] minimal API: implemented by all vector types except for boolean |
36 | | -//! vectors. |
37 | | -//! * [x] minimal boolean vector API: implemented by boolean vectors. |
38 | | -//! * [x] load/store API: aligned and unaligned memory loads and |
39 | | -//! stores - implemented by all vectors. |
40 | | -//! * [x] comparison API: vector lane-wise comparison producing |
41 | | -//! boolean vectors - implemented by all vectors. |
42 | | -//! * [x] arithmetic operations: implemented by all non-boolean vectors. |
43 | | -//! * [x] `std::ops::Neg`: implemented by signed-integer and floating-point |
44 | | -//! vectors. |
45 | | -//! * [x] bitwise operations: implemented by integer and boolean |
46 | | -//! vectors. |
47 | | -//! * [x] shift operations: implemented by integer vectors. |
48 | | -//! * [x] arithmetic reductions: implemented by integer and floating-point |
49 | | -//! vectors. |
50 | | -//! * [x] bitwise reductions: implemented by integer and boolean |
51 | | -//! vectors. |
52 | | -//! * [x] boolean reductions: implemented by boolean vectors. |
53 | | -//! * [ ] portable shuffles: `shufflevector`. |
54 | | -//! * [ ] portable `gather`/`scatter`: |
55 | 2 | #![allow(unused)] |
56 | 3 |
|
57 | 4 | /// Adds the vector type `$id`, with elements of types `$elem_tys`. |
58 | 5 | macro_rules! define_ty { |
59 | 6 | ($id:ident, $($elem_tys:ident),+ | $(#[$doc:meta])*) => { |
60 | 7 | $(#[$doc])* |
61 | 8 | #[repr(simd)] |
62 | | - #[derive(Copy, Clone, Debug, /*FIXME:*/ PartialOrd)] |
| 9 | + #[derive(Copy, Clone, Debug, |
| 10 | + /*FIXME: manually implement and add tests*/ PartialOrd)] |
63 | 11 | #[allow(non_camel_case_types)] |
64 | 12 | pub struct $id($($elem_tys),*); |
65 | 13 | } |
|
0 commit comments