DESCRIPTION In questions involving code which will partially be given to you in the question specs, you may need add new lines of code. For full credit, do not change any of the existing lines. This is a Group Quiz. Submit only one copy per group, using an "e-mail address" consisting of your .tar file names for submitting homework, but without .tar. QUESTION (25 pts) In class, we discussed an excellent OpenMP library for matrix operations. State which library. QUESTION (25 pts) Consider the FFT algorithm, page 273 of our text. In class, it was mentioned that a certain OpenMP construct would be useful for implementing FFT. State which one; it must be an OpenMP key word. QUESTION -ext .c -com gcc -flags '-fopenmp' -run ./omsi_answer3 (50 pts) Complete the OpenMP code below, which implements Shearsort, p.259. // Shearsort, OMP version // note: p.259 assumes row numbers start at 1, but here start at 0 #include #include #include // copy ncpy ints from source, stride stridesrc, // to destination, stride stridedst void memorycpy(int *dst, int *src, int ncpy, int stridedst, int stridesrc) { for (int i = 0; i < ncpy; i++) } int upComp(int *u, int *v) {return (*u - *v); } // ascending int downComp(int *u, int *v) {return (*v - *u); } // descending // array x, length nx5^2 void shear(int *x, int nx5) { int nx = nx5 * nx5; int i,nIters = 0; for (i = 2; ; i = 2 * i) { // OMSI doesn't do -lm, so need this nIters++; if (i >= nx) break; } nIters = nIters + 1; #pragma omp parallel { int iter; int *tmp = malloc(nx5 * sizeof(int)); // temp storage for columns for (iter = 1; iter <= nIters; iter++) { if (iter % 2 == 1) { for (int Row = 0; Row < nx5; Row++) { // if even, sort ascending else descending if (Row % 2) qsort( ); else qsort( ); } } else { for (int Col = 0; Col < nx5; Col++) { memorycpy( ); qsort(tmp,nx5,sizeof(int),upComp); memorycpy( ); } } #pragma omp } } } int main() { int z[9] = {5,12,13,6,2,22,15,3,7}; omp_set_num_threads(2); shear(z,3); for (int i = 0; i < 9; i++) printf("%d ",z[i]); printf("\n"); }