26 static const size_t size = 6;
29 PRAGMA_OFFLOAD(
"omp declare target")
34 PRAGMA_OFFLOAD(
"omp end declare target")
38 PRAGMA_OFFLOAD(
"omp target enter data map(alloc:data[0:6])")
39 T newdata[
size] = {0, 1, 2, 3, 4, 5};
40 PRAGMA_OFFLOAD(
"omp target map(to:newdata[0:6]) map(from:data[0:6])")
42 PRAGMA_OFFLOAD(
"omp parallel for")
43 for (
int i = 0; i <
size; i++)
46 PRAGMA_OFFLOAD(
"omp target exit data map(delete:data[0:6])")
47 std::cout <<
"data[5] = " <<
data[5] << std::endl;
helper functions for EinsplineSetBuilder
TEST_CASE("complex_helper", "[type_traits]")
void set_value(int i, const T *restrict array, T *restrict data)