ArmNN
 20.02
OutputHandler.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "OutputHandler.hpp"
7 
11 
12 #include <boost/assert.hpp>
13 
14 namespace armnn
15 {
16 
18 {
19  m_TensorInfo = tensorInfo;
20  m_bTensorInfoSet = true;
21 }
22 
23 void OutputHandler::CreateTensorHandles(const IWorkloadFactory& factory, const bool IsMemoryManaged)
24 {
25  m_TensorHandle = factory.CreateTensorHandle(m_TensorInfo, IsMemoryManaged);
26 }
27 
28 void OutputHandler::CreateTensorHandles(const ITensorHandleFactory& factory, const bool IsMemoryManaged)
29 {
30  m_TensorHandle = factory.CreateTensorHandle(m_TensorInfo, IsMemoryManaged);
31 }
32 
34 {
35  dataCollector.Push(m_TensorHandle.get(), m_TensorInfo);
36 }
37 
38 } // namespace armnn
Copyright (c) 2020 ARM Limited.
void CreateTensorHandles(const IWorkloadFactory &factory, const bool IsMemoryManaged=true)
Creates tensor handles used by the intermediate tensors.
void CollectWorkloadOutputs(WorkloadDataCollector &dataCollector) const
Fill the outputs for a given queue descriptor.
void Push(ITensorHandle *handle, const TensorInfo &info)
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0
void SetTensorInfo(const TensorInfo &tensorInfo)
Sets the TensorInfo used by this output handler.
virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo) const =0