[問題] 東吳考古-化簡程式

看板TransCSI作者 (紐愛銅管分部首席)時間17年前 (2007/06/05 23:26), 編輯推噓2(201)
留言3則, 3人參與, 最新討論串1/1
Assuming the 2-dimensional matrix is stored in memory using row-major order. To improve the performance of the matrix multiplication, what can you do to the following algorithm to make it run faster ? Assuming c=a*b for(i = 0 ; i < n ; i ++ ) for(j = 0 ; j < n ; j ++) for(k = 0 ; k < n ; k ++) c[i][j] += a[i][k] * b[k][j] 小弟只知道拆成2個 2個的for迴圈 (還是有別的解法?) 但不知道要怎樣下手.... 麻煩各為大大了m(__ __)m -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.223.194.17

06/06 02:20, , 1F
完全看不懂題目呀,您還是打上來或者給連結吧
06/06 02:20, 1F

06/06 07:05, , 2F
如果用 SIMD 讓他跑更快可以嗎 XD
06/06 07:05, 2F
※ 編輯: XrGodz 來自: 61.229.21.41 (06/06 10:03)

06/06 12:44, , 3F
我覺得也是拆成2個 2個for迴圈這樣跑比較快
06/06 12:44, 3F
文章代碼(AID): #16PO2UhV (TransCSI)