24.08
MemImportWorkload.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 <
ResolveType.hpp
>
7
8
#include <
backendsCommon/MemImportWorkload.hpp
>
9
#include <
armnn/backends/TensorHandle.hpp
>
10
11
#include <cstring>
12
13
namespace
armnn
14
{
15
16
ImportMemGenericWorkload::ImportMemGenericWorkload
(
const
MemImportQueueDescriptor
& descriptor,
17
const
WorkloadInfo
& info)
18
:
BaseWorkload
<
MemImportQueueDescriptor
>(descriptor,
info
)
19
{
20
m_TensorHandlePairs = std::make_pair(descriptor.
m_Inputs
[0], descriptor.
m_Outputs
[0]);
21
}
22
23
void
ImportMemGenericWorkload::Execute
()
const
24
{
25
ARMNN_SCOPED_PROFILING_EVENT
(
Compute::Undefined
,
"ImportMemGeneric_Execute"
);
26
27
m_TensorHandlePairs.second->Import(
const_cast<
void
*
>
(m_TensorHandlePairs.first->Map(
true
)),
MemorySource::Malloc
);
28
m_TensorHandlePairs.first->Unmap();
29
}
30
31
}
//namespace armnn
armnn::MemorySource::Malloc
@ Malloc
armnn::Compute::Undefined
@ Undefined
armnn::ImportMemGenericWorkload::Execute
void Execute() const override
Definition:
MemImportWorkload.cpp:23
ResolveType.hpp
ARMNN_SCOPED_PROFILING_EVENT
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition:
Profiling.hpp:220
armnn::WorkloadInfo
Contains information about TensorInfos of a layer.
Definition:
WorkloadInfo.hpp:16
armnn::ImportMemGenericWorkload::ImportMemGenericWorkload
ImportMemGenericWorkload(const MemImportQueueDescriptor &descriptor, const WorkloadInfo &info)
Definition:
MemImportWorkload.cpp:16
armnn::BoostLogSeverityMapping::info
@ info
armnn::QueueDescriptor::m_Outputs
std::vector< ITensorHandle * > m_Outputs
Definition:
WorkloadData.hpp:27
armnn::BaseWorkload
Definition:
Workload.hpp:33
MemImportWorkload.hpp
TensorHandle.hpp
armnn
Copyright (c) 2021 ARM Limited and Contributors.
Definition:
01_00_quick_start.dox:6
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition:
WorkloadData.hpp:26
armnn::MemImportQueueDescriptor
Definition:
WorkloadData.hpp:94
src
backends
backendsCommon
MemImportWorkload.cpp
Generated on Wed Aug 28 2024 14:31:49 for Arm NN by
1.8.17