Previous | Next --- Slide 67 of 79
Back to Lecture Thumbnails
PID_1

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.

testuser

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.

Richard

How to "convert" data request to arithmetics? We still have to get the data first... Does it mean like this:

Previous:

vector a(10000);

vector b(10000);

vector c=a+b;//suppose we overload "+"

vector d=a-b;

vector e=c*d;//e is what we want

Now:

vector a(10000);

vector b(10000);

vector e=(a+b)*(a-b);