Pow10

/*
    This example shows that modules can have loops that will
    be fully unrolled.
*/

void Pow10(int x_in, int& y_out)
{
    int total ;
    int i ;

    total = 1; 

    for (i = 0 ; i < 10 ; ++i)
    {
        total *= x_in ;
    }

    y_out = total ;
}

Description

The C code for the Pow10 is shown above. Loops in modules must have constant bounds, ROCCC will automatically fully unroll all loops found in a module during compilation.