Data type compatibility with NEON intrinsics

后端 未结 5 1017
轻奢々
轻奢々 2021-01-03 05:26

I am working on ARM optimizations using the NEON intrinsics, from C++ code. I understand and master most of the typing issues, but I am stuck on this one:

The instru

5条回答
  •  忘掉有多难
    2021-01-03 05:54

    I have found a workaround: given that the val member of the uint8x8x2_t type is an array, it is therefore seen as a pointer. Casting and deferencing the pointer works ! [Whereas taking the address of the data raises an "address of temporary" warning.]

    uint16x8_t Value= *(uint16x8_t*)vzip_u8(arg0, arg1).val;
    

    It turns out that this compiles and executes as should (at least in the case I have tried). I haven't looked at the assembly code so I cannot grant it is implemented properly (I mean just keeping the value in a register instead of writing/read to/from memory.)

提交回复
热议问题