Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > HWSim > HWSim__PingPong__HWDef
comparison src/Application/SimParams.c @ 2:d872169e58fa
Minor changes -- mostly renaming structs and vars
| author | Me@portablequad |
|---|---|
| date | Wed, 30 Nov 2011 08:40:30 -0800 |
| parents | 8ea476474093 |
| children | 648207f2e38f |
comparison
equal
deleted
inserted
replaced
| 0:c3e737f946e7 | 1:294f0b19858e |
|---|---|
| 144 | 144 |
| 145 void | 145 void |
| 146 | 146 |
| 147 printSimResults( SimulationResults simResults ) | 147 printSimResults( SimulationResults simResults ) |
| 148 | 148 |
| 149 { int r, c, numRows, numCols, rowsToPrint, colsToPrint, rowIncr, colIncr; | 149 { |
| 150 | |
| 151 float32 *matrixArray; | |
| 152 | |
| 153 | |
| 154 | |
| 155 numRows = rowsToPrint = matrix->numRows; | |
| 156 | |
| 157 numCols = colsToPrint = matrix->numCols; | |
| 158 | |
| 159 matrixArray = matrix->array; | |
| 160 | |
| 161 | |
| 162 | |
| 163 rowIncr = numRows/20; if(rowIncr == 0) rowIncr = 1;//20 to 39 rows printed | |
| 164 | |
| 165 colIncr = numCols/20; if(colIncr == 0) colIncr = 1;//20 to 39 cols printed | |
| 166 | |
| 167 for( r = 0; r < numRows; r += rowIncr ) | |
| 168 | |
| 169 { for( c = 0; c < numCols; c += colIncr ) | |
| 170 | |
| 171 { printf( "%3.1f | ", matrixArray[ r * numCols + c ] ); | |
| 172 | |
| 173 } | |
| 174 | |
| 175 printf("\n"); | |
| 176 | |
| 177 } | |
| 178 | 150 |
| 179 } | 151 } |
| 180 | 152 |
| 181 | 153 |
| 182 | 154 |
