Please enter what you're looking for to continue your search
 

_mm256_set1_ph
ADD TO COMPARE ADDED TO COMPARE

 Intel 64-bit (64 bits)/ AVX512  View official documentation
 Location: Get-Set  >  Vector Duplicate Scalar to All Elements
 CPU Extensions: AVX512_FP16
Purpose:

Broadcast half-precision (16-bit) floating-point value "a" to all elements of "dst".

Result:

__m256h

Example:
#include <stdio.h>
#include <immintrin.h>
int main() {
 _Float16 value = 42.0f;
 __m256h result = _mm256_set1_ph(value);
 _Float16 output[16];
 _mm256_storeu_ph(output, result);
 printf("Input value: %.1f\n", (float)value);
 printf("Result vector: {
  ");
  for(int i = 0; i < 15; i++) {
    printf("%.1f, ", (float)output[i]);
   }
   printf("%.1f
  }
  \n", (float)output[15]);

  return 0;
 }

Prototypes

Assembly Instruction:
SEQUENCE
Usage:
__m256h result = _mm256_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