summaryrefslogtreecommitdiffstats
path: root/Tests/CudaOnly/RuntimeControls/file1.cu
blob: 28beb5e87ff1fc4728c0827f19c5c9f5f1229707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

#ifdef _WIN32
#  define EXPORT __declspec(dllexport)
#else
#  define EXPORT
#endif

void __global__ file1_kernel(int x, int& r)
{
  r = -x;
}

EXPORT int file1_launch_kernel(int x)
{
  int r = 0;
  file1_kernel<<<1, 1>>>(x, r);
  return r;
}