diff --git a/bench1.cpp b/bench1.cpp index eeefadbb..181b7db3 100644 --- a/bench1.cpp +++ b/bench1.cpp @@ -57,7 +57,7 @@ void OutputResultBytes(const char *name, double length, double timeTaken) if (timeTaken < 0.000001f) timeTaken = 0.000001f; double mbs = length / timeTaken / (1024*1024); - std::cout << "\n" << name; + std::cout << "\n" << name; std::cout << std::setiosflags(std::ios::fixed); std::cout << "" << std::setprecision(0) << std::setiosflags(std::ios::fixed) << mbs; if (g_hertz > 1.0f) @@ -91,7 +91,7 @@ void OutputResultOperations(const char *name, const char *operation, bool pc, un if (!iterations) iterations++; if (timeTaken < 0.000001f) timeTaken = 0.000001f; - std::cout << "\n" << name << " " << operation << (pc ? " with precomputation" : ""); + std::cout << "\n" << name << " " << operation << (pc ? " with precomputation" : ""); std::cout << "" << std::setprecision(2) << std::setiosflags(std::ios::fixed) << (1000*timeTaken/iterations); // Coverity finding @@ -430,7 +430,8 @@ void Benchmark1(double t, double hertz) std::cout << "\n"; std::cout << ""; - std::cout << "\nAlgorithmMiB/Second" << cpb; + std::cout << "\n"; + std::cout << "\nAlgorithmMiB/Second" << cpb; std::cout << "\n"; { @@ -508,7 +509,8 @@ void Benchmark2(double t, double hertz) std::cout << "\n"; std::cout << "\n"; - std::cout << "\n"; + std::cout << "\n"; diff --git a/bench2.cpp b/bench2.cpp index c348183b..2fdf648e 100644 --- a/bench2.cpp +++ b/bench2.cpp @@ -244,11 +244,17 @@ void Benchmark3(double t, double hertz) g_allocatedTime = t; g_hertz = hertz; + const char *mco; + if (g_hertz > 1.0f) + mco = "
AlgorithmMiB/Second" << cpb; + std::cout << "\n
AlgorithmMiB/Second" << cpb; std::cout << "Microseconds to
Setup Key and IV" << cpk; std::cout << "\n
Megacycles/Operation"; + else + mco = ""; + std::cout << "\n"; std::cout << "\n"; - std::cout << "\n"; + std::cout << "\n"; {
OperationMilliseconds/Operation"; - std::cout << (g_hertz > 1.0f ? "Megacycles/Operation" : "") << std::endl; + std::cout << "\n
OperationMilliseconds/Operation" << mco; std::cout << "\n