opencl-book-samples icon indicating copy to clipboard operation
opencl-book-samples copied to clipboard

Chapter 16: Dijkstra's example has race condition on updateCostArray

Open GoogleCodeExporter opened this issue 9 years ago • 0 comments

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

GoogleCodeExporter avatar Mar 14 '15 09:03 GoogleCodeExporter