openexr-devel
[Top][All Lists]
Advanced

[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: Brad Hards
Subject: Re: [Openexr-devel] A few fixes before the 1.1.0 release
Date: Sat, 31 Jan 2004 11:47:52 +1100
User-agent: KMail/1.5.94

-----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-----




reply via email to

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