Manually implemented packed matrix multiplication (couldn't get blas to work...).