/*************************************************************************************************** * FILE : openmp4x-mat-mat-addition.c * * INPUT : Nil * * OUTPUT : Displays Host and device output matrices * * CREATED : August,2013 * * EMAIL : hpcfte@cdac.in * ***************************************************************************************************/ #include #define SIZE 4 #pragma omp declare target int Mat_Mat_Add(int(*Matrix_A)[SIZE], \ int(*Matrix_B)[SIZE], \ int(*Matrix_Device)[SIZE]) { #pragma omp target map(Matrix_A[0:SIZE][0:SIZE]) \ map(Matrix_B[0:SIZE][0:SIZE]) \ map(Matrix_Device[0:SIZE][0:SIZE]) { for(int i=0;i