Debian Codegraph @

clang/test/SemaCUDA/implicit-host-device-fun.cu

raw
1 // RUN: %clang_cc1 -isystem %S/Inputs -fsyntax-only %s
2 // RUN: %clang_cc1 -isystem %S/Inputs -fcuda-is-device -fsyntax-only %s
3 // RUN: %clang_cc1 -isystem %S/Inputs -foffload-implicit-host-device-templates -fsyntax-only %s
4 // RUN: %clang_cc1 -isystem %S/Inputs -foffload-implicit-host-device-templates -fcuda-is-device -fsyntax-only %s
5
6 #include <cuda.h>
7
8 template<typename T>
9 void tempf(T x) {
10 }
11
12 template<typename T>
13 __device__ void tempf(T x) {
14 }
15
16 void host_fun() {
17 tempf(1);
18 }
19
20 __device__ void device_fun() {
21 tempf(1);
22 }