#vector #matrix-vector #quaternions #matrix #simd #linear-algebra

directx_math

A rust translation of DirectXMath, a SIMD linear algebra library for use in games and graphics apps

12 releases

0.2.2 Apr 24, 2021
0.2.1 Mar 23, 2021
0.2.0 Sep 5, 2020
0.1.2 Jun 8, 2020
0.0.0 Apr 18, 2020

#652 in Math

Download history 36/week @ 2024-02-19 17/week @ 2024-02-26 11/week @ 2024-03-04 16/week @ 2024-03-11 8/week @ 2024-03-18 63/week @ 2024-04-01 5/week @ 2024-04-08 6/week @ 2024-04-15

74 downloads per month

MIT license

1MB
18K SLoC

crates.io docs.rs tests

DirectXMath for Rust

A rust translation of DirectXMath, a SIMD linear algebra library for use in games and graphics apps.

✔️ = Implemented, ❌ = Not yet implemented, 🚧 = In progress

Implementation status

API Feature Implemented
Vector ✔️
Vector 2D ✔️
Vector 3D ✔️
Vector 4D ✔️
Quaternion ✔️
Matrix ✔️
Streaming Transforms
Color
Load/Store/Accessors ✔️ †
Plane ✔️
Collision ✔️
Documentation ✔️ ††

† Some alternate forms of the load/store operations are not yet implemented.

†† Most documentation has been ported and all functions have links to the official DirectXMath documentation.

SIMD intrinsics

x86 / x86_64 ARM No intrinsics fallback
✔️ ❌ (will fallback to no-intrinsics) ✔️

Intrinsics may be disabled with the no_intrinsics feature. This is the implicit behavior if SIMD intrinsics are not available on the target architecture.

Note that only sse and sse2 are enabled by default for x86 and x86-64 targets. The sse3, sse4.1, avx, f16c, fma, and avx2 intrinsics may be enabled via CPU target features.

Example: enable all x86_64 intrinsics

RUSTFLAGS="-C target-feature=+sse3,+sse4.1,+avx,+f16c,+fma,+avx2" cargo build

License

No runtime deps