3

I am new to the NEON intrinsics (A9 processor).

I want to convert uint8x16_t to int32x4_t value . I tried to use the vreinterpret_s32_u8 to do so which did not work .

Can anyone please guide me? Really appreciate your help .

Unheilig
  • 16,196
  • 193
  • 68
  • 98
user3476225
  • 240
  • 5
  • 14

1 Answers1

2

8x16 = 128, you need to operate on quad word vectors.

vreinterpret{q}_dsttype_srctype

Where:

q

Specifies that the conversion operates on 128-bit vectors. If it is not present, the conversion operates on 64-bit vectors.

Which should be

int32x4_t vreinterpretq_s32_u8 (uint8x16_t __a)

auselen
  • 27,577
  • 7
  • 73
  • 114
  • sorry my mistake ..i interpret this api as vreinterpret128_s32_u8 instaed of vreinterpretq_s32_u8 .But I simply thought to use vreinterpret .Is it correct as my solution ?? – user3476225 Mar 11 '15 at 14:08
  • @user3476225 This is just a compiler level type safety construct, it shouldn't do any actual instruction level casting. So if it compiles, high chance it will work. Checking disassembly is also a good exercise to see the instruction layout. – auselen Mar 12 '15 at 06:28