看板 TransCSI 關於我們 聯絡資訊
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
stevennick:完全看不懂題目呀,您還是打上來或者給連結吧 06/06 02:20
ccpz:如果用 SIMD 讓他跑更快可以嗎 XD 06/06 07:05
※ 編輯: XrGodz 來自: 61.229.21.41 (06/06 10:03)
Daiblo2:我覺得也是拆成2個 2個for迴圈這樣跑比較快 06/06 12:44