Reputation: 19
"vld1q_u16_x2" existing in <arm_neon.h> is not available in Jetson Xavier (ARMv8.2). An example code is the same as the attached code. I've tried the code on M1, A53, and A72 and it all works fine.
However, Jetson Xavier gives the following warnings and errors: "warning: implicit declaration of function 'vld1q_u16_x2'" and "error: incompatible types when assigning to type 'uint16x8x2_t {aka struct uint16x8x2_t}' from type 'int'. src1 = vldlq_u16_x2(&origin)" .
Does ARMv8.2 not support this instruction? we would like to know a solution for this.
#include <arm_neon.h>
int main()
{
uint16x8x2_t src1, src2;
uint16_t origin = 0x33;
src1 = vld1q_u16_x2(&origin);
return 0;
}
Upvotes: 0
Views: 2188
Reputation: 17502
It's not really about ARMv8.2, it's GCC. GCC's 32-bit arm_neon.h is currently missing quite a few functions which are supposed to be there.
These are a fairly recent addition to clang as well; they weren't available there before version 9.
AArch64 support on GCC tends to be better; a lot of these functions are present in GCC's 64-bit arm_neon.h, though they should really be present in both. Last time I looked there were a handful of functions present in 32-bit mode but missing from the 64-bit headers, a handful of functions missing from both 32-bit and 64-bit, but a few dozen function present in 64-bit but missing in 32-bit.
FWIW, the situation on the clang side is better; they are only missing a few functions... if you can use clang instead, that may be a good option.
Upvotes: 1
Reputation: 6354
All those x2/x3/x4
suffices aren't supported in aarch32
mode regardless of the toolchain even though it would be very well possible since ARM32 neon has appropriate instructions.
You should limit the target to aarch64
.
It is stupid, and NEON intrinsics badly needs a revamp: there's no vtbl1q
, vtbl2q
, vtbl3q
, and vtbl4q
even though ARM64 has tbl/tbx
instructions that accept 128bit vectors.
MS Visual Studio already comes with its own(?) arm64_neon.h
that supports all those above.
PS: 걍 어셈블리로 짜세요.
Upvotes: 0