Go backward to Vector Operations Go up to Top Go forward to Scalar Loop |
$V$_{1},V_{2} <-GATHER(A)
load all non-zero elements of $A$ into $V$_{1} and their indices into $V$_{2}
$A\; <-SCATTER(V$_{1},V_{2})
store elements of $V$_{1} into $A$ at indices denoted by $V$_{2} and fill rest with zeros
$V$_{1} <-MASK(V_{2},V_{3})
store elements of $V$_{2} into $V$_{1} for which corresponding position in $V$_{3} is non-zero