Threaded matrix multiplication implementation in C.