Files
CMake/Tests/CudaOnly/RuntimeControls/file2.cu
Robert Maynard 0d0145138f CUDA: Add abstraction for cuda runtime selection
Fixes #17559
Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
2020-01-27 16:02:26 -05:00

19 lines
243 B
Plaintext

#ifdef _WIN32
# define EXPORT __declspec(dllexport)
#else
# define EXPORT
#endif
void __global__ file2_kernel(int x, int& r)
{
r = -x;
}
EXPORT int file2_launch_kernel(int x)
{
int r = 0;
file2_kernel<<<1, 1>>>(x, r);
return r;
}