aboutsummaryrefslogtreecommitdiff
path: root/clang/test/SemaCUDA/implicit-host-device-fun.cu
blob: f73a48f2f11ea8172790a0b0a9af4655f4e7ea1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang_cc1 -isystem %S/Inputs  -fsyntax-only %s
// RUN: %clang_cc1 -isystem %S/Inputs -fcuda-is-device  -fsyntax-only %s
// RUN: %clang_cc1 -isystem %S/Inputs -foffload-implicit-host-device-templates -fsyntax-only %s
// RUN: %clang_cc1 -isystem %S/Inputs -foffload-implicit-host-device-templates -fcuda-is-device  -fsyntax-only %s

#include <cuda.h>

template<typename T>
void tempf(T x) {
}

template<typename T>
__device__ void tempf(T x) {
}

void host_fun() {
  tempf(1);
}

__device__ void device_fun() {
  tempf(1);
}