Efficient 3x3 matrix multiplication using SIMD
Ziggit
Efficient 3x3 matrix multiplication using SIMD
Hi all! I am making a simple matrix math implementation for my own game. I would like to use SIMD and the vector type for these operations. Right now, my 4x4 matrix multiplication is as following: pub const Mat4x4 = [4][4]f32; fn matMul4(m1: Mat4x4, m2: Mat4x4) Mat4x4 { var m3: Mat4x4 = undefined; const Vec = @Vector(4, f32); const m1v: [4]Vec = .{ @as(Vec, m1[0]), @as(Vec, m1[1]), @as(Vec, m1[2]), @as(Vec, m1[3]), }; inline for (0..4) |i| ...
0 comments
No comments yet.