diff options
Diffstat (limited to 'Tests/CudaOnly/DeviceLTO/file1.cu')
-rw-r--r-- | Tests/CudaOnly/DeviceLTO/file1.cu | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/CudaOnly/DeviceLTO/file1.cu b/Tests/CudaOnly/DeviceLTO/file1.cu new file mode 100644 index 0000000..703927c --- /dev/null +++ b/Tests/CudaOnly/DeviceLTO/file1.cu @@ -0,0 +1,17 @@ +#ifdef _WIN32 +# define EXPORT __declspec(dllexport) +#else +# define EXPORT +#endif + +extern __device__ int file2_func(int); +void __global__ kernel(int x) +{ + file2_func(x); +} + +EXPORT int launch_kernel(int x) +{ + kernel<<<1, 1>>>(x); + return x; +} |