Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 7357feb

Browse files
committed
Additional fix for one of LIT tests
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
1 parent 33ad79c commit 7357feb

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

SYCL/Basic/host-task-dependency.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@
66
// TODO: Behaviour is unstable for level zero on Windows. Enable when fixed.
77
// UNSUPPORTED: windows && level_zero
88

9+
#define SYCL2020_DISABLE_DEPRECATION_WARNINGS
10+
11+
#include <CL/sycl.hpp>
12+
913
#include <atomic>
1014
#include <condition_variable>
1115
#include <future>
1216
#include <mutex>
1317
#include <thread>
1418

15-
#include <CL/sycl.hpp>
16-
1719
namespace S = cl::sycl;
1820

21+
template <typename T, bool B>
22+
class NameGen;
23+
1924
struct Context {
2025
std::atomic_bool Flag;
2126
S::queue &Queue;
@@ -93,7 +98,7 @@ template <bool UseSYCL2020HostTask> void Thread1Fn(Context *Ctx) {
9398
GeneratorAcc[Idx] = Idx;
9499
};
95100

96-
CGH.single_task<class GeneratorTask>(GeneratorKernel);
101+
CGH.single_task<NameGen<class Gen, UseSYCL2020HostTask>>(GeneratorKernel);
97102
});
98103

99104
// 2. submit host task writing from buf 1 to buf 2
@@ -114,7 +119,7 @@ template <bool UseSYCL2020HostTask> void Thread1Fn(Context *Ctx) {
114119
DstAcc[Idx] = SrcAcc[Idx];
115120
};
116121

117-
CGH.single_task<class CopierTask>(CopierKernel);
122+
CGH.single_task<NameGen<class Copier, UseSYCL2020HostTask>>(CopierKernel);
118123
});
119124

120125
// 4. check data in buffer #3
@@ -155,7 +160,8 @@ template <bool UseSYCL2020HostTask> void test() {
155160
Context Ctx{{false}, Queue, {10}, {10}, {10}, {}, {}};
156161

157162
// 0. setup: thread 1 T1: exec smth; thread 2 T2: waits; init flag F = false
158-
auto A1 = std::async(std::launch::async, Thread1Fn<true>, &Ctx);
163+
auto A1 =
164+
std::async(std::launch::async, Thread1Fn<UseSYCL2020HostTask>, &Ctx);
159165
auto A2 = std::async(std::launch::async, Thread2Fn, &Ctx);
160166

161167
A1.get();

0 commit comments

Comments
 (0)