aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2018-07-05 15:42:02 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit11a7e32230121e457252084f8b93357814fe57e5 (patch)
tree0ac68fa3bd232f3a39383a65c8c1e88f0cd5c0ef
parent3d319469e5f28066c507e4228dfeb6b9fdfb38a5 (diff)
downloadComputeLibrary-11a7e32230121e457252084f8b93357814fe57e5.tar.gz
COMPMID-1246 - Enabled NHWC on graph_mobilenet by default
Change-Id: I195d4a0e6fee4cd4ca42403256a9fe639b83fa3d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/138925 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
-rw-r--r--examples/graph_mobilenet.cpp10
-rw-r--r--utils/CommonGraphOptions.h10
2 files changed, 15 insertions, 5 deletions
diff --git a/examples/graph_mobilenet.cpp b/examples/graph_mobilenet.cpp
index 9304b2b380..2b662d9055 100644
--- a/examples/graph_mobilenet.cpp
+++ b/examples/graph_mobilenet.cpp
@@ -37,20 +37,24 @@ using namespace arm_compute::graph_utils;
* @param[in] argc Number of arguments
* @param[in] argv Arguments
*/
-class GraphMobilenetExample : public Example // NOLINT
+class GraphMobilenetExample : public Example
{
public:
GraphMobilenetExample()
: cmd_parser(), common_opts(cmd_parser), common_params(), graph(0, "MobileNetV1")
{
+ // Sets default layout to NHWC
+ common_opts.data_layout->parse("NHWC");
+
// Add model id option
model_id_opt = cmd_parser.add_option<SimpleOption<int>>("model-id", 0);
model_id_opt->set_help("Mobilenet model id (0: 1.0_224, else: 0.75_160");
}
- /** Prevent instances of this class from being copy constructed */
GraphMobilenetExample(const GraphMobilenetExample &) = delete;
- /** Prevent instances of this class from being copied */
GraphMobilenetExample &operator=(const GraphMobilenetExample &) = delete;
+ GraphMobilenetExample(GraphMobilenetExample &&) = default; // NOLINT
+ GraphMobilenetExample &operator=(GraphMobilenetExample &&) = default; // NOLINT
+ ~GraphMobilenetExample() override = default;
bool do_setup(int argc, char **argv) override
{
// Parse arguments
diff --git a/utils/CommonGraphOptions.h b/utils/CommonGraphOptions.h
index ef2e4fb946..b429a18069 100644
--- a/utils/CommonGraphOptions.h
+++ b/utils/CommonGraphOptions.h
@@ -79,10 +79,16 @@ public:
* @param[in,out] parser A parser on which "parse()" hasn't been called yet.
*/
CommonGraphOptions(CommandLineParser &parser);
- /** Prevent instances of this class from being copy constructed */
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
CommonGraphOptions(const CommonGraphOptions &) = delete;
- /** Prevent instances of this class from being copied */
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
CommonGraphOptions &operator=(const CommonGraphOptions &) = delete;
+ /** Allow instances of this class to be moved */
+ CommonGraphOptions(CommonGraphOptions &&) = default;
+ /** Allow instances of this class to be moved */
+ CommonGraphOptions &operator=(CommonGraphOptions &&) = default;
+ /** Default destructor */
+ ~CommonGraphOptions() = default;
ToggleOption *help; /**< Show help option */
SimpleOption<int> *threads; /**< Number of threads option */