| 1 | const print = @import("std").debug.print; |
| 2 | |
| 3 | // emulate punpckldq |
| 4 | pub fn unpack(x: @Vector(4, f32), y: @Vector(4, f32)) @Vector(4, f32) { |
| 5 | const a, const c, _, _ = x; |
| 6 | const b, const d, _, _ = y; |
| 7 | return .{ a, b, c, d }; |
| 8 | } |
| 9 | |
| 10 | pub fn main() void { |
| 11 | const x: @Vector(4, f32) = .{ 1.0, 2.0, 3.0, 4.0 }; |
| 12 | const y: @Vector(4, f32) = .{ 5.0, 6.0, 7.0, 8.0 }; |
| 13 | print("{}", .{unpack(x, y)}); |
| 14 | } |
| 15 | |
| 16 | // exe=succeed |