Skip to content

Commit 3e0e4bb

Browse files
committed
[WIP] Add test
1 parent 6ba5063 commit 3e0e4bb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown -sycl-std=2020 -fsycl-int-header=%t.h %s
2+
// RUN: FileCheck -input-file=%t.h %s
3+
4+
// This test checks integration header contents free functions kernels in
5+
// presense of template arguments.
6+
7+
#include "mock_properties.hpp"
8+
#include "sycl.hpp"
9+
10+
namespace ns {
11+
12+
struct notatuple {
13+
int a;
14+
};
15+
16+
template <typename T, typename = int, int a = 12, typename = notatuple, typename ...TS> struct Arg {
17+
T val;
18+
};
19+
20+
[[__sycl_detail__::add_ir_attributes_function("sycl-single-task-kernel",
21+
2)]] void
22+
simple(Arg<char>){
23+
}
24+
25+
}
26+
27+
28+
template <typename T>
29+
[[__sycl_detail__::add_ir_attributes_function("sycl-nd-range-kernel", 2)]] void
30+
templated(ns::Arg<T, float, 3>, T end) {
31+
}
32+
33+
template void templated(ns::Arg<int, float, 3>, int);
34+
35+
using namespace ns;

0 commit comments

Comments
 (0)