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
AP
AP 2011년 11월 12일
I have seen these links. In the first link, the function does not exist in my MATLAB. Is it the case in the version of your MATLAB? Can you call the function like the following:
[in,t] = inpoly(xGrid,yGrid,xv,yv,useGPU)
I am also trying to convert the code in the link http://www.mathworks.com/matlabcentral/fileexchange/10391-fast-points-in-polygon-test to GPU version. Could you please give me some hints?
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by