I have some function which does some matrix calculations and
prints them. It is actually calculationg determinant of the
matrix and i need to call those functions several times in the
loop, until i get the final result. Here is the code.
void solveAndPrint(T : CoeffMatrix!(ElementType, ElementType),
ElementType)(T _matrix)
{
auto matrix = _matrix;
TempMatrix!ElementType temp;
foreach(_; 0..3) //3 is just for debug
{
writeln(matrix);
temp = makeTemp(matrix);
writeln(temp);
matrix = solveTemp(temp);
writeln("done1");
stdout.flush();
}
writeln("done2");
stdout.flush();
}
The problem is that after 'done1' is printed it is running
infinitely consuming all the processor just like if has infinite
loop inside. done2 is never printed.