Multi-threaded matrix multiplication