Clear Filters
Clear Filters

Voronoi on GPU?

3 views (last 30 days)
Wolfgang
Wolfgang on 7 Sep 2011
Commented: HG on 14 Jun 2021
It appears the current voronoi functions do not support GPU computing. Is there a way in Matlab or addon software to compute a Voronoi tesselation on the GPU?

Accepted Answer

Jill Reese
Jill Reese on 8 Sep 2011
You're right. I went back and looked again at the voronoi functionality. VORONOIN is not currently supported on the GPU and the VORONOI implementation does much of the work on the CPU because the use cases we originally considered didn't yield much speedup by using the GPU.
Perhaps your use case/work flow is different. Would you mind sharing the big picture of what you are trying to do and the matrix sizes you are using? If you are willing to share the actual code that you are interested in porting to the GPU, that would be even better.
  1 Comment
Wolfgang
Wolfgang on 9 Sep 2011
When analyzing my code around voronoin() I realized that my algorithm to calculate the areas of the tiles takes up most of the time not voronoin().
Thank you!

Sign in to comment.

More Answers (1)

Jill Reese
Jill Reese on 7 Sep 2011
Hi Wolfgang! What release of MATLAB are you using, and what exactly are you trying to do with voronoi? The most recent release of MATLAB is R2011b, and in that release I was able to run the first two examples listed under "doc voronoi" on the GPU.
  2 Comments
Wolfgang
Wolfgang on 7 Sep 2011
Hi Jill, thanks for the reply.
I'm running R2011a, and just tried to reproduce what you said.
The first 2 examples use voronoi(x,y), which doesn't produce any errors using GPU arrays as inputs. However, in example 2 the return values [vx,vy] are returned as CPU arrays even if the inputs are GPU arrays, and there's no time advantage (even for large arrays), so I'm not really convinced that they run on the GPU.
Example 3 is what's interesting to me, as I'm using voronoin().
Here I get the error message "The specified data points are not in numeric array format".
I still don't believe Matlab supports Voronoi functionality on GPU, maybe there's something new in R2011b, if so it's not published in the release notes.

Sign in to comment.

Categories

Find more on Voronoi Diagram in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!