vec_rsqrteADD TO COMPARE ADDED TO COMPARE
IBM Power 9 64-bit (64 bits)/ VSX
View official documentation
Purpose:
Purpose: Returns a vector containing estimates of the reciprocal square roots of the corresponding elements of the source vector.
Result value: Each element of output contains the estimated value of the reciprocal square root of the corresponding element of a.
Endian considerations: None.
Notes: For finite square roots, this intrinsic guarantees at least 14 bits of accuracy.
Result:
vector float
Prototypes
Assembly Instruction:
XVRSQRTESP
Usage:
vector float output =
vec_rsqrte(
vector float a
)
Example:
#include <altivec.h>
#include <stdio.h>
int main() {
vector float a = {
1.0, 1.0, 1.0, 1.0
};
vector float result = vec_rsqrte(a);
float output[4];
vec_st(result, 0, output);
printf("Result: %f %f %f %f\n", output[0], output[1], output[2], output[3]);
return 0;
}
Assembly Instruction:
XVRSQRTEDP
Usage:
vector double output =
vec_rsqrte(
vector double a
)
Example:
#include <altivec.h>
#include <stdio.h>
int main() {
vector double a = {
1.0, 1.0
};
vector double result = vec_rsqrte(a);
double output[2];
vec_st(result, 0, output);
printf("Result: %f %f\n", output[0], output[1]);
return 0;
}
DB statistics
SIMD Engines: | 5 |
C Intrinsics: | 10702 |
NEON: | 4232 |
AVX2: | 462 |
AVX512: | 4955 |
SSE4.2: | 652 |
VSX: | 401 |