You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
243 B
19 lines
243 B
4 years ago
|
|
||
|
#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;
|
||
|
}
|