####################################################################################
SPEED CONSIDERATIONS
####################################################################################

From version 10.1 onwards the Intel compiler ICC seems to work flawlessly together
with the Qt4/OpenGL-stuff of Zhu3D. Speed gains against older Zhu3D versions in
combination with an older GCC may be really huge with some 200% or even more.

A newer Zhu3D from 4.1.6 onwards compiled with a 4.3 or so GCC is much closer
to ICC 11.0 or 11.1. The latter is maybe some 15%-20% faster in best cases.

With more recent GCC (4.5 or later) the picture may even turn round. GCC is
beating Intel in many occasions here.

To utilise ICC instead of GCC:

1) Enable ICC in the zhu3d.pro file first
2) Invoke the qmake with an option then: qmake -spec linux-icc


####################################################################################
NOTES FOR ICC 10.1
####################################################################################

If you can not even compile a simple C++ "Hello world" program and get some error
message sounding like:

... /usr/include/c++/4.2.1/ext/atomicity.h ...
... __sync_fetch_and_add(ptr,addend) not declared ...

you may have to patch your atomicity.h file as follows:

1) Search atomicity.h
2) Add the following immediately after the line _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx):

#ifdef __ICC
#define __sync_fetch_and_add(ptr,addend) _InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(ptr)), addend);
#endif


This patch was suggested from Johannes Singler. This is his original notice:


/***************************************************************************
 *   Copyright (C) 2007 by Johannes Singler                                *
 *   singler@ira.uka.de                                                    *
 *   Distributed under the Boost Software License, Version 1.0.            *
 *   (See accompanying file LICENSE_1_0.txt or copy at                     *
 *   http://www.boost.org/LICENSE_1_0.txt)                                 *
 *   Part of the MCSTL   http://algo2.iti.uni-karlsruhe.de/singler/mcstl/  *
 ***************************************************************************/

/** @file intel_compatibility.h
 *  @brief Intel compiler compatibility work-around. */

#ifdef __ICC
/** @brief Replacement of unknown atomic function. Bug report submitted to Intel. */
#define __sync_fetch_and_add(ptr,addend) _InterlockedExchangeAdd(const_cast<void*>(reinterpret_cast<volatile void*>(ptr)), addend);
#endif


####################################################################################
ICC 10.1 BUGS IN COMBINATION WITH GCC 4.3.X
####################################################################################

It seems that ICC-versions older than 11.0 have a serious problem in combination with
gcc 4.3.x header files. There are some patches out, but none of them makes me happy
due to various reasons. Also there are no official patches from Intel itself.

SOLUTION: Update to ICC 11.0 or 11.1 which seems to fix most of these issues. At least
Zhu3D is not affected any more.
