00001 00013 00014 #include "ckgraphTemp.h" 00015 00016 00017 void ProcArrayTemp::convertToInsts(BaseLB::LDStats *stats) 00018 { 00019 int numPes = stats->nprocs(); 00020 00021 // loop through all pes and convert the exe time to num of instructions each PE is executing. 00022 // Of course its not correct to actually that we are calculating instructions! 00023 avgLoad = 0.0; 00024 for(int pe = 0; pe < numPes; pe++) { 00025 procs[pe].totalLoad() = procs[pe].totalLoad() * procFreq[pe]; 00026 avgLoad += procs[pe].totalLoad(); 00027 // CkPrintf("PE%d overhead:%f totalLoad:%f \n",pe,procs[pe].overhead(),procs[pe].totalLoad()); 00028 } 00029 avgLoad /= numPes; 00030 } 00031 00032 void ObjGraphTemp::convertToInsts(BaseLB::LDStats *stats) 00033 { 00034 for(int vert = 0; vert < stats->n_objs; vert++) { 00035 vertices[vert].setCompLoad(vertices[vert].getCompLoad() * procFreq[vertices[vert].getCurrPe()]); 00036 } // end for 00037 00038 } 00039 00040