I want to use C++ and vectors
. I had C code with C arrays created like this:
double* data = (double*)malloc(sizeof(double) * n);
double* result = (double*)malloc(sizeof(double) * n);
#pragma omp target data map(tofrom: data[0:n],result[0:n])
//loop
Now I use C++ vector and I get:
example.cpp:31:41: error: expected variable name or an array item
#pragma omp target data map(tofrom: data[0:n],result[0:n])
Here they say OpenMP4 introduced user-defined reductions. But have it any analogs for data maps?