_mm512_abs_psADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ AVX512
View official documentation
Purpose:
Finds the absolute value of each packed single-precision (32-bit) floating-point element in a, storing the results in output.
Result:
A 512-bit vector of 16 x 32-bit single-precision floating-point numbers that hold the absolute values of the input elements.
Example:
#include <immintrin.h>
#include <stdio.h>
int main() {
float data[16] = {
-1.0f, 2.0f, -3.0f, 4.0f, -5.0f, 6.0f, -7.0f, 8.0f, -9.0f, 10.0f, -11.0f, 12.0f, -13.0f, 14.0f, -15.0f, 16.0f
};
__m512 v2 = _mm512_loadu_ps(data);
__m512 result = _mm512_abs_ps(v2);
float result_data[16];
_mm512_storeu_ps(result_data, result);
for (int i = 0; i < 16; ++i) {
printf("%f ", result_data[i]);
}
printf("\n");
return 0;
}
Prototypes
Assembly Instruction:
vpandd
Usage:
__m512 result =
_mm512_abs_ps(
__m512 a
)
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 |