ArmNN
 22.11
RefFillWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "RefFillWorkload.hpp"
7 #include "Fill.hpp"
8 
9 #include "Decoders.hpp"
10 #include "Encoders.hpp"
11 #include "RefWorkloadUtils.hpp"
12 #include "Profiling.hpp"
13 
14 namespace armnn
15 {
16 
18 {
20 }
21 
23 {
24  WorkingMemDescriptor* workingMemDescriptor = static_cast<WorkingMemDescriptor*>(executionData.m_Data);
25  Execute(workingMemDescriptor->m_Outputs);
26 }
27 
28 void RefFillWorkload::Execute(std::vector<ITensorHandle*> outputs) const
29 {
30  ARMNN_SCOPED_PROFILING_EVENT(Compute::CpuRef, "RefFillWorkload_Execute");
31 
32  const TensorInfo &outputTensorInfo = GetTensorInfo(outputs[0]);
33 
34  std::unique_ptr<Encoder<float>> encoderPtr = MakeEncoder<float>(outputTensorInfo, outputs[0]->Map());
35  Encoder<float> &encoder = *encoderPtr;
36 
37  Fill(encoder, outputTensorInfo.GetShape(), m_Data.m_Parameters.m_Value);
38 }
39 
40 } //namespace armnn
CPU Execution: Reference C++ kernels.
Copyright (c) 2021 ARM Limited and Contributors.
void Execute() const override
#define ARMNN_SCOPED_PROFILING_EVENT(backendId, name)
Definition: Profiling.hpp:220
std::vector< ITensorHandle * > m_Outputs
void ExecuteAsync(ExecutionData &executionData) override
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers