diff --git a/src/main.cpp b/src/main.cpp index 1171180..a0fbaf9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -56,6 +56,13 @@ void run() std::vector a(ARRAY_SIZE, 1.0); std::vector b(ARRAY_SIZE, 2.0); std::vector c(ARRAY_SIZE, 0.0); + std::streamsize ss = std::cout.precision(); + std::cout << std::setprecision(1) << std::fixed + << "Array size: " << ARRAY_SIZE*sizeof(T)*1.0E-6 << " MB" + << " (=" << ARRAY_SIZE*sizeof(T)*1.0E-9 << " GB)" << std::endl; + std::cout << "Total size: " << 3.0*ARRAY_SIZE*sizeof(T)*1.0E-6 << " MB" + << " (=" << 3.0*ARRAY_SIZE*sizeof(T)*1.0E-9 << " GB)" << std::endl; + std::cout.precision(ss); Stream *stream;