aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Layer.cpp
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2018-09-18 16:02:25 +0100
committerMatthew Bentham <matthew.bentham@arm.com>2018-10-10 16:16:56 +0100
commit0cff16365b2ebb4d02929b86a304b91df19a985c (patch)
tree98e9cb30daedd0ff8e83abc85cba2991a67732f3 /src/armnn/Layer.cpp
parent58f3919fb34a1aae42857c53360f1d569f5d31f9 (diff)
downloadarmnn-0cff16365b2ebb4d02929b86a304b91df19a985c.tar.gz
IVGCVSW-1883 Add support for different memory layouts
Change-Id: I6e9973bf25acad980fb4e96af8080ac829db0d28
Diffstat (limited to 'src/armnn/Layer.cpp')
-rw-r--r--src/armnn/Layer.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/armnn/Layer.cpp b/src/armnn/Layer.cpp
index 48ab8b5dbe..b0a3ac543b 100644
--- a/src/armnn/Layer.cpp
+++ b/src/armnn/Layer.cpp
@@ -124,10 +124,15 @@ LayerGuid GenerateLayerGuid()
}
} // namespace
-Layer::Layer(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char* name)
+Layer::Layer(unsigned int numInputSlots,
+ unsigned int numOutputSlots,
+ LayerType type,
+ DataLayout layout,
+ const char* name)
: m_OutputHandlers(numOutputSlots)
, m_LayerName(name ? name : "")
, m_Type(type)
+, m_DataLayout(layout)
, m_ComputeDevice(Compute::Undefined)
, m_Guid(GenerateLayerGuid())
{
@@ -144,6 +149,14 @@ Layer::Layer(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType
}
}
+Layer::Layer(unsigned int numInputSlots,
+ unsigned int numOutputSlots,
+ LayerType type,
+ const char* name)
+: Layer(numInputSlots, numOutputSlots, type, DataLayout::NCHW, name)
+{
+}
+
void Layer::CollectWorkloadInputs(WorkloadDataCollector& dataCollector, const Graph& graph) const
{
for (auto&& inputSlot : GetInputSlots())