ArmNN
 21.02
ClFillWorkload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "ClFillWorkload.hpp"
7 
8 #include "ClWorkloadUtils.hpp"
9 
10 #include <cl/ClTensorHandle.hpp>
12 #include <arm_compute/core/Types.h>
13 
14 namespace armnn
15 {
16 using namespace armcomputetensorutils;
17 
19  const WorkloadInfo& info,
20  const arm_compute::CLCompileContext& clCompileContext)
21  : BaseWorkload<FillQueueDescriptor>(descriptor, info)
22 {
23  m_Data.ValidateInputsOutputs("ClFillWorkload", 1, 1);
24 
25  arm_compute::ICLTensor& output = static_cast<IClTensorHandle*>(this->m_Data.m_Outputs[0])->GetTensor();
26  arm_compute::PixelValue pixelValue = GetPixelValue(output, descriptor.m_Parameters.m_Value);
27 
28  m_Layer.configure(clCompileContext, &output, pixelValue);
29 }
30 
32 {
33  ARMNN_SCOPED_PROFILING_EVENT_CL("ClFillWorkload_Execute");
34  RunClFunction(m_Layer, CHECK_LOCATION());
35 }
36 
37 } // namespace armnn
ClFillWorkload(const FillQueueDescriptor &descriptor, const WorkloadInfo &info, const arm_compute::CLCompileContext &clCompileContext)
#define ARMNN_SCOPED_PROFILING_EVENT_CL(name)
void RunClFunction(arm_compute::IFunction &function, const CheckLocation &location)
const FillQueueDescriptor m_Data
Definition: Workload.hpp:46
void ValidateInputsOutputs(const std::string &descName, unsigned int numExpectedIn, unsigned int numExpectedOut) const
Copyright (c) 2021 ARM Limited and Contributors.
void Execute() const override
#define CHECK_LOCATION()
Definition: Exceptions.hpp:197
std::vector< ITensorHandle * > m_Outputs
Contains information about inputs and outputs to a layer.