summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/SeparateCompilation/file2.cu
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CudaOnly/SeparateCompilation/file2.cu')
-rw-r--r--Tests/CudaOnly/SeparateCompilation/file2.cu20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/CudaOnly/SeparateCompilation/file2.cu b/Tests/CudaOnly/SeparateCompilation/file2.cu
new file mode 100644
index 0000000..6b8b06b
--- /dev/null
+++ b/Tests/CudaOnly/SeparateCompilation/file2.cu
@@ -0,0 +1,20 @@
+
+#include "file2.h"
+
+result_type __device__ file1_func(int x);
+
+result_type_dynamic __device__ file2_func(int x)
+{
+ if(x!=42)
+ {
+ const result_type r = file1_func(x);
+ const result_type_dynamic rd { r.input, r.sum, true };
+ return rd;
+ }
+ else
+ {
+ const result_type_dynamic rd { x, x*x*x, false };
+ return rd;
+ }
+
+}