When I took computer graphics (15-462), I experienced first-hand the effect of low arithmetic intensity. I attempted to use SIMD instructions to vectorize certain portions of my code, but even though I was doing 3 or 4 operations in parallel with the SIMD instructions, I saw much less than a 3x speedup. Since the SIMD was a late addition, the design of my code forced my to load the vectors into and out of the special vector types frequently, meaning there was a poor ratio of memory operations to actual arithmetic instructions. Had the code been designed from the start to always keep vectors in the SIMD vector types, the ratio would have been improved and a better speedup would have been observed.
When I was first learning to program, I would often save my calculations to avoid recalculating them, since I was under the impression that doing so would make my program run more quickly. It's amusing to think that that's far from being true when the scale is blown up. I'm going to keep the idea of high arithmetic intensity in my head when I'm working on the assignments for this class.
How to "convert" data request to arithmetics? We still have to get the data first...
Does it mean like this:
vector c=a+b;//suppose we overload "+"
vector e=c*d;//e is what we want