What is gather and scatter » History » Version 1
jun chen, 03/23/2025 01:14 AM
1 | 1 | jun chen | # What is gather and scatter |
---|---|---|---|
2 | |||
3 | gather and scattergather and scatter |
||
4 | First ref Algorithm 11.2 from Saad(page 379-380). |
||
5 | |||
6 |  |
||
7 | |||
8 |  |
||
9 | |||
10 | When conducting CSC stored matrix vector multiplication, first we get the i-th column. Since the matrix is sparse, this operation is called 'gather'. The column is then added to the full vector y, which is called "scatter". |
||
11 | In addition, the stop condition of iterative loop in line 2 of the pseudocode illustrates the advantage of the last element in column pointer 'Ap' from another aspect. The access of each column of the matrix has the same code. |
||
12 | In other open software like INTEL MKL, this format is called 'Three array variation of CSC format', a variation of four array representation. 'pointerB' indicates the Beginning of the column and 'pointerE' indicates the End. It needs some cautions that various software may take the input with a little of difference. |
||
13 | |||
14 | |||
15 |  |
||
16 | |||
17 | By the way, the function by Y. Saad is called 'SAXPY' which is synonym of 'Sparse A times X Plus Y', while a more common one is 'cs_gaxpy' by Davis, 'Generalized (scaler) A times X Plus Y'. Some software may also use the name 'mvp' which is shortened for 'Matrix-Vector Product'. It is hoped that when calling all kinds of software no matter open or inner, the colleagues may find the relevant function. |
||
18 | |||
19 | http://10.30.200.21:8088/attachments/download/2807/Saad2003Iterative_Iterative_Methods_for_Sparse_Linear_Systems.pdf |