Hello,
I was wondering, is there any possibility to use global variables in OpenCL that are consistent over several functions called from the kernel?
Let me give you an example of what I’m looking for.
uint numObjects;
__kernel mainKernel
(__global uint numberOfObjects,
/* other variables */
)
{
numObjects = numberOfObjects;
}
void doSomethingElse
(
/* variables */
)
{
int i;
for(i = 0; i < numObjects; i++)
{
}
}
I’m asking this because otherwise I have to send the variable through many functions as the doSomethingElse() function is supposed to be called from a different function and not the kernel itself.
Thank you.
//Considerate