summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/RuntimeControls/file2.cu
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CudaOnly/RuntimeControls/file2.cu')
-rw-r--r--Tests/CudaOnly/RuntimeControls/file2.cu18
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/CudaOnly/RuntimeControls/file2.cu b/Tests/CudaOnly/RuntimeControls/file2.cu
new file mode 100644
index 0000000..ff68a70
--- /dev/null
+++ b/Tests/CudaOnly/RuntimeControls/file2.cu
@@ -0,0 +1,18 @@
+
+#ifdef _WIN32
+# define EXPORT __declspec(dllexport)
+#else
+# define EXPORT
+#endif
+
+void __global__ file2_kernel(int x, int& r)
+{
+ r = -x;
+}
+
+EXPORT int file2_launch_kernel(int x)
+{
+ int r = 0;
+ file2_kernel<<<1, 1>>>(x, r);
+ return r;
+}