User Tools

Site Tools


wrapper_mflops

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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;
 +                /​***PROTECTED REGION ID(systemName_MLOPS) ENABLED START***/
 +                //add code to compute the total number of MFLOP here
 +                /​***PROTECTED REGION END***/
 +                //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("​MFLOPS : %lf\n",​ mflops);
 +                }   
 +        }  ​
 +</​code>​
 +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 /​***PROTECTED REGION START***/ and /​***PROTECTED REGION END***/ is protected by the code generator from subsequent code generations.
 +If you slightly change your schedule or memory allocation and then re-generate code, this block of code will remain unchanged after re-generation.
  
wrapper_mflops.txt ยท Last modified: 2014/05/30 11:49 (external edit)