diff options
| author | Ekaterina Romanova <katya_romanova@playstation.sony.com> | 2016-11-20 08:35:05 +0000 |
|---|---|---|
| committer | Ekaterina Romanova <katya_romanova@playstation.sony.com> | 2016-11-20 08:35:05 +0000 |
| commit | bf667b21acb70bba927e0e18a0bd8ca48927f8f0 (patch) | |
| tree | fff0147974731c8e42e36e0d8f508d15c0007446 | |
| parent | f258ff1fa9d926519c8b0cbb159d39b89dd1437f (diff) | |
| download | bcm5719-llvm-bf667b21acb70bba927e0e18a0bd8ca48927f8f0.tar.gz bcm5719-llvm-bf667b21acb70bba927e0e18a0bd8ca48927f8f0.zip | |
Add doxygen comments to immintrin.h's intrinsics.
The doxygen comments are automatically generated based on Sony's intrinsics docu
ment.
I got an OK from Eric Christopher to commit doxygen comments without prior code
review upstream. This patch was internally reviewed by Charles Li.
llvm-svn: 287483
| -rw-r--r-- | clang/lib/Headers/immintrin.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h index 4b2752353d6..a91d164be98 100644 --- a/clang/lib/Headers/immintrin.h +++ b/clang/lib/Headers/immintrin.h @@ -69,9 +69,44 @@ Intel documents these as being in immintrin.h, and they depend on typedefs from avxintrin.h. */ +/// \brief Converts a 256-bit vector of [8 x float] into a 128-bit vector +/// containing 16-bit half-precision float values. +/// +/// \headerfile <x86intrin.h> +/// +/// \code +/// __m128i _mm256_cvtps_ph(__m256 a, const int imm); +/// \endcode +/// +/// This intrinsic corresponds to the \c VCVTPS2PH instruction. +/// +/// \param a +/// A 256-bit vector containing 32-bit single-precision float values to be +/// converted to 16-bit half-precision float values. +/// \param imm +/// An immediate value controlling rounding using bits [2:0]: +/// 000: Nearest +/// 001: Down +/// 010: Up +/// 011: Truncate +/// 1XX: Use MXCSR.RC for rounding +/// \returns A 128-bit vector containing the converted 16-bit half-precision +/// float values. #define _mm256_cvtps_ph(a, imm) __extension__ ({ \ (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)(__m256)(a), (imm)); }) +/// \brief Converts a 128-bit vector containing 16-bit half-precision float +/// values into a 256-bit vector of [8 x float]. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the \c VCVTPH2PS instruction. +/// +/// \param __a +/// A 128-bit vector containing 16-bit half-precision float values to be +/// converted to 32-bit single-precision float values. +/// \returns A vector of [8 x float] containing the converted 32-bit +/// single-precision float values. static __inline __m256 __attribute__((__always_inline__, __nodebug__, __target__("f16c"))) _mm256_cvtph_ps(__m128i __a) { |

