/*************************************************************************************************** * FILE : openmp4x-infinity-norm-matix.c * * INPUT : Nil * * OUTPUT : Displays max sum of row in a given matrix * * CREATED : August,2013 * * EMAIL : hpcfte@cdac.in * ***************************************************************************************************/ #include #define SIZE 4 #pragma omp declare target int reduce(int (*inarray)[SIZE]) { int sum = 0,max=0; #pragma omp target map(inarray[0:SIZE][0:SIZE]) map(sum) map(max) { for(int i=0;i=0)?(inarray[i][j]):(0-inarray[i][j]); } max = max=0)?(inarray[i][j]):(0-inarray[i][j]); } max = max