[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ohmygod, another round of column/row-major...
- Subject: Re: Ohmygod, another round of column/row-major...
- From: "Scott Lett" <slett(at)holisticmath.com>
- Date: Thu, 4 Mar 1999 21:24:37 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: World Trade Network, Inc.
- References: <firstname.lastname@example.org> <O8INO8eZ#GA.email@example.com> <36DE990B.5136E2EF@bu.edu>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:13835
Yes, Fortran does have array operations, but the concepts of 'row' and
'column' don't really apply. More to the point, Fortran has a +AF8-matrix+AF8-
operation, MATMUL, that assumes that an array is represented by a two
dimensional array in column-major order. For Fortran, this means that a
matrix is accessed as (row, column). Most mathematics texts and papers
index matrices with subscripts in the same order.
The old standard FORTRAN's didn't have array or matrix operations, so it was
up to the people designing FORTRAN matrix/linear algebra software to decide
if they preferred row-major or column-major. According to the LINPACK
Users' Guide, the designers of LINPACK chose column major order (they called
it 'column oriented') to improve performance on 'operating systems with
paging and cache memory.' The authors point out that the BLAS, upon which
LINPACK was based, allow matrices to be accessed by rows instead of columns,
so that a matrix could be represented by a two dimensional array, accessed
as (column, row), but LINPACK works only one way. EISPACK followed the same
convention as LINPACK, and most similar libraries followed this convention.
IDL is not quite Fortran, not quite C.
Flame on, brothers and sisters.
Axel vom Endt +ADw-endt+AEA-bu.edu+AD4- wrote in message
+AD4-Steve Scheele wrote:
+AD4APg- Fortran is column-major, and IDL was originally written in Fortran. I
+AD4APg- that this is the reason that IDL is column-major. However, since Fortran
+AD4APg- no array arithmetic, it seems somewhat irrelevant at this point.
+AD4-Now that's a statement I cannot resist to comment on. Fortran +ACo-does+ACo-
+AD4-have array arithmetic, along with a number of nice features C is
+AD4-lacking. It does have it for nine years now, time to make the news
+AD4-You are not talking about this old thing from 1977 called FORTRAN (all
+AD4-caps), are you? :-)