Boost logo

Boost :

Subject: Re: [boost] 5 Observations - My experience with the boost libraries
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2010-03-23 21:47:29


On Tue, Mar 23, 2010 at 6:38 PM, David Bergman
<David.Bergman_at_[hidden]> wrote:
> On Mar 23, 2010, at 9:22 PM, Tom Brinkman wrote:
>
>>>> but does that force us to constantly send that raw pointer around?
>>
>> Yes, and it also has to be aligned.  The buffer must be carefully crafted
>> with considerable attention to caching issues.
>>
>> I kid you not, but I have seen some wild stuff.
>>
>> I've worked on the Larabee platform, which is the next generation discrete
>> graphics card from intel.  It has a 512K buffer, which means that you will
>> be able to simultaneously process 16 floats.  When you combine this with the
>> parallelism possibilities on the next Nahalem processor (8 cores, 16
>> threads), you will be able to achieve processing speeds thousands of times
>> faster then non-hardware optimized code.
>>
>> Unfortunately, to take advantage of this, you will need to manage the memory
>> yourself, which requires lots of old fashioned straight "C" style coding.
>
> Really? One can do a lot of C++-neat things with POD's. And, just ridding the virtual table goes pretty far.

We're talking about style of interfaces, not what language you use.
Even mentioning "virtual table", even just to say "ridding it", you've
lost me. :)

> As someone else pointed out, with C++ and proper meta-programming tricks, one can even achieve optimal structure alignments for differing platforms with *one* codebase, which is pretty hard to do in C.

In many cases, I'd rather design a C-style interface that takes
pointers to incomplete types or even void pointers. Then *maybe* if it
makes sense I would use meta-programming tricks in the implementation.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk