Moved some constants from global scope to a function; removed unnecessary includes
parent
6a9d6b5da2
commit
19fd263fb2
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
Loading…
Reference in New Issue