请问CUDA现在支持递归吗?要不支持的话,我下面的程序怎么改啊?
_global__ void f(struct point *head,struct point *last,float sigma)
{
struct point *hl;/*hl contains the remotest point C*/
struct point *p=head->next;
float h,max=0;
while(p->next!=last)
{
h=len(head->x,head->y,p->x,p->y,last->x,last->y);
if(h>max)
{
max=h;
hl=p;
}
p=p->next;
} //这段程序是在找距离最大的点
if(max<=sigma) /*It is not a feature point*/
{
head->next=last;
}
else /*It is a feature point*/
{
f(head,hl,sigma);
f(hl,last,sigma);
}
}