vsqrtq_f32ADD TO COMPARE ADDED TO COMPARE
Arm 64-bit (64 bits)/ NEON
View official documentation
Location:
Math Functions
>
Vector Square Root
Purpose:
Floating-point Square Root (vector). This instruction calculates the square root for each vector element in the source SIMD&FP register, places the result in a vector, and writes the vector to the destination SIMD&FP register.
Result:
float32x4_t
Example:
#include <stdio.h>
#include <arm_neon.h>
int main() {
float arr[4] = {
4.0f, 9.0f, 16.0f, 25.0f
};
float32x4_t vec = vld1q_f32(arr);
float32x4_t result = vsqrtq_f32(vec);
float res_arr[4];
vst1q_f32(res_arr, result);
printf("Square roots:\n");
for (int i = 0; i < 4; i++) {
printf("%f\n", res_arr[i]);
}
return 0;
}
Prototypes
Assembly Instruction:
FSQRT
Usage:
float32x4_t output =
vsqrtq_f32(
float32x4_t a
)
DB statistics
SIMD Engines: | 5 |
C Intrinsics: | 10702 |
NEON: | 4232 |
AVX2: | 462 |
AVX512: | 4955 |
SSE4.2: | 652 |
VSX: | 401 |