Matrix multiplication with OpenMP parallel for loop
There is a real problem with your code in that you pass the matrices by copy.

Matrix parallel_mat_mul(Matrix a, Matrix b)


This should really be either passed by reference

Matrix parallel_mat_mul(const Matrix&amp; a, const Matrix&amp; b)


Or implemented through an operator of the Matrix class

operator+(const Matrix&amp; other) const


Nevertheless to better judge this function one would need the implementation of Matrix