Скачиваний:
18
Добавлен:
01.05.2014
Размер:
6.94 Кб
Скачать

Turbo Profiler  Version 2.1  Tue May 04 01:11:51 2004
Program: D:\BORLANDC\BIN\METROL~1\LAB.EXE
Execution Profile
Total time: 1.8918 sec
% of total: 99 %
       Run: 1 of 1

    Filter: All 
      Show: Time
      Sort: Frequency

#LAB#47          0.6031 sec  31% |**********************************************
#LAB#95          0.2218 sec  11% |****************
#LAB#34          0.1682 sec   8% |************
#LAB#103         0.1187 sec   6% |*********
#LAB#26          0.1117 sec   5% |********
#LAB#37          0.1109 sec   5% |********
write_data       0.1106 sec   5% |********
#LAB#61          0.0640 sec   3% |****
#LAB#91          0.0595 sec   3% |****
#LAB#64          0.0586 sec   3% |****
#LAB#53          0.0576 sec   3% |****
#LAB#31          0.0570 sec   3% |****
#LAB#101         0.0569 sec   3% |****
#LAB#92          0.0560 sec   2% |****
square           0.0048 sec  <1% |
#LAB#54          0.0035 sec  <1% |
#LAB#63          0.0025 sec  <1% |
#LAB#113         0.0021 sec  <1% |
#LAB#32          0.0021 sec  <1% |
#LAB#99          0.0021 sec  <1% |
#LAB#35          0.0020 sec  <1% |
#LAB#94          0.0019 sec  <1% |
#LAB#114         0.0019 sec  <1% |
#LAB#89          0.0019 sec  <1% |
#LAB#115         0.0019 sec  <1% |
#LAB#33          0.0017 sec  <1% |
#LAB#27          0.0014 sec  <1% |
#LAB#87          0.0009 sec  <1% |
#LAB#51          0.0009 sec  <1% |
#LAB#69          0.0008 sec  <1% |
#LAB#106         0.0008 sec  <1% |
#LAB#29          0.0008 sec  <1% |
get_data         0.0008 sec  <1% |
_main            0.0000 sec  <1% |
#LAB#111         0.0000 sec  <1% |
#LAB#117         0.0000 sec  <1% |

Turbo Profiler  Version 2.1  Tue May 04 01:27:42 2004
Program: D:\BORLANDC\BIN\METROL~1\LAB.EXE
Execution Profile
Total time: 2.4469 sec
% of total: 99 %
       Run: 1 of 1

    Filter: All 
      Show: Time per call
      Sort: Frequency

#LAB#47          0.0005 sec/call |**********************************************
#LAB#26          0.0001 sec/call |*********
#LAB#89          0.0001 sec/call |*********
get_data         0.0001 sec/call |*********
write_data       0.0001 sec/call |*********
#LAB#87          0.0000 sec/call |****
#LAB#114         0.0000 sec/call |****
#LAB#113         0.0000 sec/call |****
#LAB#115         0.0000 sec/call |****
#LAB#37          0.0000 sec/call |****
#LAB#117         0.0000 sec/call |
#LAB#101         0.0000 sec/call |****
#LAB#91          0.0000 sec/call |****
#LAB#106         0.0000 sec/call |****
#LAB#64          0.0000 sec/call |***
#LAB#103         0.0000 sec/call |***
#LAB#95          0.0000 sec/call |**
#LAB#35          0.0000 sec/call |**
#LAB#33          0.0000 sec/call |**
#LAB#99          0.0000 sec/call |**
#LAB#34          0.0000 sec/call |**
#LAB#31          0.0000 sec/call |**
#LAB#94          0.0000 sec/call |**
#LAB#32          0.0000 sec/call |
#LAB#27          0.0000 sec/call |
#LAB#69          0.0000 sec/call |
square           0.0000 sec/call |
#LAB#63          0.0000 sec/call |
#LAB#61          0.0000 sec/call |
#LAB#54          0.0000 sec/call |
_main            0.0000 sec/call |
#LAB#111         0.0000 sec/call |
#LAB#53          0.0000 sec/call |
#LAB#29          0.0000 sec/call |
#LAB#51          0.0000 sec/call |
#LAB#92          0.0000 sec/call |****



Turbo Profiler  Version 2.1  Tue May 04 01:12:42 2004
Program: D:\BORLANDC\BIN\METROL~1\LAB.EXE  File METROL~1\LAB.CPP
Time  Counts
              #include <iostream.h>
              #include <conio.h>
              #define rmax 5
              #define cmax 5      
              
              typedef float ary[ rmax ];
              typedef float arys[ cmax ];
              typedef float ary2[ rmax ][ cmax ];
              typedef float ary2s[ cmax ][ cmax ];              
               ary    y; arys   g; ary2   x; ary2s  a;
               int  nrow,ncol;             
              
0.0008 999    void get_data( ary2 x, ary  y, int &nrow, int &ncol)
              
              // get the values for nrow, ncol, and arrays x,y
               {int i,j,s;              
0.1117 999      nrow = 2; // this value can be chaged
0.0014 999      ncol = 2;              
0.0008 999      for ( i = 0; i < nrow ; i++)
                  {
0.0570 1998           x[i][0] = 1;
0.0021 1998        for ( j = 1; j < ncol ; j++)
0.0017 1998             x[i][j] = i * x[i][j-1];
0.1682 1998           s = i+1;
0.0020 1998           y[i] = 2 * s;
                  }
0.1109 999     } // procedure get_data        
              
0.1106 999    void write_data()
              { int i,j;              
0.6031 999      clrscr();
              /*  cout <<"\n";
                cout <<"\n   X         Y\n\n\n";*/              
0.0009 999      for ( i = 0; i < nrow ; i++)
                  {
0.0576 1998        for ( j = 0; j < ncol ; j++)
0.0035 3996             continue;
              /*       cout <<x[i][j] <<"    ";
                     cout <<": "<<y[i] <<"\n\n\n";*/
                  }
               /*   cout <<"\n\n   A         G\n\n\n";*/

Turbo Profiler  Version 2.1  Tue May 04 01:12:42 2004              
0.0640 999      for ( i = 0; i < ncol ; i++)
                  {
0.0025 1998        for ( j = 0; j < ncol ; j++)
0.0586 3996          continue;
              /*       cout << a[i][j]<<"    ";
                     cout <<": " << g[i] <<"\n\n\n";*/              
                  }
0.0008 999    }//     write_data                                           
              
0.0048 999    void square(ary2   x, ary    y, ary2s  a,  arys   g,
                          int nrow,   int ncol)              
              // a= transpose x times x
              // g= y times x                  
              { int i,k,l; // square 
0.0009 999      for ( k = 0; k < ncol ; k++)
                  {
0.0019 1998        for ( l = 0; l < k ; l++)
                      {
0.0595 999                a[k][l] = 0;
0.0560 999                for ( i = 0; i < nrow ; i++)
                              {
0.0019 1998                     a[k][l] = a[k][l] + x[i][l] * x[i][k];
0.2218 1998                     if  (k != l) a[l][k] = a[k][l];
                              }
                      }           // l-loop
              
0.0021 1998            g[k] = 0;              
0.0569 1998        for ( i = 0; i < nrow ; i++)
                     {
0.1187 3996             g[k] = g[k] + y[i] * x[i][k];
                     }                  }   // k-loop
0.0008 999     }    // square          
0.0000 1      void main()
               {
0.0000 1       for (int i=1; i< 1000; i++)
                 {
0.0021 999        get_data(x,y,nrow,ncol);
0.0019 999         square(x,y,a,g,nrow,ncol);
0.0019 999         write_data();
                 }
0.0000 1       }
              
              

Соседние файлы в папке lab2