https://bugs.kde.org/show_bug.cgi?id=149485--- Comment #186 from Julien Narboux <Julien narboux fr> 2009-05-14 14:47:58 ---
Hi Joe,
Thanks for your explanations of your implementation.
For the energy map, I think your solution with mutex is almost equivalent to:
- computing each line in the normal order (1 to n)
- but distribute the computation for each line to two threads
Using OpenMP, maybe we could write something like that:
for (i=1; i< height ; i++)
#pragma omp parallel private(j) shared(width, e, minpath)
{
#pragma omp parallel for
for (j=0; j< width ; j++)
minpath[i][j]=e[i][j]+min(minpath[i-1][j-1],minpath[i-1][j],minpath[i-1][j+1]);
}
But maybe starting several threads for each line would give too much overhead.
Is there any specialist of openmp in the room ?
Julien
--
Configure bugmail:
https://bugs.kde.org/userprefs.cgi?tab=email------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel