Relative Content

Tag Archive for cmatrix-multiplicationintrinsicsavx

Using SIMD To Parallelize Matrix Multiplication For A 4×4, Row-Major Matrix

I am currently facing an extremely hard time trying to parallelize a 4×4 matrix-multiplication algorithm. I am trying to make a library to use in a minimal raytracer project for school, so I’m trying to make its conventions as user-friendly as possible, which is why I chose to store matrices in a row-major order, as that seemed more intuitive for most people I asked. However, this poses an issue, as a lot of parallelization strategies require column extraction (for dot-product simplifications), and I’m facing a very hard time trying to even think in parallel… Here’s my current matrix-multiplication code (with some missing parts) for computing the matrix product of two 4×4 matrices (row-major).