Mail Archives: djgpp/1997/02/18/17:00:15
Errors-To: postmaster AT ns1
From: jesse AT lenny DOT dseg DOT ti DOT com (Jesse Bennett)
Newsgroups: comp.os.msdos.djgpp
Date: 13 Feb 1997 04:12:48 GMT
Organization: Texas Instruments
Lines: 39
References: <Pine DOT LNX DOT 3 DOT 91 DOT 970208044630 DOT 1946B-100000 AT aditya DOT unigoa DOT ernet DOT in>
<5dh4gi$ek9$1 AT superb DOT csc DOT ti DOT com>
<1997Feb12 DOT 130129 DOT 27922 AT indyvax DOT iupui DOT edu>
Reply-To: jbennett AT ti DOT com (Jesse Bennett)
Nntp-Posting-Host: lenny.dseg.ti.com
Mime-Version: 1.0
X-Newsreader: knews 0.9.8
Dj-Gateway: from newsgroup comp.os.msdos.djgpp
Content-Type: text/plain; charset=us-ascii
Content-Length: 2020
In article <1997Feb12 DOT 130129 DOT 27922 AT indyvax DOT iupui DOT edu>,
mwood AT indyvax DOT iupui DOT edu (Mark H. Wood) writes:
> I have to ask: why not simply code the relevant parts of your program in
> Fortran?
Because in my application all of the code is relevant. The truth of
the matter is that I have a huge investment in C code that I don't
want to rewrite. But, I am considering doing just that due to the
lack of portable, high quality and high performance C libraries for
linear algebra. I am currently calling Fortran compiled LAPACK/BLAS
library functions from my C code and the performance is lackluster, to
say the least. The problem is not with the performance of the Fortran
code but with the memory bandwidth overhead associated with converting
the C row-major matrices to the Fortran column-major order prior to
What conversion? The FORTRAN is not converting you arrays. FORTRAN and C
share a common calling convention (ignoring the facts that FORTRAN passes
string lengths and always passes pointers). They just disagree on which
dimension to increment first. You are not inverting the arrays are you? Just
declare the C arrays with the indices reversed and everything will be fine.
This way FORTRAN can see it's columns where C sees rows and both can work
efficiently without copying. Think about it! We combine FORTRAN and C here at
Bloomberg all the time (70% of our code is still in FORTRAN) with C calling
FORTRAN and FORTRAN calling C and none of the problems that you report.
[SNIP]
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -