Previous | Next --- Slide 50 of 56
Back to Lecture Thumbnails
caiqifang

Can someone help explain why gather and scatter are important? When compiling my own homework codes, I ran into warnings about adding gather scatter to improve performance. Thanks.

jmackama

Gather and scatter are a way of improving the density of a vector or data.

If you were going to do a bunch of operations, you can potentially get better lane utilization on a SIMD system by (1) taking a list of non-empty indices and arranging them into a smaller vector (gather) (2) performing SIMD operations on the much fuller lanes (3) using the list of indices to map the results back to thier original position in the vector (scatter)