[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.
Perry E. Metzger perry at piermont.comTue Aug 26 14:51:40 PDT 2008
- Previous message: [Beowulf] Stroustrup regarding multicore
- Next message: [Beowulf] Stroustrup regarding multicore
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Robert G. Brown" <rgb at phy.duke.edu> 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 depends. You're not guaranteed per se that they'll be allocated on the stack, though in practice they are. > Global/external matrices at the a[10][10] > are prespecified in the data segment of the program, Depending on the particular OS. Certainly that's the usual model. > The only place where it might not be true is when one dynamically > allocates memory for a **matrix. There, if you loop through malloc > calls, there is no guarantee that they return contiguous blocks An vector of pointers to vectors is not a matrix. :) It acts a bit like one, but that's guaranteed NOT to be contiguous allocation because malloc will at the very least add the (invisible to the programmer) malloc headers etc. -- Perry E. Metzger perry at piermont.com
- Previous message: [Beowulf] Stroustrup regarding multicore
- Next message: [Beowulf] Stroustrup regarding multicore
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Beowulf mailing list
