 		/* read to the shared mem array */
 		/* insert code for proper index */
         smemArray[FIXME][FIXME] = a[INDX( FIXME, FIXME, m )];
+	} /* end if */
 		
+	if( myRow < m && myCol < m )
+	{
 		/* write the result */
 		/* insert code for proper index */
 	    c[INDX( FIXME, FIXME, m )] = smemArray[FIXME][FIXME];

		    if( h_c[INDX(i,j,size)] != h_a[INDX(i,j,size)] ) 
                    {
                      printf("Error in element %d,%d\n", i,j );
                      printf("Host %f, device %d\n",h_c[INDX(i,j,size)],
                                                    h_a[INDX(i,j,size)]);
                    }
		} /* end for i */

 *  limitations under the License.
 */

#include <stdio.h>
#include <math.h>

