aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/RefElementwiseUnaryWorkload.hpp
blob: efb2865ebd3d7b554ebe542648bfcc2284d3c448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// Copyright © 2019 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include "BaseIterator.hpp"

#include <backendsCommon/Workload.hpp>
#include <backendsCommon/WorkloadData.hpp>

namespace armnn
{

class RefElementwiseUnaryWorkload : public BaseWorkload<ElementwiseUnaryQueueDescriptor>
{
public:
    using BaseWorkload<ElementwiseUnaryQueueDescriptor>::m_Data;

    RefElementwiseUnaryWorkload(const ElementwiseUnaryQueueDescriptor& descriptor, const WorkloadInfo& info);
    void PostAllocationConfigure() override;
    void Execute() const override;

private:
    using InType  = float;
    using OutType = float;

    std::unique_ptr<Decoder<InType>>  m_Input;
    std::unique_ptr<Encoder<OutType>> m_Output;
};

} // namespace armnn