summaryrefslogtreecommitdiffstats
path: root/Tests/Cuda/Complex/dynamic.cu
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Cuda/Complex/dynamic.cu')
-rw-r--r--Tests/Cuda/Complex/dynamic.cu29
1 files changed, 29 insertions, 0 deletions
diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu
new file mode 100644
index 0000000..9540e86
--- /dev/null
+++ b/Tests/Cuda/Complex/dynamic.cu
@@ -0,0 +1,29 @@
+
+#include <string>
+#include <cuda.h>
+
+int dynamic_base_func(int);
+
+int __host__ cuda_dynamic_host_func(int x)
+{
+ return dynamic_base_func(x);
+}
+
+static
+__global__
+void DetermineIfValidCudaDevice()
+{
+}
+
+void cuda_dynamic_lib_func(std::string& contents )
+{
+ DetermineIfValidCudaDevice <<<1,1>>> ();
+ if(cudaSuccess == cudaGetLastError())
+ {
+ contents = "ran a cuda kernel";
+ }
+ else
+ {
+ contents = "cant run a cuda kernel";
+ }
+}