aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/GatherLayer.hpp
diff options
context:
space:
mode:
authornarpra01 <narumol.prangnawarat@arm.com>2019-01-16 09:53:09 +0000
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-01-16 16:30:10 +0000
commitb89b05f048a566a8c825f1d223966bc5a6abc3d5 (patch)
tree1a7027e329fd687456a165a0d88be865626a407b /src/armnn/layers/GatherLayer.hpp
parent6c8e8e7594604cca672486db224c1d041b39bfb9 (diff)
downloadarmnn-b89b05f048a566a8c825f1d223966bc5a6abc3d5.tar.gz
IVGCVSW-2508 Add no-op factory implementations and layer for Gather operator
* Added GatherQueueDescriptor to WorkloadData * Added CreateGather function in WorkloadFactory.hpp * Added stub implementation of the CreateGreater function in workload factories * Added GatherLayer stub implementation * Added AddGatherLayer to Network * Added IsGatherSupported to LayerSupportBase Change-Id: I0408fd54e88a7d4e3d9e1c2811a9323f0da52a04
Diffstat (limited to 'src/armnn/layers/GatherLayer.hpp')
-rw-r--r--src/armnn/layers/GatherLayer.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/armnn/layers/GatherLayer.hpp b/src/armnn/layers/GatherLayer.hpp
new file mode 100644
index 0000000000..7b3aebe77e
--- /dev/null
+++ b/src/armnn/layers/GatherLayer.hpp
@@ -0,0 +1,41 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include "Layer.hpp"
+
+namespace armnn
+{
+
+/// This layer represents a Gather operator.
+class GatherLayer : public Layer
+{
+public:
+ /// Makes a workload for the Gather type.
+ /// @param [in] graph The graph where this layer can be found.
+ /// @param [in] factory The workload factory which will create the workload.
+ /// @return A pointer to the created workload, or nullptr if not created.
+ virtual std::unique_ptr<IWorkload> CreateWorkload(const Graph& graph,
+ const IWorkloadFactory& factory) const override;
+
+ /// Creates a dynamically-allocated copy of this layer.
+ /// @param [in] graph The graph into which this layer is being cloned.
+ GatherLayer* Clone(Graph& graph) const override;
+
+ /// Check if the input tensor shape(s)
+ /// will lead to a valid configuration of @ref GatherLayer.
+ void ValidateTensorShapesFromInputs() override;
+
+protected:
+ /// Constructor to create a GatherLayer.
+ /// @param [in] name Optional name for the layer.
+ GatherLayer(const char* name);
+
+ /// Default destructor
+ ~GatherLayer() = default;
+};
+
+} // namespace armnn