cmake/Tests/Cuda/Complex/main.cpp

28 lines
482 B
C++
Raw Normal View History

2017-04-14 19:02:05 +02:00
#include <iostream>
#include "file1.h"
#include "file2.h"
#ifdef _WIN32
2018-08-09 18:06:22 +02:00
# define IMPORT __declspec(dllimport)
2017-04-14 19:02:05 +02:00
#else
2018-08-09 18:06:22 +02:00
# define IMPORT
2017-04-14 19:02:05 +02:00
#endif
2017-07-20 19:35:53 +02:00
IMPORT int choose_cuda_device();
2017-04-14 19:02:05 +02:00
IMPORT int call_cuda_seperable_code(int x);
IMPORT int mixed_launch_kernel(int x);
int main(int argc, char** argv)
{
2017-07-20 19:35:53 +02:00
int ret = choose_cuda_device();
if (ret) {
return 0;
}
int r1 = call_cuda_seperable_code(42);
int r2 = mixed_launch_kernel(42);
2020-08-30 11:54:41 +02:00
2017-07-20 19:35:53 +02:00
return (r1 == 42 || r2 == 42) ? 1 : 0;
2017-04-14 19:02:05 +02:00
}