aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjimfly01 <jim.flynn@arm.com>2019-01-24 22:29:33 +0000
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-01-25 14:10:53 +0000
commite9e7bfd09e3435d2bbb334e07c6a0a2514c80048 (patch)
treeae64daa5c6349ac821fb1b8534f8c9881dec0355 /include
parent5e9d29802e2cfbb13adc49c2a0ac9ba952dc7650 (diff)
downloadarmnn-e9e7bfd09e3435d2bbb334e07c6a0a2514c80048.tar.gz
IVGCVSW-2547 Add Accept function to IConnectableLayer
* Layers which callback VisitXXXLayer with ConstTensor have been implemented with dummies to speed up implementation and unblock IVGCVSW-2531 Change-Id: I49b8035f12ec72d6bd6cee95075692f98c48e193
Diffstat (limited to 'include')
-rw-r--r--include/armnn/ILayerVisitor.hpp13
-rw-r--r--include/armnn/INetwork.hpp3
2 files changed, 16 insertions, 0 deletions
diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp
index dd73a6fb44..c56be81bb2 100644
--- a/include/armnn/ILayerVisitor.hpp
+++ b/include/armnn/ILayerVisitor.hpp
@@ -13,6 +13,10 @@ namespace armnn
{
class ILayerVisitor
{
+protected:
+ ILayerVisitor() {}
+ virtual ~ILayerVisitor() {}
+
public:
/// Function that an InputLayer 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.
@@ -58,6 +62,15 @@ public:
const ConstTensor& weights,
const char* name = nullptr) = 0;
+ /// Function that a Detection PostProcess 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 descriptor - Description of the Detection PostProcess layer.
+ /// @param name - Optional name for the layer.
+ virtual void VisitDetectionPostProcessLayer(const IConnectableLayer* layer,
+ const DetectionPostProcessDescriptor& descriptor,
+ const char* name = nullptr) = 0;
+
/// Function that a 2D depthwise convolution layer with biases 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.
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 1f7354dd35..2213cee555 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -8,6 +8,7 @@
#include <armnn/DescriptorsFwd.hpp>
#include <armnn/TensorFwd.hpp>
#include <armnn/Optional.hpp>
+#include <armnn/ILayerVisitor.hpp>
#include <armnn/Types.hpp>
@@ -70,6 +71,8 @@ public:
virtual std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const = 0;
virtual LayerGuid GetGuid() const = 0;
+
+ virtual void Accept(ILayerVisitor& visitor) const = 0;
protected:
/// Objects are not deletable via the handle
~IConnectableLayer() {}