diff options
| author | 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> | 2025-02-03 19:13:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-03 19:13:26 +0800 |
| commit | 7be7f3b50ea98293969c8aaf4a0f83d37e5d6063 (patch) | |
| tree | e477360879298067ea4aa33fc08e8a474dcc5e0e | |
| parent | 7daf4cf911c30e48c78f5e155c029397fdd82392 (diff) | |
| parent | baa1cdde2976dbdbe76b194c7032c388da444135 (diff) | |
| download | rust-7be7f3b50ea98293969c8aaf4a0f83d37e5d6063.tar.gz rust-7be7f3b50ea98293969c8aaf4a0f83d37e5d6063.zip | |
Rollup merge of #136356 - pthariensflame:patch-1, r=tgross35
Docs for f16 and f128: correct a typo and add details CC: #116909; corrects and expands #124750.
| -rw-r--r-- | library/core/src/primitive_docs.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index c5f029363e5..bbf5939fe1b 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -1160,9 +1160,9 @@ impl<T> (T,) {} /// /// Note that most common platforms will not support `f16` in hardware without enabling extra target /// features, with the notable exception of Apple Silicon (also known as M1, M2, etc.) processors. -/// Hardware support on x86-64 requires the avx512fp16 feature, while RISC-V requires Zhf. -/// Usually the fallback implementation will be to use `f32` hardware if it exists, and convert -/// between `f16` and `f32` when performing math. +/// Hardware support on x86/x86-64 requires the avx512fp16 or avx10.1 features, while RISC-V requires +/// Zfh, and Arm/AArch64 requires FEAT_FP16. Usually the fallback implementation will be to use `f32` +/// hardware if it exists, and convert between `f16` and `f32` when performing math. /// /// *[See also the `std::f16::consts` module](crate::f16::consts).* /// @@ -1344,10 +1344,10 @@ mod prim_f64 {} /// quad-precision values][wikipedia] for more information. /// /// Note that no platforms have hardware support for `f128` without enabling target specific features, -/// as for all instruction set architectures `f128` is considered an optional feature. -/// Only Power ISA ("PowerPC") and RISC-V specify it, and only certain microarchitectures -/// actually implement it. For x86-64 and AArch64, ISA support is not even specified, -/// so it will always be a software implementation significantly slower than `f64`. +/// as for all instruction set architectures `f128` is considered an optional feature. Only Power ISA +/// ("PowerPC") and RISC-V (via the Q extension) specify it, and only certain microarchitectures +/// actually implement it. For x86-64 and AArch64, ISA support is not even specified, so it will always +/// be a software implementation significantly slower than `f64`. /// /// _Note: `f128` support is incomplete. Many platforms will not be able to link math functions. On /// x86 in particular, these functions do link but their results are always incorrect._ |
