.cargo/vendor/simd_helpers/README.md
raw| 1 | # Helpers to write more compact simd code |
| 2 | |
| 3 | ## Implemented so far |
| 4 | - [x] `cold_for_target_arch` mark a function cold for certain arches only |
| 5 | - [ ] `cold_for_target_feature` |
| 6 | |
| 7 | ## Example |
| 8 | ``` toml |
| 9 | [dependencies] |
| 10 | simd_helpers = "0.1" |
| 11 | ``` |
| 12 | ``` rust |
| 13 | use simd_helpers::cold_for_target_arch; |
| 14 | |
| 15 | // On arm and power it is the main, impl for x86_64 there is a asm-optimized variant |
| 16 | #[cold_for_target_arch("x86_64")] |
| 17 | fn fallback_simple_impl() { ... } |
| 18 | ``` |