ArmNN
 22.11
RefDebugWorkload.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #pragma once
7 
8 #include <armnn/TypesUtils.hpp>
9 
10 #include "RefBaseWorkload.hpp"
11 
12 namespace armnn
13 {
14 
15 template <armnn::DataType DataType>
16 class RefDebugWorkload : public TypedWorkload<DebugQueueDescriptor, DataType>
17 {
18 public:
20  : TypedWorkload<DebugQueueDescriptor, DataType>(descriptor, info)
21  , m_Callback(nullptr) {}
22 
23  static const std::string& GetName()
24  {
25  static const std::string name = std::string("RefDebug") + GetDataTypeName(DataType) + "Workload";
26  return name;
27  }
28 
31 
32  void Execute() const override;
33  void ExecuteAsync(ExecutionData& executionData) override;
34 
35  void RegisterDebugCallback(const DebugCallbackFunction& func) override;
36 
37 private:
38  void Execute(std::vector<ITensorHandle*> inputs) const;
39  DebugCallbackFunction m_Callback;
40 };
41 
50 
51 } // namespace armnn
void Execute() const override
static const std::string & GetName()
Copyright (c) 2021 ARM Limited and Contributors.
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
Definition: Types.hpp:379
constexpr const char * GetDataTypeName(DataType dataType)
Definition: TypesUtils.hpp:202
DataType
Definition: Types.hpp:48
Contains information about TensorInfos of a layer.
void ExecuteAsync(ExecutionData &executionData) override
RefDebugWorkload(const DebugQueueDescriptor &descriptor, const WorkloadInfo &info)
void RegisterDebugCallback(const DebugCallbackFunction &func) override