| |||

Home > Using NEON Support > Vector reinterpret cast operations |

In some situations, you might want to treat a vector as having a different type, without changing its value. A set of intrinsics is provided to perform this type of conversion.

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.

`dsttype`

Represents the type to convert to.

`srctype`

Represents the type being converted.

The following intrinsic reinterprets a vector of four signed 16-bit integers as a vector of four unsigned integers:

uint16x4_t vreinterpret_u16_s16(int16x4_t a);

The following intrinsic reinterprets a vector of four 32-bit floating point values integers as a vector of four signed integers.

int8x16_t vreinterpretq_s8_f32(float32x4_t a);

These conversions do not change the bit pattern represented by the vector.