_mm_set1_phADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ AVX512
View official documentation
Purpose:
Broadcast half-precision (16-bit) floating-point value "a" to all elements of "dst".
Result:
__m128h
Example:
#include <stdio.h>
#include <immintrin.h>
int main() {
_Float16 value = 42.0f;
__m128h result = _mm_set1_ph(value);
_Float16 output[8];
_mm_storeu_ph(output, result);
printf("Input value: %.1f\n", (float)value);
printf("Result vector: {
");
for(int i = 0; i < 7; i++) {
printf("%.1f, ", (float)output[i]);
}
printf("%.1f
}
\n", (float)output[7]);
return 0;
}
Prototypes
Assembly Instruction:
SEQUENCE
Usage:
__m128h result =
_mm_set1_ph(
float16_t a
)
SIMD Intrinsics Summary
| SIMD Engines: | 6 |
| C Intrinsics: | 10444 |
| NEON: | 4353 |
| AVX2: | 405 |
| AVX512: | 4717 |
| SSE4.2: | 598 |
| VSX: | 192 |
| IBM-Z: | 179 |