/*************************************************************************************************** * FILE : openmp4x-reduce-1Darray.c * * INPUT : Nil * * OUTPUT : Displays Host and device reduce sum * * CREATED : August,2013 * * EMAIL : hpcfte@cdac.in * ***************************************************************************************************/ #include #define SIZE 1000 #pragma omp declare target int reduce(int *inarray) { int sum = 0; #pragma omp target map(inarray[0:SIZE]) map(sum) { for(int i=0;i