| 2 | #include<omp.h> |
| 3 | #include<unistd.h> |
| 4 | double sum(double a[],int start,int end) |
| 5 | { |
| 6 | int i; |
| 7 | double sum; |
| 8 | for(i=start;i<end;i++) |
| 9 | sum += a[i]; |
| 10 | return sum; |
| 11 | } |
| 12 | void complexcompute(int N){ |
| 13 | //do a lot work used_time imblance accord to C |
| 14 | usleep(10000*N); |