Clang Project

clang_source_code/test/PCH/cuda-kernel-call.cu
1// RUN: %clang_cc1 -emit-pch -o %t %s
2// RUN: %clang_cc1 -include-pch %t -fsyntax-only %s 
3
4#ifndef HEADER
5#define HEADER
6// Header.
7
8#include "Inputs/cuda.h"
9
10void kcall(void (*kp)()) {
11  kp<<<1, 1>>>();
12}
13
14__global__ void kern() {
15}
16
17#else
18// Using the header.
19
20void test() {
21  kcall(kern);
22  kern<<<1, 1>>>();
23}
24
25#endif
26