ArmNN
 25.02
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RefReverseV2Workload.cpp
Go to the documentation of this file.
1 //
2 // Copyright © 2023-2024 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include "ReverseV2Impl.hpp"
9 #include "RefWorkloadUtils.hpp"
10 #include "Profiling.hpp"
11 
12 namespace armnn
13 {
14 
16  : RefBaseWorkload(descriptor, info)
17  {}
18 
20  {
22  }
23 
24  void RefReverseV2Workload::Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const
25  {
26  ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID("RefReverseV2Workload_Execute");
27 
28  const TensorInfo& inputInfo = GetTensorInfo(inputs[0]);
29  const TensorInfo& axisInfo = GetTensorInfo(inputs[1]);
30 
31  std::unique_ptr<Decoder<float>> inputDecoder = MakeDecoder<float>(GetTensorInfo(inputs[0]),
32  inputs[0]->Map());
33 
34  std::unique_ptr<Decoder<int>> axisDecoder = MakeDecoder<int>(GetTensorInfo(inputs[1]),
35  inputs[1]->Map());
36 
37  std::unique_ptr<Encoder<float>> outputEncoder = MakeEncoder<float>(GetTensorInfo(outputs[0]),
38  outputs[0]->Map());
39 
40  ReverseV2(inputInfo,
41  axisInfo,
42  *inputDecoder,
43  *axisDecoder,
44  *outputEncoder);
45  }
46 
47 } // namespace armnn
#define ARMNN_SCOPED_PROFILING_EVENT_REF_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
RefReverseV2Workload(const ReverseV2QueueDescriptor &descriptor, const WorkloadInfo &info)
Copyright (c) 2021 ARM Limited and Contributors.
void ReverseV2(const TensorInfo &inputInfo, const TensorInfo &axisInfo, Decoder< float > &inputDecoder, Decoder< int > &axisDecoder, Encoder< float > &outputEncoder)
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
std::vector< ITensorHandle * > m_Inputs
std::vector< ITensorHandle * > m_Outputs
Contains information about TensorInfos of a layer.