[Insight-developers] template depth limit
Ross Whitaker
whitaker@cs.utah.edu
Thu, 28 Jun 2001 09:14:13 -0600
Not to sound "anti-template" (even though I have never used them, right
Bill!) ---
But should we reconsider an architecture which relies on such depth of
templates? It makes me a little uncomfortable. Does anyone see a
problem with this?
Regards,
Ross
Lydia Ng wrote:
> A few days ago I checked in multi resolution version
> of the rigid mutual information registration.
>
> This new class has manage to exceed the gcc default
> template depth limit of 17. This is why the associated
> test is failing to compile on Linux and SunOS platforms.
>
> The template depth limit can be increase to NN via flag
> -ftemplate-depth-NN
>
> I have experimented with this on Cygwin by setting
> the CMAKE_CXX_FLAGS in the CMakeCache.txt
>
> CMAKE_CXX_FLAGS:STRING=-g -O2 -ftemplate-depth-20
>
> I re-ran CMake and the test compiled and passed.
>
> So:
>
> 1) Should we increase this depth by default for ITK
> by setting the flag in some configuration file.
>
> 2) If so, what value should we increase it to.
> Also what is the impact in increasing it.
>
> Cheers,
> Lydia
>
--
Ross T. Whitaker, Assistant Professor
50 S. Central Campus Drive, Rm. 3190
University of Utah
Salt Lake City, UT 84112-9205
voice: 801/587-9549, fax: 801/581-5843
web: www.cs.utah.edu/~whitaker