[理工] 請問資結一題Row/Column major的問題

作者: iloveconic (樂陶陶)   2014-10-26 20:47:34
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算出來的結果不一樣
想在此請問一下是怎麼判定是用Column major的@@
是因為A(3,5)=180
V V 這樣判定的嗎?
A(5,3)=138
A(3,5)=138
↑ 那這樣就是Row major嗎?
A(5,3)=180
麻煩各位了!!
作者: HiltonCool (野獸瘋)   2014-10-26 23:50:00
沒錯!
作者: iloveconic (樂陶陶)   2014-10-27 07:48:00
感謝!

Links booklink

Contact Us: admin [ a t ] ucptt.com