diff options
author | Brad King <brad.king@kitware.com> | 2016-11-29 13:59:03 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-11-29 13:59:03 (GMT) |
commit | 4838ca14dfe9ee17b2c788b91227d8f7bf733f06 (patch) | |
tree | e6d2925f18c2946d3047efc45a11a48bc733220e /Tests/Cuda/Complex/dynamic.cu | |
parent | a0af10e42371b17daa51646a3123ec5d8a6d0291 (diff) | |
parent | 4cc601f2c5c0fe76fa76f7e4a47d112df7a1c032 (diff) | |
download | CMake-4838ca14dfe9ee17b2c788b91227d8f7bf733f06.zip CMake-4838ca14dfe9ee17b2c788b91227d8f7bf733f06.tar.gz CMake-4838ca14dfe9ee17b2c788b91227d8f7bf733f06.tar.bz2 |
Merge topic 'initial_cuda_language_support'
4cc601f2 Help: Add release note for CUDA support
7b9131da CUDA: Add tests to verify CUDA compiler works properly.
9cf5b98d CUDA: Prefer environment variables CUDACXX and CUDAHOSTCXX.
a5e806b3 CUDA: Add support for CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY
d038559e CUDA: Add separable compilation support to the makefile generator.
43ce4414 CUDA: Add separable compilation support to the ninja generator.
4b316097 CUDA: Add support for the CUDA_SEPARABLE_COMPILATION target property
ae05fcc6 CUDA: Add LinkLineComputer that computes cuda dlink lines.
115269a8 CUDA: Refactor cmLinkLineComputer to allow for better derived children.
5dec4031 CUDA: Refactor CMakeCUDAInformation to prepare for separable compilation.
5b20d0ab CUDA: C++ compile features now enable cuda c++11 support.
489c52ce CUDA: Use the host compiler for linking CUDA executables and shared libs.
bbaf2434 CUDA: add support for specifying an explicit host compiler.
a92f8d96 CUDA: Enable header dependency scanning.
ec6ce623 CUDA: State that cuda has preprocessor output and can generate assembly.
4f5155f6 CUDA: We now properly perform CUDA compiler identification.
...
Diffstat (limited to 'Tests/Cuda/Complex/dynamic.cu')
-rw-r--r-- | Tests/Cuda/Complex/dynamic.cu | 29 |
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"; + } +} |