Open
Description
Some intrinsics on NEON like vtrnq_u8
have a nonstandard return type like uint8x16x2_t
defined as:
typedef struct uint8x16x2_t {
uint8x16_t val[2];
} uint8x16x2_t;
How should we best represent this in Rust? A few possible options are:
unsafe fn vtrnq_u8(a: uint8x16_t, b: uint8x16_t) -> uint8x16x2_t;
- aka we define the struct w/ pub fields in Rust like with thelibc
crateunsafe fn vtrnq_u8(a: uint8x16_t, b: uint8x16_t) -> [uint8x16_t; 2]
unsafe fn vtrnq_u8(a: uint8x16_t, b: uint8x16_t) -> (uint8x16_t; uint8x16_6)
I'd sort of lean towards the last one, but it also depends on how "flavorful" the return types get!