# Intrinsics for Converting Half Floats that Map to 3rd Generation Intel® Core™ Processor Instructions

There are four intrinsics for converting the half-float values.

To use these intrinsics, include the immintrin.h file as follows:

    #include <immintrin.h>

These intrinsics convert packed half-precision values starting from the first CPUs with the Intel® AVX instructions support that do not really have any special instructions performing FP16 conversions. Therefore, the intrinsics are lowered to runtime library function calls and map to 3rd Generation Intel® Core™ Processor instructions only when such a processor is specified as target CPU using the -Qx<CPU>/-x<CPU> option, where <CPU> is the name of a CPU with support of 3rd Generation Intel® Core™ Processor Instruction Extensions.

Parent topic: Intrinsics for Later Generation Intel® Core™ Processor Instruction Extensions

- _mm_cvtph_ps()
  Converts four half-precision (16-bit) floating point values to single-precision floating point values. The corresponding 3rd Generation Intel® Core™ Processor extension instruction is `VCVTPH2PS`.
- _mm256_cvtph_ps()
  Converts eight half-precision (16-bit) floating point values to single-precision floating point values. The corresponding 3rd Generation Intel® Core™ Processor extension instruction is `VCVTPH2PS`.
- _mm_cvtps_ph()
  Converts four single-precision floating point values to half-precision (16-bit) floating point values. The corresponding 3rd Generation Intel® Core™ Processor extension instruction is `VCVTPS2PH`.
- _mm256_cvtps_ph()
  Converts eight single-precision floating point values to half-precision (16-bit) floating point values. The corresponding 3rd Generation Intel® Core™ Processor extension instruction is `VCVTPS2PH`.

## See Also

Intrinsics for Converting Half Floats