Consider the following code: For(i=0;i<128;i++){ c[i] = a[i]*b[i] - d[i]*e[i]; f[i] = a[i]*e[i] + d[i]*b[i];} The above

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Consider the following code: For(i=0;i<128;i++){ c[i] = a[i]*b[i] - d[i]*e[i]; f[i] = a[i]*e[i] + d[i]*b[i];} The above

Post by answerhappygod »

Consider The Following Code For I 0 I 128 I C I A I B I D I E I F I A I E I D I B I The Above 1
Consider The Following Code For I 0 I 128 I C I A I B I D I E I F I A I E I D I B I The Above 1 (68.19 KiB) Viewed 45 times
Consider the following code: For(i=0;i<128;i++){ c = a*b - d*e; f = a*e + d*b;} The above code is translated into RV64V assembly and placed into the following 6 convoys: 1. vmul vld 2. vld vmul 3. vsub vst 4. vmul vld 5. vmul vld 6. vadd vst #a*b (assume a,b pre-loaded), load d # load e, d*e # subtract and store e #a*e, load next a vector #d*b, load next b vector # add and store f Problem #3a (10 pts) Using the "chime" approximation how long would it take to execute on your vector machine. Problem #3b (10 pts). Why can't the first two convoys be merged into a single convoy?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply