ArmNN
 25.11
Loading...
Searching...
No Matches
RefFillWorkload.cpp
Go to the documentation of this file.
1//
2// Copyright © 2020-2024 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
14namespace armnn
15{
16
18{
19 Execute(m_Data.m_Outputs);
20}
21
22void RefFillWorkload::Execute(std::vector<ITensorHandle*> outputs) const
23{
24 ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefFillWorkload_Execute");
25
26 const TensorInfo &outputTensorInfo = GetTensorInfo(outputs[0]);
27
28 std::unique_ptr<Encoder<float>> encoderPtr = MakeEncoder<float>(outputTensorInfo, outputs[0]->Map());
29 Encoder<float> &encoder = *encoderPtr;
30
31 Fill(encoder, outputTensorInfo.GetShape(), m_Data.m_Parameters.m_Value);
32}
33
34} //namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
void Execute() const override
const TensorShape & GetShape() const
Definition Tensor.hpp:193
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< Encoder< T > > MakeEncoder(const TensorInfo &info, void *data=nullptr)
armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)