pinned_sum must be mapped tofrom so that any initial value can be
used in the kernel.
+ T * pinned_sum = (T *)omp_alloc(sizeof(T), ompx_pinned_mem_alloc);
+ pinned_sum[0] = sum ;
+ int team_procs = ompx_get_team_procs(0);
-+ #pragma omp target teams distribute parallel for map(from:pinned_sum[0:1]) \
++ #pragma omp target teams distribute parallel for map(tofrom:pinned_sum[0:1]) \
+ num_teams(team_procs) num_threads(1024)
+ for (unsigned int k=0; k<(team_procs*1024); k++) {
+ T val;
