看板 Grad-ProbAsk 關於我們 聯絡資訊
一、What is the address for a[5][3] for an array declared as a[7][8]? Assume a row major ordering, 10 units of memory per element, and staring address is 1000. 二、Given A as an N by N array(N>=2) with A[i,j]=0 if |i-j|>2. Then, determine the maximal number of nonzero elements in A. 三、另外想請問一下row/column-major 到底怎麼判斷會比較準? ex1: A(0,5)=36 A(1,4)=56 A(2,7)=92 是row-major嗎? ex2: B(2,3)=18 B(3,2)=28 A(1,1)=2 是row-major嗎? 以上請賜教,感謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.57.105.22
assassin88:我也想知道= =" 12/16 23:34
wassili:判斷哪個MAJOR把矩陣畫出來就很明顯了 12/16 23:47
ssccg:所謂major就是對位址變化的影響比較major 12/17 20:46
ssccg:ex1前兩個比,row變大、column變小,位址增加,就row-major 12/17 20:48