| 1 | # [Docs.rs](https://docs.rs/safe_arch) |
| 2 | |
| 3 | # safe_arch |
| 4 | |
| 5 | Exposes arch-specific intrinsics as safe function. |
| 6 | |
| 7 | * SIMD types are newtype'd (with a `pub` field) and given appropriate trait |
| 8 | impls such as `From`, `Into`, `Default`, etc. |
| 9 | * Each intrinsic gets either a function or macro so that you can safely use it |
| 10 | as directly as possible. |
| 11 | * Functions are used when all arguments are runtime arguments. |
| 12 | * Macros are used when one of the arguments must be a compile time constant, |
| 13 | because Rust doesn't let you "pass through" compile time constants. |
| 14 | * There's hundreds and hundreds of intrinsics, so the names of functions and |
| 15 | macros tend to be very long and specific because there's often many similar |
| 16 | ways to do nearly the same thing. |
| 17 | * This crate isn't really intended for "everyday users". It is intended to be |
| 18 | an "unopinionated" middle layer crate that just provides the safety. Higher |
| 19 | level abstractions should mostly come from some other crate that wraps over |
| 20 | this crate. |
| 21 | |
| 22 | All function and macro availability is done purely at compile time via |
| 23 | `#[cfg()]` attributes on the various modules. If a CPU feature isn't enabled for |
| 24 | the build then those functions or macros won't be available. If you'd like to |
| 25 | determine what CPU features are available at runtime and then call different |
| 26 | code accordingly, this crate is not for you. |
| 27 | |
| 28 | See the [crate docs](https://docs.rs/safe_arch) for more details. |
| 29 | |
| 30 | ## Additional Resources |
| 31 | |
| 32 | * [Intel Intrinsics Guide](https://software.intel.com/sites/landingpage/IntrinsicsGuide/) |
| 33 | * [Raw Xml v3.5.2](https://software.intel.com/sites/landingpage/IntrinsicsGuide/files/data-3.5.2.xml) and you can check their [release notes](https://software.intel.com/sites/landingpage/IntrinsicsGuide/files/ReleaseNotes.html) to see if a later version has been put out since this readme file was last updated. |