# A Tiny SIMD Vector Crate 🏹
🚩 Works only on the x86_64 CPU architecture with the AVX2 and FMA extensions!
They can be enabled by putting these lines inside .cargo/config.toml
, located either at the root of your
project or in the installation directory of cargo:
toml
[build]
rustflags = ["-Ctarget-feature=+avx2,+fma"]
## Highlights
Straightforward implementation without macro trickery. Explore the source code to see how everything is done!
Double precision:
Dvec2
- 2D vectorDvec4
- 4D vectorDmat4
- 4x4 matrixSingle precision:
Fvec2
- 2D vector (this one is not SIMD)Fvec4
- 4D vetcorFmat4
- 4x4 matrixArithmetics (+
, -
, *
and /
):
Methods:
Enable the crate feature bytemuck
to mark all vectors as Plain Old Data.