aboutsummaryrefslogtreecommitdiff
path: root/src/backends/cl/test/ClContextControlFixture.hpp
blob: d1b25146937fd1b7d0fc98f1a4ba7d176f850f2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include <cl/ClContextControl.hpp>
#include <armnn/backends/WorkloadFactory.hpp>

template<bool ProfilingEnabled>
struct ClContextControlFixtureBase
{
    // Initialising ClContextControl to ensure OpenCL is loaded correctly for each test case
    ClContextControlFixtureBase()
        : m_ClContextControl(nullptr, nullptr, ProfilingEnabled) {}

    armnn::ClContextControl m_ClContextControl;
};

using ClContextControlFixture = ClContextControlFixtureBase<false>;
using ClProfilingContextControlFixture = ClContextControlFixtureBase<true>;