I'm new in "parallelization". I'm trying to parallelize an easy code to get a better performance, but I'm having very bad runtimes. here is the code:
#include<iostream>
#include<omp.h>
#include<cstdio>
using namespace std;
double omp_get_wtime(void);
int main(){
const double starttime = omp_get_wtime();
#pragma omp parallel num_threads(10)
{
cout<<"sbam"<<endl;
}
const double endtime = omp_get_wtime();
cout << "work took time: " << endtime-starttime << " s"<<endl;
cout << "work took time: " << (endtime-starttime)*1000000.00 << " mus"<<endl;
return 0;
}
what am I doing wrong?? thank you!!