I need to mix together code where one library uses Apple SIMD types such as simd_packed_float4, and another part of the code uses NEON SIMD types such as float32x4_t. I don't want to change the types used in either part, so I need to cast the data types where they interface. This is using the latest Xcode/clang where they appear not to be simple aliases of each other.
Obviously the correct C++ way is to use a memcpy() but I wondered if I had missed another simpler way that wasn't an undefined behaviour cast or lane by lane copying. And thus was better for code generation across debug builds?