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
8
#include <
backendsCommon/Workload.hpp
>
9
#include <
backendsCommon/WorkloadData.hpp
>
10
11
#include "
RefWorkloadUtils.hpp
"
12
13
namespace
armnn
14
{
15
16
struct
RefRankWorkload
:
public
BaseWorkload
<RankQueueDescriptor>
17
{
18
public
:
19
using
BaseWorkload<RankQueueDescriptor>::BaseWorkload
;
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
WorkloadData.hpp
RefWorkloadUtils.hpp
armnn::BaseWorkload< RankQueueDescriptor >::m_Data
const RankQueueDescriptor m_Data
Definition:
Workload.hpp:46
armnn
Copyright (c) 2020 ARM Limited.
Definition:
00_introduction.dox:25
armnn::RefRankWorkload
Definition:
RefRankWorkload.hpp:16
armnn::BaseWorkload
Definition:
Workload.hpp:28
armnn::RefRankWorkload::Execute
virtual void Execute() const override
Definition:
RefRankWorkload.hpp:20
Workload.hpp
armnn::QueueDescriptor::m_Inputs
std::vector< ITensorHandle * > m_Inputs
Definition:
WorkloadData.hpp:30
armnn::GetTensorInfo
const TensorInfo & GetTensorInfo(const ITensorHandle *tensorHandle)
float32 helpers
Definition:
RefWorkloadUtils.hpp:26
armnn::TensorInfo::GetNumDimensions
unsigned int GetNumDimensions() const
Definition:
Tensor.hpp:191
src
backends
reference
workloads
RefRankWorkload.hpp
Generated on Wed Nov 25 2020 09:59:14 for ArmNN by
1.8.13