MATLAB Answers

examine points which are inside a polygon by GPU

5 ビュー (過去 30 日間)
AP
AP 2011 年 11 月 11 日
回答済み: Sulimon Sattari 2016 年 6 月 10 日
Hi All,
Does anyone know how I can speed up inpolygon function by using GPU?
Thanks.

回答 (2 件)

Sulimon Sattari
Sulimon Sattari 2016 年 6 月 10 日
I wrote an inpolygon GPU function on matlabcentral.
This will only give you speed-up if the number of test points is much much greater than the number of vertices (say, 10,000 times more test points than vertices).
Regards, Sulimon

Walter Roberson
Walter Roberson 2011 年 11 月 11 日
I thought someone asked about this about a week ago, but I cannot find the posting now. The answer was that TriScatteredInterp's routine for checking points in polygons was not designed for GPU use.
Some faster point-in-polygon functions:
If, though, as the other person did, you specifically want to test whether a particular point is outside all of the polygons created by TriScatteredInterp, then you would probably have to write the GPU version of the routine yourself.
  2 件のコメント
Walter Roberson
Walter Roberson 2011 年 11 月 12 日
As the first demo is about mapping, probably inpoly() is part of the mapping toolbox.
I have no experience in writing GPU ccode.

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by