3 ms·
> Each cell can also grab this value from the cell above Therein lies the problem I see. Grabbing this value from the above cell implies that this value has al
by mabbo 11y ago
> Each cell can also grab this value from the cell above
Therein lies the problem I see. Grabbing this value from the above cell implies that this value has already been calculated- but it hasn't, as these cells run in parallel. The results of a cell in a single round of calculations is not accessible to the other cells during the same round.
In short- how does a cell know whether its new value is the value being inserted or the value being pushed down without knowing the result of the cell above it?
And having asked that, I can actually think of one answer: it can calculate whether it's neighbor will be pushing or not independently. So each cell is really doing the calculation of "given these two numbers (my cell's value and the above cell's), where does this new number fit in sorted order with them- before, between, or after".