This shows you the differences between two versions of the page.
— |
wrapper_mflops [2014/05/30 11:49] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | In the wrapper code generated by AlphaZ, there is a block that looks like the following. | ||
+ | <code C> | ||
+ | //MFLOPS computation | ||
+ | { | ||
+ | double totalFLOP = 0.0; | ||
+ | / | ||
+ | //add code to compute the total number of MFLOP here | ||
+ | / | ||
+ | //only computes and prints MFLOPS when code is added above | ||
+ | if (totalFLOP > 0.0) { | ||
+ | double mflop = totalFLOP * 0.001; | ||
+ | double mflops = mflop / elapsed_time; | ||
+ | printf(" | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | If you provide a piece of code that compute the total number of FLOPs per second in the computation as some function of the program parameters, the wrapper will print out MFLOPS per second in addition to the elapsed time. | ||
+ | |||
+ | The section of code surrounded by the comments / | ||
+ | If you slightly change your schedule or memory allocation and then re-generate code, this block of code will remain unchanged after re-generation. | ||