Previous | Next --- Slide 51 of 57
Back to Lecture Thumbnails
msfernan

Translation of code.

Left hand side - Gather all the elements of the input buffer specified by indices, apply the the absolute value function to those specified inputs and store the results in the output buffer. (Can be thought of as gathering values from different parts of the memory, applying a function to them and storing the result in contiguous memory locations.)

Right hand side- Apply the absolute value function on all the elements of the input buffer and store (scatter) them in the output buffer at locations specified by the indices. (Can be thought of as applying a function to elements from contiguous memory locations, and scattering them to different parts of the memory)