#include #include #include #include #define BLOCK_SIZE 500 int main(){ struct timeval TimeStampStart, TimeStampStop; double ExeTime; unsigned int iter=200000000; int i, j; double x, y; double dUnderCurve=0.0; double pi=0.0; double r[BLOCK_SIZE*2]; //Careful!!! //you need a private copy of whole array for each thread srand((unsigned)time(NULL)); gettimeofday(&TimeStampStart, NULL); for(j=0; j