[Developers] ifndef in DXYDG_guts.h

Erik Schnetter schnetter at cct.lsu.edu
Wed Mar 14 09:39:13 CST 2007


On Mar 14, 2007, at 10:15:42, Ian Hinder wrote:

> Erik Schnetter wrote:
>> On Mar 14, 2007, at 09:20:01, Erik Schnetter wrote:
>>
>>> On Mar 13, 2007, at 18:05:01, jtao at cct.lsu.edu wrote:
>>>
>>>> I am also concerned about the usage of the spatial order
>>>> parameter in the loops. Shouldn't it be better to define the
>>>> order of spatial derivatives with a macro and keep the same
>>>> interface for all the derivatives ? Conditional statments
>>>> will not appear in the loops and it is still easy to
>>>> go to other orders.
>>
>> I have heard that Penn State uses Kranc
>> <http://numrel.aei.mpg.de/Research/Kranc/> to generate code
>> automatically.  I have heard that they generate different routines  
>> for
>> each spatial differencing order.  This still allows switching at run
>> time (since several routines are present), but allows each routine  
>> to be
>> optimised independently.
>
> Indeed, however this was done based on the *assumption* that having an
> if statement in the inner loop would be expensive.  I suspect that it
> might be possible to add such a statement without incurring a
> performance penalty (for the reasons Erik stated in his previous  
> email).
>  It is on my list of things to try, as it would make the code (both  
> the
> script, and the generated code) a lot cleaner.

*assumption*: See "root of all evil", aka "premature optimisation".

I just came across a nice article: <http://www.flounder.com/ 
optimization.htm>.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20070314/d203c91d/attachment.bin 


More information about the Developers mailing list