forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathint_header_sycl2020_spec_const.cpp
More file actions
29 lines (24 loc) · 1.1 KB
/
int_header_sycl2020_spec_const.cpp
File metadata and controls
29 lines (24 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple nvptx64-unknown-unknown -fsycl-int-header=%t.h %s -o %t.out %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s --check-prefix=NONATIVESUPPORT --check-prefix=ALL
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out %s -o %t.out
// RUN: FileCheck -input-file=%t.h %s --check-prefix=NATIVESUPPORT --check-prefix=ALL
// This test checks that the compiler generates required information
// in integration header for kernel_handler type (SYCL 2020 specialization
// constants).
#include "sycl.hpp"
using namespace cl::sycl;
queue q;
int main() {
q.submit([&](handler &h) {
int a;
kernel_handler kh;
h.single_task<class test_kernel_handler>(
[=](auto) {
int local = a;
},
kh);
});
}
// ALL: const kernel_param_desc_t kernel_signatures[] = {
// NONATIVESUPPORT: { kernel_param_kind_t::kind_specialization_constants_buffer, 8, 0 }
// NATIVESUPPORT-NOT: { kernel_param_kind_t::kind_specialization_constants_buffer, 8, 0 }