A uniprocessor computer can operate in both scalar and vector modes, performing calculations nine times faster in vector
Posted: Fri Jul 01, 2022 5:37 am
A uniprocessor computer can operate in both scalar and vectormodes, performing calculations nine times faster in vector mode. Atest program consumes time T on this computer. Of this time, 25%corresponded to vector mode, and the rest of the time to scalarmode.
a) Calculate the effective speed gain under the aboveconditions, relative to not using vector mode. Also calculate α,percentage of code that has been vectorized in the indicatedprogram
b) Suppose the speed ratio between vector and scalar mode isdoubled by hardware improvements. Calculate the effective speedgain achieved.
c) Consider that the same speed gain obtained in (b) isobtained from compiler improvements, rather than through hardwarechanges. What should now be the new vectorization percentage (α)that the compiler should provide for the same test program.
a) Calculate the effective speed gain under the aboveconditions, relative to not using vector mode. Also calculate α,percentage of code that has been vectorized in the indicatedprogram
b) Suppose the speed ratio between vector and scalar mode isdoubled by hardware improvements. Calculate the effective speedgain achieved.
c) Consider that the same speed gain obtained in (b) isobtained from compiler improvements, rather than through hardwarechanges. What should now be the new vectorization percentage (α)that the compiler should provide for the same test program.