Proposals:Template Meta Programming Unrolling Loops

From KitwarePublic
Revision as of 18:13, 7 December 2007 by Ibanez (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

The Problem

Many classes in ITK perform for-loops of small number of elements whose size is known at compile time. These for loops are bottlenecks of performance. Computation time can be improved by unrolling them at compilation time.

Proposal

Introduce Template Meta Programming techniques for unrolling loops in heavily used classes

References

Template Meta-Programming entry in the Wikipedia

Observation

It turned out that gcc in -O3 manages to unroll many of the loops that we were targeting to unroll by using template Meta Programming. Therefore at this point, there is no visible benefit on investing in implementing this technique.