diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-01-03 21:43:26 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-01-14 18:50:37 (GMT) |
commit | 6e474364d19566d211aefed003840be15cba940e (patch) | |
tree | 7b6196495f78169b49fed4052042093e293b565a /Tests/Cuda/SharedRuntimePlusToolkit/mixed.cpp | |
parent | 907bb7df57528e91a0dbcab331dfd9f07f28b660 (diff) | |
download | CMake-6e474364d19566d211aefed003840be15cba940e.zip CMake-6e474364d19566d211aefed003840be15cba940e.tar.gz CMake-6e474364d19566d211aefed003840be15cba940e.tar.bz2 |
CUDAToolkit: No targets now depend on the CUDA runtime
It is not a requirement to have shared|static consistent across your
CUDA libraries (e.g curand, nppc ) and your CUDA runtime library.
It is entirely allowable to use a static nppc and a shared runtime.
Diffstat (limited to 'Tests/Cuda/SharedRuntimePlusToolkit/mixed.cpp')
-rw-r--r-- | Tests/Cuda/SharedRuntimePlusToolkit/mixed.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/Cuda/SharedRuntimePlusToolkit/mixed.cpp b/Tests/Cuda/SharedRuntimePlusToolkit/mixed.cpp new file mode 100644 index 0000000..6de6886 --- /dev/null +++ b/Tests/Cuda/SharedRuntimePlusToolkit/mixed.cpp @@ -0,0 +1,16 @@ + +#ifdef _WIN32 +# define IMPORT __declspec(dllimport) +# define EXPORT __declspec(dllexport) +#else +# define IMPORT +# define EXPORT +#endif + +IMPORT int curand_main(); +IMPORT int nppif_main(); + +EXPORT int mixed_version() +{ + return curand_main() == 0 && nppif_main() == 0; +} |