_mm_rsqrt_psADD TO COMPARE ADDED TO COMPARE
Intel 64-bit (64 bits)/ SSE4.2
View official documentation
View Félix Cloutier's documentation
Purpose:
Purpose: Compute the approximate reciprocal square root of packed single-precision (32-bit) floating-point elements in a, and store the results in output. The maximum relative error for this approximation is less than 1.5*2^-12.
Result value:
Endian considerations: None.
Result:
__m128
Example:
#include <xmmintrin.h>
#include <stdio.h>
int main() {
float values[4] = {
4.0f, 9.0f, 16.0f, 25.0f
};
__m128 a = _mm_loadu_ps(values);
__m128 result = _mm_rsqrt_ps(a);
float out[4];
_mm_storeu_ps(out, result);
for (int i = 0; i < 4; i++) {
printf("%f ", out[i]);
}
printf("\n");
return 0;
}
Prototypes
Assembly Instruction:
rsqrtps
Usage:
__m128 result =
_mm_rsqrt_ps(
__m128 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 |