C++ books I have found useful
C++ Programming Language Third Edition, Bjarne Stroustrup
Advanced C++ Programming Styles and Idioms, James O. Coplien
Effective C++ Second Edition, Scott Meyers
C++ Coding Standards, Herb Sutter and Andrei Alexandrescu
Exceptional C++, Herb Sutter
Hello,
IMHO, it is better to call the BLAS or similiar libarary rather than programing
you own functions. And CUDA treats the GPU as a cluster, so .CU is not working
as our normal codes. If you have got to many matrix or vector computation, it
is better to use Brook+/CAL, which can show great po
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
> I don't know how much of current compiler design was bent by Intel's
> original segmented memory model. They had code data stack and extra (or
> something like that -- but I recall EX,SX,DX, and CX). But then
> motorola's memory model was flat inst
On Tue, 26 Aug 2008, Perry E. Metzger wrote:
There are a load of weird things out there that don't look like
this. Have a gander at Palm's operating system for their handhelds
sometime -- or the original Mac OS.
If/when I can get such a gander and have time to take it, I will...;-)
I don't kn
On Tue, 26 Aug 2008, Perry E. Metzger wrote:
Ah. You're not talking about using a C array as a C array any
more. You're talking about using it as a data structure to represent an
arbitrary matrix structure. In that case you will find C programmers
doing all sorts of games, of course, and I don't
Perry E. Metzger wrote:
Gerry Creager <[EMAIL PROTECTED]> writes:
They may or may not have sufficient computer science training when
they started, and they may or may not get formal training in the
course of their degree process, but don't discount the computer
science training they acquired alo
Gerry Creager <[EMAIL PROTECTED]> writes:
> They may or may not have sufficient computer science training when
> they started, and they may or may not get formal training in the
> course of their degree process, but don't discount the computer
> science training they acquired along the way.
I've
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
> On Tue, 26 Aug 2008, Perry E. Metzger wrote:
>> "Robert G. Brown" <[EMAIL PROTECTED]> writes:
>>> I think that matrix allocation per se is contiguous because of how and
>>> where it occurs at the compiler level. Immediate matrices allocated
>>> like
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
> On Tue, 26 Aug 2008, Perry E. Metzger wrote:
>
>>> Perhaps, but don't most C programmers allocate such an array as a single
>>> vector and then repack the indices?
>>
>> I've never seen anyone allocate "as a single vector and repack the
>> indices",
Ed Hill wrote:
On Tue, 26 Aug 2008 14:29:11 -0400 "Perry E. Metzger" wrote:
I think part of the issue is that most people doing scientific
computing don't have computer science backgrounds, which is a
shame.
Formal CS training can certainly help but I don't view it as a
requirement. I've met
"David Mathog" <[EMAIL PROTECTED]> writes:
> Alan Louis Scheinine <[EMAIL PROTECTED]> wrote:
>> I forgot to mention, function calls in Fortran, C or C++ seem to kill
> efficiency,
>
> That's pretty much true for any language when those calls are inside
> inner loops. There are exceptions though -
On Tue, 26 Aug 2008, Perry E. Metzger wrote:
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
I think that matrix allocation per se is contiguous because of how and
where it occurs at the compiler level. Immediate matrices allocated
like a[10][10] are just translated into displacements relative
"Michael H. Frese" <[EMAIL PROTECTED]> writes:
> My first comment had nothing to do with whether C's 2-d arrays are
> allocated contiguously in memory. I assume that they are, as was
> implicit in my remark about "doing the stepping by hand."
That was not what I got from your comment, but I'll t
On Tue, 26 Aug 2008, Ed Hill wrote:
And I don't mean to sound like a cheezy motivational speaker but
if each of us is willing to study the texts a bit, read others' code,
and learn-by-doing then I don't think there is anything that prevents us
from becoming capable programmers. Or engineers. O
Perry,
My first comment had nothing to do with whether C's 2-d arrays are
allocated contiguously in memory. I assume that they are, as was
implicit in my remark about "doing the stepping by hand."
My comment has to do with the assembly code that the C compiler
generates to access an element
Robert G. Brown wrote:
Any nontrivial program is
already almost by definition difficult to debug. Any nontrivial program
using multiple compilers or languages had damn well better have complete
separation at the shell level or debugging will go from difficult to
insanely difficult, really quickl
On Tue, 26 Aug 2008, Alan Louis Scheinine wrote:
I forgot to mention, function calls in Fortran, C or C++ seem to kill
efficiency,
whereas writing in C++ with data hiding requires (normally) function calls
to access data. The requirement that Ed Hill described, that an STL vector
must
have c
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alan Louis
Scheinine
Sent: Tuesday, August 26, 2008 2:27 PM
To: Ed Hill
Cc: Beowulf@beowulf.org
Subject: Re: [Beowulf] Stroustrup regarding multicore
I found some useful books in C++, I could not remember
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
> I think that matrix allocation per se is contiguous because of how and
> where it occurs at the compiler level. Immediate matrices allocated
> like a[10][10] are just translated into displacements relative to the
> stack pointer, are they not?
It d
Alan Louis Scheinine <[EMAIL PROTECTED]> writes:
> I found some useful books in C++, I could not remember the names
> because they are at home so I looked in Amazon to jog my memory.
>
> I'm in shock
> Search word "C++" (search within Amazon, not Google)
> 20,176 results
> Search word "C++ scienti
Ed Hill <[EMAIL PROTECTED]> writes:
> On Tue, 26 Aug 2008 14:29:11 -0400 "Perry E. Metzger" wrote:
>> I think part of the issue is that most people doing scientific
>> computing don't have computer science backgrounds, which is a
>> shame.
>
> Formal CS training can certainly help but I don't view
On Tue, 2008-08-26 at 12:50 -0700, Gilad Shainer wrote:
> Dan Kidger wrote:
>
> > Gilad wrote:
> > > It was proven by the same person who did the slides you
> > referred to,
> > > when doing the same testing on IB DDR we got much better
> > results with
> > > IB versus Quadrics. your theory d
Tim Cutts <[EMAIL PROTECTED]> writes:
>> There is other text that similarly requires that array members be
>> allocated consecutively. I'll dig it out as many examples as people
>> insist on.
>
> That would be interesting, because C99 is a pretty recent document,
> really, in C terms. Were they,
I found some useful books in C++, I could not remember the names
because they are at home so I looked in Amazon to jog my memory.
I'm in shock
Search word "C++" (search within Amazon, not Google)
20,176 results
Search word "C++ scientific" (search within Amazon, not Google)
337 results
The wealt
On Tue, 26 Aug 2008, Kyle Spaans wrote:
(DISCLAIMER: I'm still very much a novice programmer, and I can count the 10's
of lines of C code
that I've written on my two hands.)
I've been trying to understand this very debate for a couple of months now,
ever since some, uhh,
"experienced" (:P) aq
On Tue, 26 Aug 2008 14:29:11 -0400 "Perry E. Metzger" wrote:
> I think part of the issue is that most people doing scientific
> computing don't have computer science backgrounds, which is a
> shame.
Formal CS training can certainly help but I don't view it as a
requirement. I've met some remarka
On Tue, 26 Aug 2008, Lux, James P wrote:
No. You are actually given guarantees about memory layout. They're not
phrased as such, but they're quite rigid. (This is rather different
from the situation with, for example, pointers, where you are
explicitly not guaranteed that pointer types are inter
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 him
Very well put.
-G
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Robert G. Brown
Sent: Tuesday, August 26, 2008 11:46 AM
To: Michael H. Frese
Cc: Beowulf@beowulf.org
Subject: Re: [Beowulf] Stroustrup regarding multicore
On Tue, 26 Aug 2008, Michael H. F
Alan Louis Scheinine <[EMAIL PROTECTED]> wrote:
> I forgot to mention, function calls in Fortran, C or C++ seem to kill
efficiency,
That's pretty much true for any language when those calls are inside
inner loops. There are exceptions though - inlined functions in C with
a "good" compiler will n
On Tue, 26 Aug 2008, Perry E. Metzger wrote:
Perhaps, but don't most C programmers allocate such an array as a single
vector and then repack the indices?
I've never seen anyone allocate "as a single vector and repack the
indices", though I'm sure that a counterexample exists in someone's
code
On 26 Aug 2008, at 2:29 pm, Perry E. Metzger wrote:
I think part of the issue is that most people doing scientific
computing don't have computer science backgrounds, which is a
shame.
There is an unwritten recruitment rule, certainly in my field of
science, that the programmer "must underst
On 26 Aug 2008, at 12:53 pm, Perry E. Metzger wrote:
"Perry E. Metzger" <[EMAIL PROTECTED]> writes:
I have a copy of the C99 document and it is indeed required that the
locations be consecutive (though there can of course be padding for
alignment purposes if you have an array of structures).
Dan Kidger wrote:
> Gilad wrote:
> > It was proven by the same person who did the slides you
> referred to,
> > when doing the same testing on IB DDR we got much better
> results with
> > IB versus Quadrics. your theory does not really meet reality.
>
> Care to describe to the list what thes
Perry,
Yes my mistake, // is in C99. Seems like yesterday :-)
And I didn't mean "port" so narrowly, didn't mean to imply he didn't write
an x86 kernel from scratch. And yeah my first x86 was System V, in the mid
80's.
Incidentally, while I understand that "C with Classes" preceeded C++, I use
the t
I forgot to mention, function calls in Fortran, C or C++ seem to kill
efficiency,
whereas writing in C++ with data hiding requires (normally) function calls
to access data. The requirement that Ed Hill described, that an STL vector must
have contiguous memory is wonderful, since it allows the us
um, since array[i][j] is supposed to be the same as array (i * sizeof
(column declared length))[j], then I think yeah, the values should all be at
consecutive locations as Perry described. I just ran a similar experiment in
Visual Studio 2005, just what was on the box as I read this. I don't think
"Peter St. John" <[EMAIL PROTECTED]> writes:
> Just for the sake of historicity for those less -- chronologically
> enhanced-- than RGB or myself, the joke is attributed to Stroustroup, not
> Thompson.
>
> 1. Ken Thompson wrote B (late 60's). Really minimal. Based largely on BCPL,
> but minimal, e
In message from Vincent Diepeveen <[EMAIL PROTECTED]> (Tue, 26 Aug 2008
00:30:30 +0200):
Hi Mikhail,
I'd say they're ok for black box 32 bits calculations that can do with
a GB or 2 RAM,
other than that they're just luxurious electric heating.
I also want to have simple blackbox, but 64-bit
Ed Hill <[EMAIL PROTECTED]> writes:
> And guarantees like the above make it rather easy for programmers to,
> for instance, "assemble" their inputs in C++ and then, if they want,
> call C, Fortran, assembly-optimized, or even GPU-/FPGA-implemented
> routines to perform BLAS, (I)DFT, or other opera
Perry E. Metzger wrote:
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
On Tue, 26 Aug 2008, Michael H. Frese wrote:
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 a
Kyle Spaans <[EMAIL PROTECTED]> writes:
> Either way, I've recently started writing Conway's Game of Life in
> C, as an exercise. I needed to figure out how to dynamically
> allocate a 2D array. I found an answer on the comp.lang.c FAQ[1].
> It's not terribly complex, but it seems to me like it's
On Tue, 26 Aug 2008 12:53:11 -0400 "Perry E. Metzger" wrote:
> "Perry E. Metzger" <[EMAIL PROTECTED]> writes:
> > I have a copy of the C99 document and it is indeed required that the
> > locations be consecutive (though there can of course be padding for
> > alignment purposes if you have an array
Just for the sake of historicity for those less -- chronologically
enhanced-- than RGB or myself, the joke is attributed to Stroustroup, not
Thompson.
1. Ken Thompson wrote B (late 60's). Really minimal. Based largely on BCPL,
but minimal, ergo "B".
2. Ken wrote Unix, in assembler.
3. Dennis Ritch
(DISCLAIMER: I'm still very much a novice programmer, and I can count the 10's
of lines of C code
that I've written on my two hands.)
I've been trying to understand this very debate for a couple of months now,
ever since some, uhh,
"experienced" (:P) aquaintaces of mine discussed the advantages
Well doing DP calculations at a GPU is a bit power and programmers
waste for now Geoff.
Remember, it's a 250 watt TDP monster that GPU, versus a Xeon 45 nm
chippie is 50 watt TDP.
How many units can do DP calculations? Like 40 or so.
According to my calculation that is practical a limit of
"Lux, James P" <[EMAIL PROTECTED]> writes:
>> No. You are actually given guarantees about memory layout. They're not
>> phrased as such, but they're quite rigid. (This is rather different
>> from the situation with, for example, pointers, where you are
>> explicitly not guaranteed that pointer typ
"Perry E. Metzger" <[EMAIL PROTECTED]> writes:
> I have a copy of the C99 document and it is indeed required that the
> locations be consecutive (though there can of course be padding for
> alignment purposes if you have an array of structures).
>
> If you wish for me to quote chapter and verse fr
-Original Message-
From: Perry E. Metzger [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 26, 2008 9:39 AM
To: Lux, James P
Cc: Michael H. Frese; Beowulf@beowulf.org
Subject: Re: [Beowulf] Stroustrup regarding multicore
"Lux, James P" <[EMAIL PROTECTED]> writes:
> The example you give i
"Robert G. Brown" <[EMAIL PROTECTED]> writes:
> On Tue, 26 Aug 2008, Michael H. Frese wrote:
>> 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
>>
"Lux, James P" <[EMAIL PROTECTED]> writes:
> The example you give is going to be compiler dependent.
Even if it were, I defy you to find a c compiler that does
differently. As it is, this is not in fact compiler dependent.
> There's no requirement in K&R
There is, but in any case, K&R is not th
I needed to parallelize a code already written as a serial code (with
domain decomposition in anticipation of the parallelization) by someone
who was teaching himself C++. The person put into the C++ everything
he was learning. From that experience I created my own personal list of
what to avoid
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Perry E. Metzger
Sent: Tuesday, August 26, 2008 8:06 AM
To: Michael H. Frese
Cc: Beowulf@beowulf.org
Subject: Re: [Beowulf] Stroustrup regarding multicore
"Michael H. Frese" <[EMAIL PROTECTED]> writes:
> C
On Tue, 26 Aug 2008, 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
"Michael H. Frese" <[EMAIL PROTECTED]> writes:
> 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 steppi
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
On Tue, 26 Aug 2008, Kyle Spaans wrote:
On Mon, Aug 25, 2008 at 09:22:39PM +0100, Alcides Simao wrote:
Isn't C++ a hoax? I mean, Ken Thompson admitted it was just a joke...
In paralell computing, it must be quite a BIG joke!
I sure hope not! The ``Parallel & Concurrent Programming'' class[1]
On Mon, Aug 25, 2008 at 09:22:39PM +0100, Alcides Simao wrote:
> Isn't C++ a hoax? I mean, Ken Thompson admitted it was just a joke...
> In paralell computing, it must be quite a BIG joke!
I sure hope not! The ``Parallel & Concurrent Programming'' class[1] at my school
uses a language called uC++
58 matches
Mail list logo