Archives


- Beowulf
- Beowulf Announce
- Scyld-users
- Beowulf on Debian

[Beowulf] Stroustrup regarding multicore

Many of your questions may have already been answered in earlier discussions or in the FAQ. The search results page will indicate current discussions as well as past list serves, articles, and papers.

Search

Bernd Schubert bernd.schubert at fastmail.fm
Tue Aug 26 09:01:40 PDT 2008


On Tuesday 26 August 2008 16:38:11 Michael H. Frese wrote:
> Vincent,
>
> I have always said that C++ is computational science's cold fusion:
> lots of power in, but no net gain.
>
> C is not much better.  I once worked a young computational programmer
> for almost a week to get him to prove to himself that a C source
> program couldn't walk through a 2-d array the hard way as fast as a
> Fortran source program unless the stepping was coded by hand. He
> didn't believe that a 2-d array in C is syntactically a 1-d array of
> pointers to 1-d arrays, and the row pointers must be fetched from

What for this trouble? Using n-d arrays with malloc is by far more difficult 
to handle than a 1-d array with wrapper macros/inline-functions calculating 
the index offset. This way you can also use the fortran array order to be 
perfectly compatible to existing fortran libraries.

> memory!  And separate compilation of functions with variable array
> dimensions?  I hear echoes of Kernighan and Ritchie laughing with
> each other "We don't need no steenking libraries with execution-time
> array dimensioning!  We're system programmers here!  Besides, if
> somebody needs that they'll use Fortran."

Huh? Your function gets a pointer to an array. You can resize this array any 
time. And please don't tell me, you are using static memory.


Bernd




More information about the Beowulf mailing list