bolt/deps/llvm-18.1.8/clang/test/SemaCUDA/implicit-host-device-fun.cu

23 lines
532 B
Text
Raw Normal View History

2025-02-14 19:21:04 +01:00
// 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);
}