freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freepooma-devel] [PATCH] No longer use UninitializedVector for Domain/


From: Richard Guenther
Subject: [Freepooma-devel] [PATCH] No longer use UninitializedVector for Domain/
Date: Thu, 7 Apr 2005 15:14:01 +0200 (CEST)

Hi!

This is the final patch to completely remove the use of
UninitializedVector from the domain classes.  This more easily
exposes our complicated domain hierarchy to the optimizers.
With disabling of destructor definitions for one-dimensional
specializations, both gcc 3.4 and 4.0 give noticable speedups
with this patch.  In fact, both can now optimize operations
on multi-dimensional Locs at compile time, like

int test_loc2(void)
{
        Loc<2> a(1, 0);
        Loc<2> b(0, 1);
        return a[0].first() + b[0].first();
}

or

int test_loc2init(void)
{
        Loc<2> a((Pooma::NoInit())), b;
        return a[0].first() + b[0].first();
}

with earlier tunings we were already able to optimize the
one-dimensional counterparts.

I plan to commit this to HEAD if nobody objects and get it
some more real-world testing before maybe considering it for
r2_branch.

This issue with the empty destructors makes me wonder if different
compilers may behave the other way around here, and if we rather
want to wrap these inside macros and provide a configure-time switch
for this?  How is your experience with compilers other than gcc and
empty destructors vs. using the compiler-generated ones?

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/

Attachment: remove-uninitialized-vector_patch-final
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]