Running Codelets on GPU

Hi all,
I’m trying to understand whether it is possible to write codelets that run on the GPU instead of the CPU.
For example, I would like to run the entire tick function using only the GPU.
Does anyone have any suggestions?

Thank you!

Your OS runs on CPU which executes sequential, procedural instructions. Your CPU then schedules highly parallelizable work to be executed against a block of memory on the GPU. Your codelets are scheduled to run on the CPU which then dispatch work to the GPU. It would not fit the compute model to run sequential code like the tick() method on GPU.

Take a look at the following blog if you haven’t that may be helpful to illustrate the differences between CPU and GPU.