3 ms·
If your objects are large, I can see why you would compute indices first. But why do that for floats?
by claudetard 2mo ago
If your objects are large, I can see why you would compute indices first. But why do that for floats?
- bjourne 2mo agoBecause what makes stream compaction challenging is the loop carried dependency: the location you write to in a given iteration depends on the locations you wrote to in previous iterations. By first creating a lookup table of source -> destination locations you remove the dependency. Then you can apply extremely efficient parallel methods.