Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm
From: Ron Shepard (ron-shepard_at_NOSPAM.comcast.net)
Date: 02/14/05
- Next message: Cheng Cosine: "? code for solving linear equations with matrix coefs"
- Previous message: Ron Shepard: "Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm"
- In reply to: glen herrmannsfeldt: "Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm"
- Next in thread: Ron Shepard: "Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 13 Feb 2005 23:53:27 -0600
In article <d_6dnXmi_Nh1io3fRVn-vw@comcast.com>,
glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote:
> If you have a matrix with one row per line in a file, and columns
> on successive lines, and read it in using either list directed or
> formatted input in the natural Fortran ordering, which is row and which
> is column?
While this is true, it has nothing to do with DGEMM or with most
mathematical subroutines. A typical mathematical subroutine might
consist of dozens or hundreds of lines involving array subscripts
but not a single I/O operation on them. The C convention might
appear simpler for that rare I/O statement, but the fortran
convention is simpler for those dozens or hundreds of lines of code
that are actually doing the work. And if you are debugging the
code, is is almost certainly not an I/O operation that is the
problem.
I fairly seldom make mistakes getting fortran array indices
interchanged when I write code. I won't say it is never, but it is
rare. However, when I write C or Mathematica code, both of which
use the backward array index conventions, it is almost a coin toss
whether I get it right or not the first time. The reason is that it
just doesn't match up with the mathematics that I'm usually trying
to do. It is not just a matter of switching row and column indices,
it is also a question of which conventions the various subprograms
and built-in functions use. I've been programming C for over 20
years and Mathematica for about 15 years, so you might think I'd
catch on eventually, but the fact that I don't is evidence of a
serious design flaw in those languages for doing standard
mathematical operations.
$.02 -Ron Shepard
- Next message: Cheng Cosine: "? code for solving linear equations with matrix coefs"
- Previous message: Ron Shepard: "Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm"
- In reply to: glen herrmannsfeldt: "Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm"
- Next in thread: Ron Shepard: "Re: dgemm subroutine in BLAS - I think I've cracked the difference, please confirm"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|