ArmNN
 20.11
RefRankWorkload.hpp
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 #pragma once
7 
10 
11 #include "RefWorkloadUtils.hpp"
12 
13 namespace armnn
14 {
15 
16 struct RefRankWorkload : public BaseWorkload<RankQueueDescriptor>
17 {
18 public:
20  virtual void Execute() const override
21  {
22  const int32_t rank = static_cast<int32_t>(GetTensorInfo(m_Data.m_Inputs[0]).GetNumDimensions());
23 
24  std::memcpy(GetOutputTensorData<void>(0, m_Data), &rank, sizeof(int32_t));
25  }
26 };
27 
28 } //namespace armnn
29 
30 
31 
32 
const RankQueueDescriptor m_Data
Definition: Workload.hpp:46
Copyright (c) 2020 ARM Limited.
virtual void Execute() const override
std::vector< ITensorHandle * > m_Inputs
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
unsigned int GetNumDimensions() const
Definition: Tensor.hpp:191