summaryrefslogtreecommitdiff
path: root/Tests/Cuda/Complex/file2.cu
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Cuda/Complex/file2.cu')
-rw-r--r--Tests/Cuda/Complex/file2.cu16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Cuda/Complex/file2.cu b/Tests/Cuda/Complex/file2.cu
new file mode 100644
index 0000000000..74f35580d6
--- /dev/null
+++ b/Tests/Cuda/Complex/file2.cu
@@ -0,0 +1,16 @@
+
+#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;
+ }
+}