This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

NEON intrinsics vector division and reciprocal functions not found

Hi all,

I am working with a simple sqrt kernel. Code given below at end of post. It calculates the sqrt on a given array and stores it into a new array.

However, when compiling with a  gcc compiler as  - gcc -mcpu=cortex-a53 -mfpu=neon neon_sqrt_kernel.c

I get the following error

neon_sqrt_kernel.c: In function ‘main’:
neon_sqrt_kernel.c:70:12: warning: implicit declaration of function ‘vsqrtq_f32’ [-Wimplicit-function-declaration]
   data_c = vsqrtq_f32(data_a);
            ^~~~~~~~~~
neon_sqrt_kernel.c:70:10: error: incompatible types when assigning to type ‘float32x4_t’ from type ‘int’
   data_c = vsqrtq_f32(data_a);

However, the NEON intrinsics manual clearly indicates that such a function does not exist (https://developer.arm.com/technologies/neon/intrinsics).

Could anyone clarify the above dilemma for me? Why is the above function not declared?

Code

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "arm_neon.h"
/*
* Author : Aketh TM
* This kernel was developed as a part of an effort to test the effectiveness of aligned instructions
* using NEON SIMD Intrinsics
*/
// Preprocessor to check if the arrays are aligned
#define is_aligned(POINTER,BYTE_COUNT) (((uintptr_t)(const void *)(POINTER)) % (BYTE_COUNT) == 0 )
int main (int argc,char** argv)
{
unsigned int n = atoi(argv[1]);
/* Create custom arbitrary data. */
float32_t* float32_data_a;
float32_t* float32_data_b;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

0