AnsweredAssumed Answered

Question about the kernel execution?

Question asked by alexfd7 on Dec 16, 2016
Latest reply on Dec 22, 2016 by dipak

Hello everyone, to explain my doubt, let's assume that I have an input image, and I'll do any pixel-by-pixel operation, resulting in an output image.

 

To update the pixel-by-pixel value, first I need to extract a vector in the image that will be used to calculate the new value of each pixel and this vector will be constant throughout the process.

 

The way it is in my code, for each pixel (work-item) in my image, the vector will be recalculated, I wanted to calculate it only one time and use it in all task groups. One solution would be to calculate it on HOST and send it as a parameter, however wanted to compute it inside the kernel, is there any mechanism that I can use inside the kernel to compute this vector only once time and assign the global variable so that For all task groups.

Outcomes