I have a library, which does heavy loop-unrolling on compile-time. I am also using a Bench-marking tool, which works by instantiating a struct inside a scope, and at destruction it measures the time between creation and destruction and returns the values collected. Now, by inserting some function-call inside there, it can measure the time for the function call. what i would like to know is, can the compiler jump scopes?(see my code below)
PerfEvent ev;
{
PerfEventBlock bl(ev, countPE);
ev.setParam("name","FTensor3D");
res(l,m,n,o) = t1(l,m,k)*t2(k,n,o);
}
Or in other words: can the compiler "outsource" work to the outside of the scope(i got weird results back and am wondering)