В настоящее время у меня есть следующее:
- main.cpp
- host.cpp
- host.h
- device.cu
- device.cuh
- CMakeLists.txt
Код: Выделить всё
// main.cpp
#include "host.h"
#include "device.cuh"
int main()
{
a();
b();
return 0;
}
Код: Выделить всё
// host.cpp
#include
#include "host.h"
int b() {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79809350/cuda-cpp-compilation-and-linking-using-cmake[/url]
Мобильная версия