How to compile with neon acceleration?

I want to port some neon instructions to accelerate my code.
can anyone show me some examples how to use neon in VIM3?
I tried adding -mfpu=neon, but failed in platform gcc.

Thanks,
-Tiger

btw, I am using ubuntu VIM3 system.

pls show any errors, its better to use intrinsics for implementing NEON instructions, please do read upon this forum post:
https://community.arm.com/developer/tools-software/tools/f/armds-forum/2855/how-to-compile-neon-instruction-on-linux-using-gnu-assembler-and-gnu-compiler

1 Like

thanks for your reply.
Here is command line with g++ system provided:
g++ -std=c++11 -mcpu=cortex-a73 -mfpu=neon -c test.cpp

and error as below :
g++: error: unrecognized command line option ‘-mfpu=neon’

pls check this post:

1 Like

also see here ARM Options (Using the GNU Compiler Collection (GCC)) for all the compiler options and what you can enable in combination with what

2 Likes