Hi,
I have a kernel of the form
__kernel k()
{
...
int loop_index=0;
while(1)
{
if(loop_index==1)
return;
....
....
loop_index++; //loop_index is not being used anywhere else
}
}
It gives a CL_OUT_OF_RESOURCES_ERROR and crashes. But if the same kernel I rewrite as
__kernel k()
{
...
int loop_index=0;
while(1)
{
....
....
loop_index++; //loop_index is not being used anywhere else
if(loop_index==1)
return;
}
}
It exits properly. I am trying to debug some unexpected conditions. But debugging variables are acting unexpectedly as well. I am not sure why this is happening? Any ideas? Thanks.