ArmNN
 26.01
Loading...
Searching...
No Matches
RefActivationWorkload.cpp
Go to the documentation of this file.
1//
2// Copyright © 2017,2019-2024 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
7
8#include "Activation.hpp"
9#include "Decoders.hpp"
10#include "Encoders.hpp"
11#include "RefWorkloadUtils.hpp"
12
13#include "Profiling.hpp"
14
15namespace armnn
16{
17
22
23void RefActivationWorkload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
24{
25 ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefActivationWorkload_Execute");
26
27 const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
28 const TensorInfo& outputInfo = GetTensorInfo(outputs[0]);
29
30 Activation(*MakeDecoder<float>(inputInfo, inputs[0]->Map()),
31 *MakeEncoder<float>(outputInfo, outputs[0]->Map()),
32 inputInfo,
33 m_Data.m_Parameters.m_Function,
34 m_Data.m_Parameters.m_A,
35 m_Data.m_Parameters.m_B);
36}
37
38
39} //namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
QueueDescriptor m_Data
Definition Workload.hpp:74
Copyright (c) 2021 ARM Limited and Contributors.
armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)
std::vector< ITensorHandle * > m_Inputs
std::vector< ITensorHandle * > m_Outputs