Hello all.
I have an easy question on scan.
On page 23 of the pdf Data-parallel Algorithms & Data Structures (http://www.gpgpu.org/sc2007/SC07_CUDA_4_DataParallel_Owens.pdf) they talk about compaction. They give an example where we want to compact the vector
[1 0 1 1 0 0 1 0] associated with
[A B C D E F G H]
to the vector
[0 1 1 2 3 3 3 4],
which somehow helps us obtain [A C D, G], the non-null elements. They then show how to do a scan. OK. But after the scan, how does having the vector [0 1 1 2 3 3 3 4] help us to pull out the non-null elements? I’m sure I’m missing something simple here.
John