------- Comment #13 from jacob at math dot jussieu dot fr  2006-12-14 16:22 
-------
(In reply to comment #12)
> Yes. However, all this is only for my reduced testcase without the use of
> the C++ class. For the original testcase, the issues Andrew P. identified
> are still true.

OK, so if I understand well the problem that "gcc doesn't unroll nested loops"
exists only for C++, not for C ? That seems so strange to me, but then again I
don't know much about compilers.

So now I need to make a decision for my C++ project. I am planning to unfold
nested loops into normal loops, for instance replace

for( col = 0; col < size(); col++)
   for( row = 0; row < size(); row++)
   {
     ...
   }

with

for( int foo = 0; foo < size() * size(); foo++)
{
   col = foo / size();
   row = foo % size();
   ...
}

Do you think this will help solve my problem? Do you see a better solution?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30201

Reply via email to