205 assert( n >= 1 && names && abbr && counts );
208 const char spacero[] =
"----------";
209 const char spacerc[] =
"--------------------";
212 out <<
"\nLegend\n------\n";
213 for(
int j = 0; j < n; ++j )
214 out <<
" " << abbr[j] <<
" = " << names[j] << std::endl;
218 out << std::left <<
" " << std::setw(wo) <<
"op\\count";
219 for(
int j = 0; j < n; ++j ) out <<
" " << std::setw(wc) << abbr[j];
221 out << std::right <<
" " << std::setw(wo) << spacero;
222 for(
int j = 0; j < n; ++j ) out <<
" " << std::setw(wc) << spacerc;
226 double theseFlops = 0;
227 for(
int j = 0; j < n; ++j ) theseFlops += counts[j].flopCounts[i];
230 for(
int j = 0; j < n; ++j ) out <<
" " << std::setw(wc) << counts[j].
flopCounts[i];
234 out << std::right <<
" " << std::setw(wo) << spacero;
235 for(
int j = 0; j < n; ++j ) out <<
" " << std::setw(wc) << spacerc;
238 std::vector<double> totalFlops(n);
240 double theseFlops = 0;
241 for(
int j = 0; j < n; ++j ) {
244 totalFlops[j] += flops;
248 for(
int j = 0; j < n; ++j )
253 out << std::right <<
" " << std::setw(wo) << spacero;
254 for(
int j = 0; j < n; ++j ) out <<
" " << std::setw(wc) << spacerc;
257 out <<
" " << std::setw(wo) <<
"all flops";
258 for(
int j = 0; j < n; ++j ) out <<
" " << std::setw(wc) << totalFlops[j];
std::ostream & printCountersTable(const int n, const char *names[], const char *abbr[], const FlopCounts counts[], std::ostream &out)
Print a list of flop counts into a single table.