aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-11-21 03:04:18 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-12-01 10:41:54 +0000
commit40f51a63c8e7258db15269427ae4fe1ad199c550 (patch)
tree353253a41863966995a45556731e7181a643c003 /examples
parent327800401c4185d98fcc01b9c9efbc038a4228ed (diff)
downloadComputeLibrary-40f51a63c8e7258db15269427ae4fe1ad199c550.tar.gz
Update default C++ standard to C++14
(3RDPARTY_UPDATE) Resolves: COMPMID-3849 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I6369f112337310140e2d6c8e79630cd11138dfa0 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4544 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp2
-rw-r--r--examples/graph_alexnet.cpp2
-rw-r--r--examples/graph_googlenet.cpp2
-rw-r--r--examples/graph_inception_resnet_v1.cpp4
-rw-r--r--examples/graph_inception_resnet_v2.cpp2
-rw-r--r--examples/graph_inception_v3.cpp2
-rw-r--r--examples/graph_inception_v4.cpp2
-rw-r--r--examples/graph_mobilenet.cpp2
-rw-r--r--examples/graph_mobilenet_v2.cpp2
-rw-r--r--examples/graph_resnet12.cpp4
-rw-r--r--examples/graph_resnet50.cpp4
-rw-r--r--examples/graph_resnet_v2_50.cpp2
-rw-r--r--examples/graph_shufflenet.cpp2
-rw-r--r--examples/graph_squeezenet.cpp2
-rw-r--r--examples/graph_squeezenet_v1_1.cpp2
-rw-r--r--examples/graph_srcnn955.cpp4
-rw-r--r--examples/graph_ssd_mobilenet.cpp2
-rw-r--r--examples/graph_vgg16.cpp2
-rw-r--r--examples/graph_vgg19.cpp2
-rw-r--r--examples/graph_vgg_vdsr.cpp4
-rw-r--r--examples/graph_yolov3.cpp4
-rw-r--r--examples/neon_cnn.cpp12
22 files changed, 33 insertions, 33 deletions
diff --git a/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp b/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp
index c6818e48b0..8323bbd971 100644
--- a/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp
+++ b/examples/gemm_tuner/cl_gemmlowp_reshaped_rhs_only_fused_output_stage_fixedpoint.cpp
@@ -280,7 +280,7 @@ public:
const TensorInfo info_vector_sum_row(compute_reductionB_shape(*lhs.info()), 1, DataType::S32);
vector_sum_row.allocator()->init(info_vector_sum_row);
- mtx_a_reduction = support::cpp14::make_unique<CLGEMMLowpMatrixAReduction>();
+ mtx_a_reduction = std::make_unique<CLGEMMLowpMatrixAReduction>();
if(!mtx_a_reduction->validate(lhs.info(), vector_sum_row.info(), GEMMLowpReductionKernelInfo{}))
{
diff --git a/examples/graph_alexnet.cpp b/examples/graph_alexnet.cpp
index 40bbee1d68..ce398be6cf 100644
--- a/examples/graph_alexnet.cpp
+++ b/examples/graph_alexnet.cpp
@@ -70,7 +70,7 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 122.68f, 116.67f, 104.01f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_googlenet.cpp b/examples/graph_googlenet.cpp
index ed5cbd5120..0a53355611 100644
--- a/examples/graph_googlenet.cpp
+++ b/examples/graph_googlenet.cpp
@@ -66,7 +66,7 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 122.68f, 116.67f, 104.01f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_inception_resnet_v1.cpp b/examples/graph_inception_resnet_v1.cpp
index 7c0bb0ce48..7a55733a20 100644
--- a/examples/graph_inception_resnet_v1.cpp
+++ b/examples/graph_inception_resnet_v1.cpp
@@ -92,7 +92,7 @@ public:
}
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>(0.f, 1.f);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>(0.f, 1.f);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
@@ -207,7 +207,7 @@ public:
get_weights_accessor(data_path, "Logits_Logits_weights.npy", weights_layout),
get_weights_accessor(data_path, "Logits_Logits_biases.npy"))
.set_name("Logits/Logits")
- << OutputLayer(arm_compute::support::cpp14::make_unique<DummyAccessor>(0));
+ << OutputLayer(std::make_unique<DummyAccessor>(0));
// Finalize graph
GraphConfig config;
diff --git a/examples/graph_inception_resnet_v2.cpp b/examples/graph_inception_resnet_v2.cpp
index d14c34eb9d..60236d0780 100644
--- a/examples/graph_inception_resnet_v2.cpp
+++ b/examples/graph_inception_resnet_v2.cpp
@@ -76,7 +76,7 @@ public:
}
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>(0.f, 1.f);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>(0.f, 1.f);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_inception_v3.cpp b/examples/graph_inception_v3.cpp
index 4b6dc8d296..5cacbcb6e1 100644
--- a/examples/graph_inception_v3.cpp
+++ b/examples/graph_inception_v3.cpp
@@ -62,7 +62,7 @@ public:
std::string data_path = common_params.data_path;
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_inception_v4.cpp b/examples/graph_inception_v4.cpp
index 553c96d3e4..db2a31047e 100644
--- a/examples/graph_inception_v4.cpp
+++ b/examples/graph_inception_v4.cpp
@@ -66,7 +66,7 @@ public:
std::string data_path = common_params.data_path;
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_mobilenet.cpp b/examples/graph_mobilenet.cpp
index f74d25189d..b73f7a2abd 100644
--- a/examples/graph_mobilenet.cpp
+++ b/examples/graph_mobilenet.cpp
@@ -124,7 +124,7 @@ private:
std::string model_path = (model_id == 0) ? "/cnn_data/mobilenet_v1_1_224_model/" : "/cnn_data/mobilenet_v1_075_160_model/";
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Get trainable parameters data path
std::string data_path = common_params.data_path;
diff --git a/examples/graph_mobilenet_v2.cpp b/examples/graph_mobilenet_v2.cpp
index 5ee1f7e52a..fa16c94645 100644
--- a/examples/graph_mobilenet_v2.cpp
+++ b/examples/graph_mobilenet_v2.cpp
@@ -129,7 +129,7 @@ private:
const std::string model_path = "/cnn_data/mobilenet_v2_1.0_224_model/";
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Get trainable parameters data path
std::string data_path = common_params.data_path;
diff --git a/examples/graph_resnet12.cpp b/examples/graph_resnet12.cpp
index badcaec107..ebd2e5dd16 100644
--- a/examples/graph_resnet12.cpp
+++ b/examples/graph_resnet12.cpp
@@ -81,7 +81,7 @@ public:
const std::string model_path = "/cnn_data/resnet12_model/";
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Create input descriptor
const TensorShape tensor_shape = permute_shape(TensorShape(image_width, image_height, 3U, 1U), DataLayout::NCHW, common_params.data_layout);
@@ -128,7 +128,7 @@ public:
.set_name("conv12/convolution")
<< ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::TANH)).set_name("conv12/Tanh")
<< ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::LINEAR, 0.58f, 0.5f)).set_name("conv12/Linear")
- << OutputLayer(arm_compute::support::cpp14::make_unique<DummyAccessor>(0));
+ << OutputLayer(std::make_unique<DummyAccessor>(0));
// Finalize graph
GraphConfig config;
diff --git a/examples/graph_resnet50.cpp b/examples/graph_resnet50.cpp
index 2939ee40c4..47d258ede7 100644
--- a/examples/graph_resnet50.cpp
+++ b/examples/graph_resnet50.cpp
@@ -63,8 +63,8 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 122.68f, 116.67f, 104.01f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb,
- false /* Do not convert to BGR */);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb,
+ false /* Do not convert to BGR */);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_resnet_v2_50.cpp b/examples/graph_resnet_v2_50.cpp
index 32434f55dd..921fb145d6 100644
--- a/examples/graph_resnet_v2_50.cpp
+++ b/examples/graph_resnet_v2_50.cpp
@@ -67,7 +67,7 @@ public:
}
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_shufflenet.cpp b/examples/graph_shufflenet.cpp
index 08f884b75f..300d0f15a1 100644
--- a/examples/graph_shufflenet.cpp
+++ b/examples/graph_shufflenet.cpp
@@ -89,7 +89,7 @@ public:
const DataLayout weights_layout = DataLayout::NCHW;
// Create preprocessor
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>(0);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>(0);
graph << common_params.target
<< common_params.fast_math_hint
diff --git a/examples/graph_squeezenet.cpp b/examples/graph_squeezenet.cpp
index f0d620c67d..2e72c14763 100644
--- a/examples/graph_squeezenet.cpp
+++ b/examples/graph_squeezenet.cpp
@@ -63,7 +63,7 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 122.68f, 116.67f, 104.01f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_squeezenet_v1_1.cpp b/examples/graph_squeezenet_v1_1.cpp
index c60448639d..1708ac2f5a 100644
--- a/examples/graph_squeezenet_v1_1.cpp
+++ b/examples/graph_squeezenet_v1_1.cpp
@@ -63,7 +63,7 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 122.68f, 116.67f, 104.01f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_srcnn955.cpp b/examples/graph_srcnn955.cpp
index a95f0c1d25..bcc3824c60 100644
--- a/examples/graph_srcnn955.cpp
+++ b/examples/graph_srcnn955.cpp
@@ -78,7 +78,7 @@ public:
const std::string model_path = "/cnn_data/srcnn955_model/";
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Create input descriptor
const TensorShape tensor_shape = permute_shape(TensorShape(image_width, image_height, 3U, 1U), DataLayout::NCHW, common_params.data_layout);
@@ -111,7 +111,7 @@ public:
PadStrideInfo(1, 1, 2, 2))
.set_name("conv3/convolution")
<< ActivationLayer(ActivationLayerInfo(ActivationLayerInfo::ActivationFunction::RELU)).set_name("conv3/Relu")
- << OutputLayer(arm_compute::support::cpp14::make_unique<DummyAccessor>(0));
+ << OutputLayer(std::make_unique<DummyAccessor>(0));
// Finalize graph
GraphConfig config;
diff --git a/examples/graph_ssd_mobilenet.cpp b/examples/graph_ssd_mobilenet.cpp
index edd4c94d02..f5af84f4d4 100644
--- a/examples/graph_ssd_mobilenet.cpp
+++ b/examples/graph_ssd_mobilenet.cpp
@@ -216,7 +216,7 @@ private:
{
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 127.5f, 127.5f, 127.5f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb, true, 0.007843f);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb, true, 0.007843f);
// Get trainable parameters data path
std::string data_path = common_params.data_path;
diff --git a/examples/graph_vgg16.cpp b/examples/graph_vgg16.cpp
index 990040b5ef..a4c5e6bbd2 100644
--- a/examples/graph_vgg16.cpp
+++ b/examples/graph_vgg16.cpp
@@ -63,7 +63,7 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 123.68f, 116.779f, 103.939f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp
index 9215ba7b61..c95fb03368 100644
--- a/examples/graph_vgg19.cpp
+++ b/examples/graph_vgg19.cpp
@@ -62,7 +62,7 @@ public:
// Create a preprocessor object
const std::array<float, 3> mean_rgb{ { 123.68f, 116.779f, 103.939f } };
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<CaffePreproccessor>(mean_rgb);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<CaffePreproccessor>(mean_rgb);
// Create input descriptor
const auto operation_layout = common_params.data_layout;
diff --git a/examples/graph_vgg_vdsr.cpp b/examples/graph_vgg_vdsr.cpp
index 65c0642485..3fa7dd1330 100644
--- a/examples/graph_vgg_vdsr.cpp
+++ b/examples/graph_vgg_vdsr.cpp
@@ -79,7 +79,7 @@ public:
const std::string model_path = "/cnn_data/vdsr_model/";
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>();
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>();
// Create input descriptor
const TensorShape tensor_shape = permute_shape(TensorShape(image_width, image_height, 1U, 1U), DataLayout::NCHW, common_params.data_layout);
@@ -132,7 +132,7 @@ public:
// Add residual to input
graph << EltwiseLayer(std::move(left), std::move(right), EltwiseOperation::Add).set_name("add")
- << OutputLayer(arm_compute::support::cpp14::make_unique<DummyAccessor>(0));
+ << OutputLayer(std::make_unique<DummyAccessor>(0));
// Finalize graph
GraphConfig config;
diff --git a/examples/graph_yolov3.cpp b/examples/graph_yolov3.cpp
index c7f917ba6e..79d891a308 100644
--- a/examples/graph_yolov3.cpp
+++ b/examples/graph_yolov3.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 Arm Limited.
+ * Copyright (c) 2018-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -66,7 +66,7 @@ public:
std::string data_path = common_params.data_path;
// Create a preprocessor object
- std::unique_ptr<IPreprocessor> preprocessor = arm_compute::support::cpp14::make_unique<TFPreproccessor>(0.f);
+ std::unique_ptr<IPreprocessor> preprocessor = std::make_unique<TFPreproccessor>(0.f);
// Create input descriptor
const TensorShape tensor_shape = permute_shape(TensorShape(608U, 608U, 3U, 1U), DataLayout::NCHW, common_params.data_layout);
diff --git a/examples/neon_cnn.cpp b/examples/neon_cnn.cpp
index 85f8792b9c..339c8c1a81 100644
--- a/examples/neon_cnn.cpp
+++ b/examples/neon_cnn.cpp
@@ -53,10 +53,10 @@ public:
// The weights and biases tensors should be initialized with the values inferred with the training
// Set memory manager where allowed to manage internal memory requirements
- conv0 = arm_compute::support::cpp14::make_unique<NEConvolutionLayer>(mm_layers);
- conv1 = arm_compute::support::cpp14::make_unique<NEConvolutionLayer>(mm_layers);
- fc0 = arm_compute::support::cpp14::make_unique<NEFullyConnectedLayer>(mm_layers);
- softmax = arm_compute::support::cpp14::make_unique<NESoftmaxLayer>(mm_layers);
+ conv0 = std::make_unique<NEConvolutionLayer>(mm_layers);
+ conv1 = std::make_unique<NEConvolutionLayer>(mm_layers);
+ fc0 = std::make_unique<NEFullyConnectedLayer>(mm_layers);
+ softmax = std::make_unique<NESoftmaxLayer>(mm_layers);
/* [Initialize tensors] */
@@ -170,8 +170,8 @@ public:
// We need 2 memory groups for handling the input and output
// We call explicitly allocate after manage() in order to avoid overlapping lifetimes
- memory_group0 = arm_compute::support::cpp14::make_unique<MemoryGroup>(mm_transitions);
- memory_group1 = arm_compute::support::cpp14::make_unique<MemoryGroup>(mm_transitions);
+ memory_group0 = std::make_unique<MemoryGroup>(mm_transitions);
+ memory_group1 = std::make_unique<MemoryGroup>(mm_transitions);
memory_group0->manage(&out_conv0);
out_conv0.allocator()->allocate();