Home > other >  OpenCL Dijkstra algorithm implementation problems
OpenCL Dijkstra algorithm implementation problems

Time:10-07

Algorithm code from OpenCL programming guide, chapter 16,
I try to put the project set up to run for a moment,

Really pit, there is a cl code,


For (int edge=edgeStart; Edge & lt; EdgeEnd; Edge++)
{
Int nid=edgeArray (edge);

If (updatingCostArray (nid) & gt; (costArray (dar) + weightArray (edge)))
{
UpdatingCostArray (nid)=(costArray (dar) + weightArray [edge]);
}
}

This code with this synchronization issues, when there is a node in the network, there are multiple edges into the updatingCostArray (nid) the same data will be more worker threads access,
Result is wrong, also listed below the performance tests, said that how to optimize,

And didn't give this example how to record way nodes,

Has also studied the example of the classmate, about your feelings
  • Related