User Tools

Site Tools


wrapper_mflops

In the wrapper code generated by AlphaZ, there is a block that looks like the following.

        //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);
                }   
        }  

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 and 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)