aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJim Flynn <jim.flynn@arm.com>2019-05-22 14:24:13 +0100
committerJim Flynn <jim.flynn@arm.com>2019-05-28 17:50:33 +0100
commite242f2dc646f41e9162aaaf74e057ce39fcb92df (patch)
treed6c49b559c34d1d306b1e901501dded1c18f71c5 /include
parent2f2778f36e59537bbd47fb8b21e73c6c5a949584 (diff)
downloadarmnn-e242f2dc646f41e9162aaaf74e057ce39fcb92df.tar.gz
IVGCVSW-3119 Rename MergerLayer to ConcatLayer
!android-nn-driver:1210 Change-Id: I940b3b9e421c92bfd55ae996f7bc54ac077f2604 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/armnn/Descriptors.hpp10
-rw-r--r--include/armnn/DescriptorsFwd.hpp2
-rw-r--r--include/armnn/ILayerVisitor.hpp27
-rw-r--r--include/armnn/INetwork.hpp22
-rw-r--r--include/armnn/LayerVisitorBase.hpp4
-rw-r--r--include/armnn/Tensor.hpp1
6 files changed, 38 insertions, 28 deletions
diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp
index dcbb8c4675..25bf818987 100644
--- a/include/armnn/Descriptors.hpp
+++ b/include/armnn/Descriptors.hpp
@@ -54,8 +54,8 @@ struct SoftmaxDescriptor
float m_Beta;
};
-/// @brief An OriginsDescriptor for the MergerLayer.
-/// Descriptor to configure the merging process. Number of views must be equal to the number of inputs, and
+/// @brief An OriginsDescriptor for the ConcatLayer.
+/// Descriptor to configure the concatenation process. Number of views must be equal to the number of inputs, and
/// their order must match - e.g. first view corresponds to the first input, second view to the second input, etc.
struct OriginsDescriptor
{
@@ -144,12 +144,12 @@ OriginsDescriptor CreateMergerDescriptorForConcatenation(TensorShapeIt first,
return CreateDescriptorForConcatenation(first, last, concatenationDimension);
}
-/// @brief Convenience template to create an OriginsDescriptor to use when creating a MergerLayer for performing
+/// @brief Convenience template to create an OriginsDescriptor to use when creating a ConcatLayer for performing
/// concatenation of a number of input tensors.
template <typename TensorShapeIt>
OriginsDescriptor CreateDescriptorForConcatenation(TensorShapeIt first,
- TensorShapeIt last,
- unsigned int concatenationDimension)
+ TensorShapeIt last,
+ unsigned int concatenationDimension)
{
auto numInputs = std::distance(first, last);
diff --git a/include/armnn/DescriptorsFwd.hpp b/include/armnn/DescriptorsFwd.hpp
index affd6e26e6..4f47738915 100644
--- a/include/armnn/DescriptorsFwd.hpp
+++ b/include/armnn/DescriptorsFwd.hpp
@@ -31,6 +31,8 @@ struct SpaceToBatchNdDescriptor;
struct StridedSliceDescriptor;
struct ViewsDescriptor;
+// MergerDescriptor is deprecated use ConcatDescriptor instead
using MergerDescriptor = OriginsDescriptor;
+using ConcatDescriptor = OriginsDescriptor;
using SplitterDescriptor = ViewsDescriptor;
}
diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp
index 10d0cc6b63..cbddb2d9ac 100644
--- a/include/armnn/ILayerVisitor.hpp
+++ b/include/armnn/ILayerVisitor.hpp
@@ -4,6 +4,7 @@
//
#pragma once
+#include <armnn/Deprecated.hpp>
#include <armnn/DescriptorsFwd.hpp>
#include <armnn/NetworkFwd.hpp>
#include <armnn/Optional.hpp>
@@ -60,16 +61,19 @@ public:
/// Function that a concat layer should call back to when its Accept(ILayerVisitor&) function is invoked.
/// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param mergerDescriptor - WindowsDescriptor to configure the concatenation process. Number of Views must be
- /// equal to the number of inputs, and their order must match - e.g. first view
- /// corresponds to the first input, second view to the second input, etc....
+ /// @param concatDescriptor - ConcatDescriptor (synonym for OriginsDescriptor) to configure the concatenation
+ /// process. Number of Views must be equal to the number of inputs, and their order
+ /// must match - e.g. first view corresponds to the first input, second view to the
+ /// second input, etc....
/// @param name - Optional name for the layer.
virtual void VisitConcatLayer(const IConnectableLayer* layer,
- const OriginsDescriptor& mergerDescriptor,
+ const OriginsDescriptor& concatDescriptor,
const char* name = nullptr)
{
// default implementation to ease transition while MergerLayer is being deprecated
- VisitMergerLayer(layer, mergerDescriptor, name);
+ ARMNN_NO_DEPRECATE_WARN_BEGIN
+ VisitMergerLayer(layer, concatDescriptor, name);
+ ARMNN_NO_DEPRECATE_WARN_END
}
/// Function a layer with no inputs and a single output, which always corresponds to
@@ -221,13 +225,14 @@ public:
/// Function that a merger layer should call back to when its Accept(ILayerVisitor&) function is invoked.
/// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param mergerDescriptor - WindowsDescriptor to configure the merging process. Number of Views must be equal to
- /// the number of inputs, and their order must match - e.g. first view corresponds to
- /// the first input, second view to the second input, etc....
+ /// @param mergerDescriptor - MergerDescriptor (synonym for OriginsDescriptor) to configure the concatenation
+ /// process. Number of Views must be equal to the number of inputs, and their order
+ /// must match - e.g. first view corresponds to the first input, second view to the
+ /// second input, etc....
/// @param name - Optional name for the layer.
- // NOTE: this method will be deprecated and replaced by VisitConcatLayer
+ ARMNN_DEPRECATED_MSG("Use VisitConcatLayer instead")
virtual void VisitMergerLayer(const IConnectableLayer* layer,
- const OriginsDescriptor& mergerDescriptor,
+ const MergerDescriptor& mergerDescriptor,
const char* name = nullptr) = 0;
/// Function a Minimum layer should call back to when its Accept(ILayerVisitor&) function is invoked.
@@ -333,7 +338,7 @@ public:
/// Function that a splitter layer should call back to when its Accept(ILayerVisitor&) function is invoked.
/// @param layer - pointer to the layer which is calling back to this visit function.
- /// @param splitterDescriptor - WindowsDescriptor to configure the splitting process.
+ /// @param splitterDescriptor - ViewsDescriptor to configure the splitting process.
/// Number of Views must be equal to the number of outputs,
/// and their order must match - e.g. first view corresponds to
/// the first output, second view to the second output, etc....
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index ef8524377d..f3dfcd8841 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -103,12 +103,13 @@ public:
virtual IConnectableLayer* AddInputLayer(LayerBindingId id, const char* name = nullptr) = 0;
/// Adds a concatenation layer to the network.
- /// @param mergerDescriptor - WindowsDescriptor to configure the concatenation process. Number of Views must
- /// be equal to the number of inputs, and their order must match - e.g. first view
- /// corresponds to the first input, second view to the second input, etc....
+ /// @param concatDescriptor - ConcatDescriptor (synonym for OriginsDescriptor) to configure the concatenation
+ /// process. Number of Views must be equal to the number of inputs, and their order
+ /// must match - e.g. first view corresponds to the first input, second view to the
+ /// second input, etc....
/// @param name - Optional name for the layer.
/// @return - Interface for configuring the layer.
- virtual IConnectableLayer* AddConcatLayer(const OriginsDescriptor& mergerDescriptor,
+ virtual IConnectableLayer* AddConcatLayer(const ConcatDescriptor& concatDescriptor,
const char* name = nullptr) = 0;
/// Adds a 2D convolution layer to the network.
@@ -239,7 +240,7 @@ public:
const char* name = nullptr) = 0;
/// Adds a splitter layer to the network.
- /// @param splitterDescriptor - WindowsDescriptor to configure the splitting process.
+ /// @param splitterDescriptor - ViewsDescriptor to configure the splitting process.
/// Number of Views must be equal to the number of outputs,
/// and their order must match - e.g. first view corresponds to
/// the first output, second view to the second output, etc....
@@ -253,14 +254,15 @@ public:
/// @return - Interface for configuring the layer.
virtual IConnectableLayer* AddMergeLayer(const char* name = nullptr) = 0;
- /// Adds a merger layer to the network.
- /// @param mergerDescriptor - WindowsDescriptor to configure the merging process. Number of Views must be equal to
- /// the number of inputs, and their order must match - e.g. first view corresponds to
- /// the first input, second view to the second input, etc....
+ /// Adds a concat layer to the network.
+ /// @param mergerDescriptor - MergerDescriptor (synonym for OriginsDescriptor) to configure the concatenation
+ /// process. Number of Views must be equal to the number of inputs, and their order
+ /// must match - e.g. first view corresponds to the first input, second view to the
+ /// second input, etc....
/// @param name - Optional name for the layer.
/// @return - Interface for configuring the layer.
ARMNN_DEPRECATED_MSG("Use AddConcatLayer instead")
- virtual IConnectableLayer* AddMergerLayer(const OriginsDescriptor& mergerDescriptor,
+ virtual IConnectableLayer* AddMergerLayer(const MergerDescriptor& mergerDescriptor,
const char* name = nullptr) = 0;
/// Adds an addition layer to the network.
diff --git a/include/armnn/LayerVisitorBase.hpp b/include/armnn/LayerVisitorBase.hpp
index 657051f2fa..47a8384924 100644
--- a/include/armnn/LayerVisitorBase.hpp
+++ b/include/armnn/LayerVisitorBase.hpp
@@ -50,7 +50,7 @@ public:
const char*) override { DefaultPolicy::Apply(__func__); }
void VisitConcatLayer(const IConnectableLayer*,
- const OriginsDescriptor&,
+ const ConcatDescriptor&,
const char*) override { DefaultPolicy::Apply(__func__); }
void VisitConstantLayer(const IConnectableLayer*,
@@ -122,7 +122,7 @@ public:
const char*) override { DefaultPolicy::Apply(__func__); }
void VisitMergerLayer(const IConnectableLayer*,
- const OriginsDescriptor&,
+ const MergerDescriptor&,
const char*) override { DefaultPolicy::Apply(__func__); }
void VisitMinimumLayer(const IConnectableLayer*,
diff --git a/include/armnn/Tensor.hpp b/include/armnn/Tensor.hpp
index 3cde1ad9ab..b3a46290ae 100644
--- a/include/armnn/Tensor.hpp
+++ b/include/armnn/Tensor.hpp
@@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT
//
#pragma once
+
#include "TensorFwd.hpp"
#include "Exceptions.hpp"