• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -triple nvptx -fcuda-is-device \
2 // RUN:   -emit-llvm -o - %s \
3 // RUN:   | FileCheck -check-prefix=NORDC %s
4 // RUN: %clang_cc1 -triple nvptx -fcuda-is-device \
5 // RUN:   -fgpu-rdc -emit-llvm -o - %s \
6 // RUN:   | FileCheck -check-prefix=RDC %s
7 
8 #include "Inputs/cuda.h"
9 
10 // NORDC: define internal void @_Z4funcIiEvv()
11 // NORDC: define void @_Z6kernelIiEvv()
12 // RDC: define weak_odr void @_Z4funcIiEvv()
13 // RDC: define weak_odr void @_Z6kernelIiEvv()
14 
func()15 template <typename T> __device__ void func() {}
kernel()16 template <typename T> __global__ void kernel() {}
17 
18 template __device__ void func<int>();
19 template __global__ void kernel<int>();
20