<div dir="ltr">Hi Emanuele,<div><br></div><div>Here is an example of how we calculated the distance matrix in parallel (for the MDF) using OpenMP</div><div><a href="https://github.com/nipy/dipy/blob/master/dipy/align/bundlemin.pyx">https://github.com/nipy/dipy/blob/master/dipy/align/bundlemin.pyx</a><br></div><div><br></div><div>You can just add another function that does the same using mam. It should be really easy to implement as we have</div><div>already done it for the MDF for speeding up SLR.</div><div><br></div><div>Then we need to update the bundle_distances* functions to use the parallel versions.</div><div><br></div><div>I'll be happy to help you with this. Let's try to schedule some time to look at this together.</div><div><br></div><div>Best regards,</div><div>Eleftherios</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 12, 2016 at 11:16 AM Emanuele Olivetti <<a href="mailto:olivetti@fbk.eu">olivetti@fbk.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I usually compute the distance matrix between two lists of streamlines using bundle_distances_mam() or bundle_distances_mdf(). When the lists are large, it is convenient and easy to exploit the multiple cores of the CPU because such computation is intrinsically (embarassingly) parallel. At the moment I'm doing it through the multiprocessing or the joblib modules, because I cannot find a way directly from DiPy, at least according to what I see in dipy/tracking/distances.pyx . But consider that I am not proficient in cython.parallel.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Is there a preferable way to perform such parallel computation? I plan to prepare a pull request in future and I'd like to be on the right track.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Best,</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Emanuele</div><div class="gmail_msg"><br class="gmail_msg"></div></div>
_______________________________________________<br class="gmail_msg">
Neuroimaging mailing list<br class="gmail_msg">
<a href="mailto:Neuroimaging@python.org" class="gmail_msg" target="_blank">Neuroimaging@python.org</a><br class="gmail_msg">
<a href="https://mail.python.org/mailman/listinfo/neuroimaging" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.python.org/mailman/listinfo/neuroimaging</a><br class="gmail_msg">
</blockquote></div>