COMPMID-1398: Removed --threads from CommonOptions

Otherwise --threads appear twice for benchmark_graph_* tests

Change-Id: I4f5454f6a2fda2558386290583a0ab84cd4666bb
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139827
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
diff --git a/tests/benchmark_examples/RunExample.cpp b/tests/benchmark_examples/RunExample.cpp
index 81c879f..de3e796 100644
--- a/tests/benchmark_examples/RunExample.cpp
+++ b/tests/benchmark_examples/RunExample.cpp
@@ -106,9 +106,6 @@
         g_example_argv.emplace_back(const_cast<char *>(arg.c_str())); // NOLINT
     }
 
-    // Set number of threads in Scheduler
-    Scheduler::get().set_num_threads(options.threads->value());
-
     if(options.log_level->value() > framework::LogLevel::NONE)
     {
         for(auto &p : printers)
@@ -137,7 +134,6 @@
             }
 #endif /* ARM_COMPUTE_CL */
             p->print_entry("Iterations", support::cpp11::to_string(options.iterations->value()));
-            p->print_entry("Threads", support::cpp11::to_string(options.threads->value()));
         }
     }
 
diff --git a/tests/framework/command_line/CommonOptions.cpp b/tests/framework/command_line/CommonOptions.cpp
index f1c140e..fee18f6 100644
--- a/tests/framework/command_line/CommonOptions.cpp
+++ b/tests/framework/command_line/CommonOptions.cpp
@@ -39,7 +39,6 @@
     : help(parser.add_option<ToggleOption>("help")),
       instruments(),
       iterations(parser.add_option<SimpleOption<int>>("iterations", 1)),
-      threads(parser.add_option<SimpleOption<int>>("threads", 1)),
       log_format(),
       log_file(parser.add_option<SimpleOption<std::string>>("log-file")),
       log_level(),
@@ -87,7 +86,6 @@
     help->set_help("Show this help message");
     instruments->set_help("Set the profiling instruments to use");
     iterations->set_help("Number of iterations per test case");
-    threads->set_help("Number of threads to use");
     log_format->set_help("Output format for measurements and failures (affects only log-file)");
     log_file->set_help("Write output to file instead of to the console (affected by log-format)");
     log_level->set_help("Verbosity of the output");
diff --git a/tests/framework/command_line/CommonOptions.h b/tests/framework/command_line/CommonOptions.h
index b29c1d8..f4646a0 100644
--- a/tests/framework/command_line/CommonOptions.h
+++ b/tests/framework/command_line/CommonOptions.h
@@ -74,7 +74,6 @@
     arm_compute::utils::ToggleOption                           *help;           /**< Show help option */
     arm_compute::utils::EnumListOption<InstrumentsDescription> *instruments;    /**< Instruments option */
     arm_compute::utils::SimpleOption<int>                      *iterations;     /**< Number of iterations option */
-    arm_compute::utils::SimpleOption<int>                      *threads;        /**< Number of threads option */
     arm_compute::utils::EnumOption<LogFormat>                  *log_format;     /**< Log format option */
     arm_compute::utils::SimpleOption<std::string>              *log_file;       /**< Log file option */
     arm_compute::utils::EnumOption<LogLevel>                   *log_level;      /**< Logging level option */
diff --git a/tests/main.cpp b/tests/main.cpp
index 5968389..2da6804 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -107,6 +107,8 @@
     auto enable_tuner = parser.add_option<utils::ToggleOption>("enable-tuner");
     enable_tuner->set_help("Enable OpenCL dynamic tuner");
 #endif /* ARM_COMPUTE_CL */
+    auto threads = parser.add_option<utils::SimpleOption<int>>("threads", 1);
+    threads->set_help("Number of threads to use");
 
     try
     {
@@ -120,7 +122,7 @@
 
         std::vector<std::unique_ptr<framework::Printer>> printers = options.create_printers();
 
-        Scheduler::get().set_num_threads(options.threads->value());
+        Scheduler::get().set_num_threads(threads->value());
 #ifdef ARM_COMPUTE_CL
         if(enable_tuner->is_set())
         {
@@ -152,7 +154,7 @@
                 }
 #endif /* ARM_COMPUTE_CL */
                 p->print_entry("Iterations", support::cpp11::to_string(options.iterations->value()));
-                p->print_entry("Threads", support::cpp11::to_string(options.threads->value()));
+                p->print_entry("Threads", support::cpp11::to_string(threads->value()));
                 {
                     using support::cpp11::to_string;
                     p->print_entry("Dataset mode", to_string(dataset_mode->value()));
diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp
index d842c5b..9ce41c2 100644
--- a/tests/validate_examples/RunExample.cpp
+++ b/tests/validate_examples/RunExample.cpp
@@ -124,8 +124,6 @@
         g_example_argv.emplace_back(const_cast<char *>(arg.c_str())); // NOLINT
     }
 
-    // Set number of threads in Scheduler
-    Scheduler::get().set_num_threads(options.threads->value());
     library = support::cpp14::make_unique<AssetsLibrary>("." /* Only using random values */, seed->value());
 
     if(options.log_level->value() > framework::LogLevel::NONE)
@@ -157,7 +155,6 @@
             }
 #endif /* ARM_COMPUTE_CL */
             p->print_entry("Iterations", support::cpp11::to_string(options.iterations->value()));
-            p->print_entry("Threads", support::cpp11::to_string(options.threads->value()));
             g_example->print_parameters(*p);
         }
     }