討論串[問題] openmp初心者問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者wope (獨立黑色色彩)時間13年前 (2012/12/23 07:31), 編輯資訊
0
0
0
內容預覽:
//這裡是說我準備好了兩個執行緒//這裡分給第一個如果是我會這樣寫(手動拆兩個). int test1=0;. int test2=1;. #pragma omp parallel sections num_threads(2) //準備好了兩個執行緒. {. #pragma omp section
(還有633個字)

推噓1(1推 0噓 3→)留言4則,0人參與, 最新作者topwing (Levin)時間13年前 (2012/12/21 12:40), 編輯資訊
0
0
0
內容預覽:
int i;. #pragma omp threadprivate(i) //讓平行區域裡每個執行緒都有一個i的獨立複本. int main(). {. #pragma omp parallel num_threads(2). while(i <10) {. printf("%d test:%d\n

推噓4(4推 0噓 9→)留言13則,0人參與, 最新作者scott20144 (DaYo)時間13年前 (2012/12/20 16:52), 編輯資訊
0
0
0
內容預覽:
我想請問一下. 實在試了很久,只好上來問... int test=0;. #pragma omp parallel num_threads(2). {. while(test <10){. printf("%d test:%d\n",omp_get_thread_num(),test);. test
(還有130個字)
首頁
上一頁
1
下一頁
尾頁