mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-20 02:43:45 +00:00
This commit is contained in:
parent
656312e33c
commit
fdfbf7c68b
@ -33,7 +33,7 @@ SIMD has a few special vocabulary terms you should know:
|
||||
|
||||
When using SIMD, you should be familiar with the CPU feature set that you're targeting.
|
||||
|
||||
On `arm` and `aarch64` it's fairly simple. There's just one CPU feature that controls if SIMD is available: `neon` (or "NEON", all caps, as the ARM docs often put it). Neon registers are 128-bit, but they can also operate as 64-bit (the high lanes are just zeroed out).
|
||||
On `arm` and `aarch64` it's fairly simple. There's just one CPU feature that controls if SIMD is available: `neon` (or "NEON", all caps, as the ARM docs often put it). Neon registers can be used as 64-bit or 128-bit. When doing 128-bit operations it just uses two 64-bit registers as a single 128-bit register.
|
||||
|
||||
> By default, the `aarch64`, `arm`, and `thumb` Rust targets generally do not enable `neon` unless it's in the target string.
|
||||
|
||||
@ -42,6 +42,8 @@ On `x86` and `x86_64` it's slightly more complicated. The SIMD support is split
|
||||
* 256-bit (mostly): `avx`, `avx2`, `fma`
|
||||
* 512-bit (mostly): a *wide* range of `avx512` variations
|
||||
|
||||
The list notes the bit widths available at each feature level, though the operations of the more advanced features can generally be used with the smaller register sizes as well. For example, new operations introduced in `avx` generally have a 128-bit form as well as a 256-bit form. This means that even if you only do 128-bit work you can still benefit from the later feature levels.
|
||||
|
||||
> By default, the `i686` and `x86_64` Rust targets enable `sse` and `sse2`.
|
||||
|
||||
### Selecting Additional Target Features
|
||||
|
Loading…
Reference in New Issue
Block a user