From 7a633dc4b8a082632e1b439da5ce5f4bd346216d Mon Sep 17 00:00:00 2001 From: Ben Sander Date: Sat, 13 Feb 2016 01:14:01 -0600 Subject: [PATCH] Result formatting [ROCm/hip commit: c3720c19a8e09b551bd55613d3f31d4ac40c63bc] --- .../samples/1_Utils/hipBusBandwidth/ResultDatabase.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/projects/hip/samples/1_Utils/hipBusBandwidth/ResultDatabase.cpp b/projects/hip/samples/1_Utils/hipBusBandwidth/ResultDatabase.cpp index f57aed11be..7d2f3aef84 100644 --- a/projects/hip/samples/1_Utils/hipBusBandwidth/ResultDatabase.cpp +++ b/projects/hip/samples/1_Utils/hipBusBandwidth/ResultDatabase.cpp @@ -278,13 +278,16 @@ void ResultDatabase::DumpSummary(ostream &out) { vector sorted(results); + int testW = 15 ; + const int fieldW = 9; + sort(sorted.begin(), sorted.end()); - out << std::fixed << right << std::setw(9) << std::setprecision(4); + out << std::fixed << right << std::setprecision(4); // TODO: in big parallel runs, the "trials" are the procs // and we really don't want to print them all out.... - out << "test\t" + out << setw(testW) << "test\t" << setw(fieldW) << "atts\t" << "units\t" << "median\t" @@ -297,7 +300,7 @@ void ResultDatabase::DumpSummary(ostream &out) for (int i=0; i