[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] A few fixes before the 1.1.0 release
From: |
Drew Hess |
Subject: |
Re: [Openexr-devel] A few fixes before the 1.1.0 release |
Date: |
Fri, 30 Jan 2004 17:05:02 -0800 (PST) |
At the time I thought this was a VC++ thing only, so even though it made
me ill to do it, adding that to ImathMatrix.cpp seemed acceptable. I
dunno if I wanna proliferate this hack by adding more #ifdef's for other
compilers. Lemme think about it.
I agree that the OpenEXR file format should be as high-performance as
possible, but OpenEXR only uses Imath for portability and a few
attributes, so eliminating the restrict keywords from ImathMatrix.cpp
won't have any noticeable effect on OpenEXR performance. Like I said, I'm
not even convinced it makes a noticeable difference on anything except on
IRIX.
-dwh-
On Sat, 31 Jan 2004, Brad Hards wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sat, 31 Jan 2004 10:34 am, Drew Hess wrote:
> > Florian tells me that for the SGI compiler, "restrict" made a big
> > difference in Imath, but nobody has really tested whether it makes any
> > difference with gcc, Intel icc, or Microsoft VC++, so I'm tempted just to
> > remove it unless someone has time to demonstrate that it's useful. It's a
> > fairly nasty portability issue since we need to make OpenEXR work with at
> > least 4 different compilers, all of which seem to handle restrict slightly
> > differently (even though it's officially part of C99).
> I see that we need to provide high performance, otherwise the EXR file format
> will get a bad name as "too heavy". We already have a workaround for VC++,
> see Imath/ImathMatrix.c, around line 2344:
> #if defined (PLATFORM_WIN32)
> #define restrict
> #endif
>
> g++ can handle restricted pointers, but the docs claim that restrict isn't a
> keyword under C++ (only C99, which won't handle C++ code). But you can use
> __restrict__ or __restrict. So maybe something as simple as
> #if defined (__GNUC__)
> #define restrict __restrict__
> #endif
> would do. We need to dump the -Drestrict= compile flag if we do that though.
>
> > Anyway, I'll spend some more time looking at this in the next few days
> > when I have a chance, and see what we can do about it.
> Appreciated.
>
> Brad
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
>
> iD8DBQFAGvs5GwwszQ/PZzgRAoLUAJ47Yg21IGvT/553Sr10AnpPq3lougCdERRk
> jaeIQb4C2ZpX3i60fMoQa5k=
> =ksg4
> -----END PGP SIGNATURE-----
>
>
>