[−][src]Module slipstream::vector
Low-level definitions of the vector types and their traits.
While the user usually operates with the type aliases defined in types
(and
exported through the prelude
, this module provides the actual
implementation of the types.
The module defines group of types named as Packed<number>
. The number specifies
the minimal alignment of the whole type, in bytes (unfortunately, rust isn't able to express
this as generics, so they are generated by macros). The alignment is needed, as vector
instructions require the vectors to be aligned and without it, the auto-vectorizer can't do its
job effectively.
There are multiple alignments available. Small vectors shouldn't require bigger alignment than their size, while the bigger ones should require larger one to make it possible to use wider SIMD registers.
The type aliases in types
takes this into account.
These types are not thoroughly documented on themselves. They mostly consist of operator and
common trait implementations. They also implement the Vector
trait, look for the
documentation there.
Structs
Packed1 | A packed vector. |
Packed2 | A packed vector. |
Packed4 | A packed vector. |
Packed8 | A packed vector. |
Packed16 | A packed vector. |
Packed32 | A packed vector. |