blob: d3e65e66158e86e8149c54efcc1e0b86075305cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "RefConstantWorkload.hpp"
#include "RefWorkloadUtils.hpp"
#include <armnn/Types.hpp>
#include <armnn/utility/Assert.hpp>
#include <cstring>
namespace armnn
{
RefConstantWorkload::RefConstantWorkload(
const ConstantQueueDescriptor& descriptor, const WorkloadInfo& info)
: BaseWorkload<ConstantQueueDescriptor>(descriptor, info) {}
void RefConstantWorkload::PostAllocationConfigure()
{
const ConstantQueueDescriptor& data = this->m_Data;
ARMNN_ASSERT(data.m_LayerOutput != nullptr);
const TensorInfo& outputInfo = GetTensorInfo(data.m_Outputs[0]);
ARMNN_ASSERT(data.m_LayerOutput->GetTensorInfo().GetNumBytes() == outputInfo.GetNumBytes());
memcpy(GetOutputTensorData<void>(0, data), data.m_LayerOutput->GetConstTensor<void>(),
outputInfo.GetNumBytes());
}
void RefConstantWorkload::Execute() const
{
ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefConstantWorkload_Execute");
}
} //namespace armnn
|