I want to add pragma statement(s) to the code as well.
//Calculating the product of the matrix
for(int i=0; i<n; i++)
{
for(int j=0;j<n;j++)
{
mat_ans[i][j] = 0;
for (int k = 0; k < n; k++) {
mat_ans[i][j] += (mat_1[i][k] * mat_2[k][j]);
}
}
}
I am trying to make my code as efficient as possible and I've been doing research on how to do this. OpenMP seems like a good option. But I can't seem to get it to work. Any help would be appreciated. I am pretty new to c++11 and am just trying to learn as fast as possible!
Aucun commentaire:
Enregistrer un commentaire