Opencl은 재귀 함수를 지원하지 않지만 간접 버전도 지원합니까? 대신 그래서 OpenCL 및 간접 재귀
void recurse(int *a, int b)
{
a[b]=3;
if(b<10)
{
recurse(a,b+1); // some OpenCL devices does not have the ability so this is not
// possible in OpenCL
}
}
의
void recursiveA(int *a,int b) // call this first to start recursion
{
a[b]=3;
if(b<10)
{
recursiveB(a,b+1); // A calls B
}
}
void recursiveB(int *a, int b)
{
a[b]=3;
if(b<10)
{
recursiveA(a,b+1); // B calls A while A still not finished before
// and entry point & arguments of A are corrupt ?
}
}
, 우리는 먼저 "R"이 완료되지 않은 경우에도 다른 함수에서 "R"함수를 호출 할 수 있습니다? 이러한 함수는 우리가 호출 할 때마다 인수에 대해서만 같은 상수 주소를 사용합니까? OpenCL 2.0이 출시 될 때까지 간접적 인 재귀를 수행하려면 사용자 정의 "스택"구현을 사용해야합니까?