Код: Выделить всё
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define N 20
struct func {
__host__ __device__
float operator()(float x) { return x*2; }
};
template
struct O {
const std::array a;
O(std::array a): a(a) {}
S f;
__host__ __device__
float operator()(float &v) {
std::array b = {2,3,4};
int tmp;
for (int i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/76271476/when-using-thrust-is-it-legitimate-to-create-a-stdarray-inside-a-host-d[/url]