25.06.2015 Views

clause

clause

clause

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

仅 基 于 Parallel 块 结 构 的 并 行 程 序<br />

#include #include"stdio.h"<br />

main(int main(intargc, argc, char char *argv[]){ *argv[]){<br />

…<br />

n n = atoi(argv[1]);<br />

w = 1.0 1.0 //(double) (double) n; n;<br />

sum sum = 0.0; 0.0;<br />

#pragma #pragmaomp ompparallel parallel private(x) shared(w) reduction(+:sum)<br />

{{<br />

myid myid = omp_get_thread_num();<br />

numthreads = omp_get_num_threads();<br />

for(i=myid;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!