opencl-book-samples
opencl-book-samples copied to clipboard
Chapter 16: Dijkstra's example has race condition on updateCostArray
Dijkstra's algorithm as presented is fundamentally broken because it suffers
from a race condition when writing to updateCostArray from multiple threads.
Because there is no synchronization, when two vertices want to update the node,
they can both get past the if statement but the cost array can then be updated
by the wrong vertex.
Original issue reported on code.google.com by [email protected]
on 19 Feb 2012 at 10:54