_mm512_mul_phADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ AVX512
View official documentation
View Félix Cloutier's documentation
Purpose:
Multiply packed half-precision (16-bit) floating-point elements in "a" and "b", and store the results in "dst".
Result:
__m512h
Example:
#include <immintrin.h>
#include <stdio.h>
int main() {
__m512h a = _mm512_set_ph(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0);
__m512h b = _mm512_set_ph(2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0);
__m512h r = _mm512_mul_ph(a, b);
_Float16* res = (_Float16*)&r;
for (int i = 0; i < 32; ++i)
printf("%f ", (float)res[i]);
return 0;
}
Prototypes
Assembly Instruction:
VMULPH
Usage:
__m512h result =
_mm512_mul_ph(
__m512h a, __m512h b
)
Performance Metrics:
📊 Unlock Performance Insights
Get access to detailed performance metrics including latency, throughput, and CPU-specific benchmarks for this intrinsic.
SIMD Intrinsics Summary
| SIMD Engines: | 6 |
| C Intrinsics: | 10444 |
| NEON: | 4353 |
| AVX2: | 405 |
| AVX512: | 4717 |
| SSE4.2: | 598 |
| VSX: | 192 |
| IBM-Z: | 179 |