[問題] openmp for loop 多迴圈 parallel

看板C_and_CPP作者 (明天會更好)時間11年前 (2014/06/20 03:47), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/2 (看更多)
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) Linus 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) 問題(Question): for(int i = 0; i<N; i++){ for(int j = i+1; j<N; j++){ for(int k = j+1; k<N; k++){ for(int l = k+1; l<N; l++){ //parallelize this code here } } } } 單層用簡單的#pragma omp parallel for就是以做到平行化, 想請教如何用openmp 進行多層for loop的平行化 感謝 餵入的資料(Input): 預期的正確結果(Expected Output): 錯誤結果(Wrong Output): 程式碼(Code):(請善用置底文網頁, 記得排版) 補充說明(Supplement): -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 128.146.238.73 ※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1403207249.A.098.html

06/20 12:36, , 1F
collapse ?
06/20 12:36, 1F
文章代碼(AID): #1JepvH2O (C_and_CPP)
文章代碼(AID): #1JepvH2O (C_and_CPP)