[請問] 請問一題Row/Column major的問題已回收

看板ask (問板)作者 (樂陶陶)時間11年前 (2014/10/26 20:02), 11年前編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
Assume in a byte machine. A is an array declared as A[-1:m, 2:n] and each element occupied 3 bytes. The address of A[3,5] ia at 180 and A[5,3] is at 138. Find the address of the element A[-1,2] 這題想不太出來 我用Row major和Column major算出來的結果不一樣,請問要怎麼判定呢? 還請各位替小弟解惑~謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.169.114.214 ※ 文章網址: http://www.ptt.cc/bbs/ask/M.1414324942.A.EFD.html ※ 編輯: iloveconic (118.169.114.214), 10/26/2014 20:29:44

10/26 20:37, , 1F
96,先看算式求m,再看表格。 http://ppt.cc/5j8r
10/26 20:37, 1F
感謝你的回答~想在此請問一下是怎麼判定是用Column major的@@ 再次麻煩您了!!

10/26 20:52, , 2F
我是猜說記憶體從低址開始分配,不是很確定@@
10/26 20:52, 2F
了解~感謝您! ※ 編輯: iloveconic (118.169.114.214), 10/26/2014 20:55:45
文章代碼(AID): #1KJEBExz (ask)
文章代碼(AID): #1KJEBExz (ask)