diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-01-25 20:00:43 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2018-01-25 20:00:43 +0100 |
commit | 19fd263fb26f292a12f5d0fc047174934c6daf04 (patch) | |
tree | e4e835ece8628dd8f09a5ac1ab7318c12cf0704f /src/tuning/tuning.cpp | |
parent | 6a9d6b5da2a7fcdf8ce41ed1e2dcc79098265113 (diff) |
Moved some constants from global scope to a function; removed unnecessary includes
Diffstat (limited to 'src/tuning/tuning.cpp')
-rw-r--r-- | src/tuning/tuning.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/tuning/tuning.cpp b/src/tuning/tuning.cpp index 1f028695..b5e01f65 100644 --- a/src/tuning/tuning.cpp +++ b/src/tuning/tuning.cpp @@ -17,7 +17,7 @@ #include <random> #include <utility> #include <algorithm> -#include <iostream> +#include <cstdio> #include "utilities/utilities.hpp" #include "tuning/tuning.hpp" @@ -96,6 +96,19 @@ void Tuner(int argc, char* argv[], const int V, SetArgumentsFunc<T> SetArguments) { constexpr auto kSeed = 42; // fixed seed for reproducibility + // Constants holding start and end strings for terminal-output in colour + #if defined(_WIN32) + const std::string kPrintError = ""; + const std::string kPrintSuccess = ""; + const std::string kPrintMessage = ""; + const std::string kPrintEnd = ""; + #else + const std::string kPrintError = "\x1b[31m"; + const std::string kPrintSuccess = "\x1b[32m"; + const std::string kPrintMessage = "\x1b[1m"; + const std::string kPrintEnd = "\x1b[0m"; + #endif + // Sets the parameters and platform/device for which to tune (command-line options) const TunerDefaults defaults = GetTunerDefaults(V); auto command_line_args = RetrieveCommandLineArguments(argc, argv); |