telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Aron Virginas-Tar | c9cc804 | 2018-11-01 16:15:57 +0000 | [diff] [blame] | 8 | #include <cl/ClContextControl.hpp> |
Aron Virginas-Tar | 6057895 | 2018-10-31 11:04:01 +0000 | [diff] [blame] | 9 | #include <backendsCommon/WorkloadFactory.hpp> |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 10 | |
| 11 | template<bool ProfilingEnabled> |
| 12 | struct ClContextControlFixtureBase |
| 13 | { |
| 14 | // Initialising ClContextControl to ensure OpenCL is loaded correctly for each test case |
Matteo Martincigh | 539b44d | 2018-10-01 09:26:39 +0100 | [diff] [blame] | 15 | ClContextControlFixtureBase() |
Finn Williams | 4064632 | 2021-02-11 16:16:42 +0000 | [diff] [blame] | 16 | : m_ClContextControl(nullptr, nullptr, ProfilingEnabled) {} |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 17 | |
| 18 | armnn::ClContextControl m_ClContextControl; |
| 19 | }; |
| 20 | |
| 21 | using ClContextControlFixture = ClContextControlFixtureBase<false>; |
| 22 | using ClProfilingContextControlFixture = ClContextControlFixtureBase<true>; |