Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!agate!ig!uwmcsd1!bbn!rochester!PT.CS.CMU.EDU!IUS1.CS.CMU.EDU!edw From: edw@IUS1.CS.CMU.EDU (Eddie Wyatt) Newsgroups: comp.arch Subject: Re: RISC is a nasty no-no! Message-ID: <998@PT.CS.CMU.EDU> Date: 29 Feb 88 19:15:12 GMT References: <179@wsccs.UUCP: <696@nuchat.UUCP> <284@scdpyr.UUCP> <11199@duke.cs.duke.edu> Sender: netnews@PT.CS.CMU.EDU Organization: Carnegie-Mellon University, CS/RI Lines: 15 > > Multiplication is not necessary to access 2-D arrays if the array is > set up like most arrays in C, where each row is a typical vector and > the 2-D array is just a vector of pointers to each row vector. EXCUSE ME, but when I declare an array to be an n by m matrix in C (float foo[n][m]) I get a contiguous block of memory. The representation IS NOT row-vector or column-vector. So when I access index number i,j someone has to perform the calculation base + sizeof(type)*(i*m+j). -- Eddie Wyatt e-mail: edw@ius1.cs.cmu.edu