summaryrefslogtreecommitdiff
path: root/src/tuning
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2018-01-25 20:00:43 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2018-01-25 20:00:43 +0100
commit19fd263fb26f292a12f5d0fc047174934c6daf04 (patch)
treee4e835ece8628dd8f09a5ac1ab7318c12cf0704f /src/tuning
parent6a9d6b5da2a7fcdf8ce41ed1e2dcc79098265113 (diff)
Moved some constants from global scope to a function; removed unnecessary includes
Diffstat (limited to 'src/tuning')
-rw-r--r--src/tuning/tuning.cpp15
-rw-r--r--src/tuning/tuning.hpp16
2 files changed, 14 insertions, 17 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);
diff --git a/src/tuning/tuning.hpp b/src/tuning/tuning.hpp
index 22210c7d..ee7e0087 100644
--- a/src/tuning/tuning.hpp
+++ b/src/tuning/tuning.hpp
@@ -20,7 +20,6 @@
#include <random>
#include <utility>
#include <algorithm>
-#include <iostream>
#include <chrono>
#include <functional>
@@ -32,21 +31,6 @@
namespace clblast {
// =================================================================================================
-// 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
-
-// =================================================================================================
-
// Structures for the tuners with all the default settings
struct TunerDefaults {