5
5
6
6
#include " Inputs/sycl.hpp"
7
7
8
+ namespace std {
9
+ typedef long unsigned int size_t ;
10
+ } // namespace std
11
+
8
12
enum unscoped_enum : int {
9
13
val_1,
10
14
val_2
@@ -110,6 +114,14 @@ class dummy_functor_8 {
110
114
void operator ()() const {}
111
115
};
112
116
117
+ enum class TestStdEnum : std::size_t { A, B };
118
+
119
+ template <TestStdEnum value>
120
+ class dummy_functor_9 {
121
+ public:
122
+ void operator ()() const {}
123
+ };
124
+
113
125
int main () {
114
126
115
127
dummy_functor_1<no_namespace_int::val_1> f1;
@@ -121,6 +133,7 @@ int main() {
121
133
dummy_functor_7<no_namespace_int> f7;
122
134
dummy_functor_7<internal::namespace_short> f8 ;
123
135
dummy_functor_8<EnumTypeOut, Baz> f9;
136
+ dummy_functor_9<TestStdEnum::A> f10;
124
137
125
138
sycl::queue q;
126
139
@@ -168,6 +181,10 @@ int main() {
168
181
cgh.single_task (f9);
169
182
});
170
183
184
+ q.submit ([&](sycl::handler &cgh) {
185
+ cgh.single_task (f10);
186
+ });
187
+
171
188
return 0 ;
172
189
}
173
190
@@ -198,6 +215,8 @@ int main() {
198
215
// NUL: enum class EnumValueIn : int;
199
216
// NUL: template <EnumValueIn EnumValue, typename EnumTypeIn> class Baz;
200
217
// NUL: template <typename EnumTypeOut, template <EnumValueIn EnumValue, typename EnumTypeIn> class T> class dummy_functor_8;
218
+ // NUL: enum class TestStdEnum : unsigned long;
219
+ // NUL: template <TestStdEnum value> class dummy_functor_9;
201
220
202
221
// CHECK: Specializations of KernelInfo for kernel function types:
203
222
// NUL: template <> struct KernelInfo<::dummy_functor_1<static_cast<::no_namespace_int>(0)>>
@@ -220,3 +239,5 @@ int main() {
220
239
// CHECK: template <> struct KernelInfo<::T1<::T3<::type_argument_template_enum::E>>>
221
240
// NUL: template <> struct KernelInfo<::dummy_functor_8<::EnumTypeOut, Baz>>
222
241
// UL: template <> struct KernelInfoData<'_', 'Z', 'T', 'S', '1', '5', 'd', 'u', 'm', 'm', 'y', '_', 'f', 'u', 'n', 'c', 't', 'o', 'r', '_', '8', 'I', '1', '1', 'E', 'n', 'u', 'm', 'T', 'y', 'p', 'e', 'O', 'u', 't', '3', 'B', 'a', 'z', 'E'>
242
+ // NUL: template <> struct KernelInfo<::dummy_functor_9<static_cast<::TestStdEnum>(0)>> {
243
+ // UL: template <> struct KernelInfoData<'_', 'Z', 'T', 'S', '1', '5', 'd', 'u', 'm', 'm', 'y', '_', 'f', 'u', 'n', 'c', 't', 'o', 'r', '_', '9', 'I', 'L', '1', '1', 'T', 'e', 's', 't', 'S', 't', 'd', 'E', 'n', 'u', 'm', '0', 'E', 'E'>
0 commit comments