Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lokathor/safe_arch
Exposes arch-specific intrinsics as safe function (via cfg).
https://github.com/lokathor/safe_arch
intrinsics rust zlib-license
Last synced: about 14 hours ago
JSON representation
Exposes arch-specific intrinsics as safe function (via cfg).
- Host: GitHub
- URL: https://github.com/lokathor/safe_arch
- Owner: Lokathor
- License: apache-2.0
- Created: 2020-04-27T20:06:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-30T22:12:04.000Z (5 months ago)
- Last Synced: 2024-10-16T05:21:54.384Z (2 months ago)
- Topics: intrinsics, rust, zlib-license
- Language: Rust
- Homepage: https://docs.rs/safe_arch
- Size: 325 KB
- Stars: 47
- Watchers: 5
- Forks: 8
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE.md
Awesome Lists containing this project
README
# [Docs.rs](https://docs.rs/safe_arch)
# safe_arch
Exposes arch-specific intrinsics as safe function.
* SIMD types are newtype'd (with a `pub` field) and given appropriate trait
impls such as `From`, `Into`, `Default`, etc.
* Each intrinsic gets either a function or macro so that you can safely use it
as directly as possible.
* Functions are used when all arguments are runtime arguments.
* Macros are used when one of the arguments must be a compile time constant,
because Rust doesn't let you "pass through" compile time constants.
* There's hundreds and hundreds of intrinsics, so the names of functions and
macros tend to be very long and specific because there's often many similar
ways to do nearly the same thing.
* This crate isn't really intended for "everyday users". It is intended to be
an "unopinionated" middle layer crate that just provides the safety. Higher
level abstractions should mostly come from some other crate that wraps over
this crate.All function and macro availability is done purely at compile time via
`#[cfg()]` attributes on the various modules. If a CPU feature isn't enabled for
the build then those functions or macros won't be available. If you'd like to
determine what CPU features are available at runtime and then call different
code accordingly, this crate is not for you.See the [crate docs](https://docs.rs/safe_arch) for more details.
## Additional Resources
* [Intel Intrinsics Guide](https://software.intel.com/sites/landingpage/IntrinsicsGuide/)
* [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.