aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/NeonInterceptorScheduler.hpp
blob: b8ecbd59c2e6b8b2b50717368c8d572138e8ac5d (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
34
35
36
37
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// See LICENSE file in the project root for full license information.
//
#pragma once

#include "NeonTimer.hpp"
#include "WallClockTimer.hpp"

#include <arm_compute/runtime/IScheduler.h>
#include <arm_compute/runtime/Scheduler.h>
#include <arm_compute/core/CPP/ICPPKernel.h>

namespace armnn
{

class NeonInterceptorScheduler : public arm_compute::IScheduler
{
public:
    NeonInterceptorScheduler(NeonTimer::KernelMeasurements &kernels, arm_compute::IScheduler &realScheduler);
    ~NeonInterceptorScheduler() = default;

    void set_num_threads(unsigned int numThreads) override;

    unsigned int num_threads() const override;

    void schedule(arm_compute::ICPPKernel *kernel, const Hints &hints) override;

    void run_workloads(std::vector<Workload> &workloads) override;

private:
    NeonTimer::KernelMeasurements& m_Kernels;
    arm_compute::IScheduler& m_RealScheduler;
    WallClockTimer m_Timer;
};

} // namespace armnn