for each i 1. Load h[i] from memory address &h+i, and place in register 1. 2. Load x[i] from memory address &x+i, and place in register 2. 3. Multiply contents of register 1 and register 2, placing result in register 3. 4. Add contents of register 3 to running sum stored in register 4. end
Example 2: Loop that implements the vector dot product.