Name: cs598dhp Parallel Processing Midterm Exam Due in ... - Polaris
Name: cs598dhp Parallel Processing Midterm Exam Due in ... - Polaris
Name: cs598dhp Parallel Processing Midterm Exam Due in ... - Polaris
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
5. SIMD programm<strong>in</strong>g [10 pts.]Transform the follow<strong>in</strong>g program <strong>in</strong>to vector form.Vectorize as much as possiblek=ip=d(i)do j=i+1,nif (d(j)>=p) thenk=jp=d(j)end ifend doif (k /= i) thend(k)=d(i)d(i)=pdo j=1,np=v(j,i)v(j,i)=v(j,k)v(j,k)=pend doend if6