TriscatteredInterp on a multi-core computer

2 views (last 30 days)
Alex on 3 Jun 2011
Answered: John D'Errico on 7 Feb 2023
I'm using TriscatteredInterp to interpolate 3D data. I noticed that my computer is using only one core out 4 (my machine is a MacbookPro, Intel 2720qm). I can see this in the Activity monitor. Sometimes, the interpolation takes forever (more than 3 hours!!).
So my question is simple: can I use the power of my four cores to speed up the process? And how?
Thanks a lot!
Walter Roberson
Walter Roberson on 30 May 2012
Bruce, is MATLAB's TriscatteredInterp parallel? If one is already submitting all of the points one needs to interpolate at into the routine then in order to create a parallel version, one would have to "unzip" the scattered points into smaller subsets and submit to each subset only the portion of the output locations appropriate for that subset.
There is no MATLAB routine that I know of that will analyze scattered points in order to break them up into sector subsets (carefully keeping just enough of the surrounding points for all of the points on the edges of the sectors to be interpolated properly), so the "tweak your MATLAB -code a bit" starts to sound like "rewrite the whole algorithm to use octrees and not TriscatteredInterp at all".
Did you have a different strategy in mind?

Sign in to comment.

Answers (1)

John D'Errico
John D'Errico on 7 Feb 2023
A long dead question. But even today, you won't easily find tools like triscatteredinterp, or griddeInterpolant, that will work in parallel.
These tools need to decide where each point lies in a triangulation. Even today, that is true. And that means a parallelized version will not be an easy thing to write.
I tested both TriscatteredInterp, and scatteredInterpolant on a large set of data, interpolating 1e7 points through a random surface compiosed of 10000 points in 2-dimensions. There is no use of multiple cores, even today, using R2022b.
Any code would need to be written completely from scratch, splitting the processing between the multiple cores. While doable, it still does not exist.
If you really need it, one could submit a feature request. Better, if you have the parallel processing toolbox, is to write it yourself, as the best way to make it work. I don't have that toolbox, so I won't write the code.


Find more on Graphics Performance in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by