I am working on a framework which generates OpenCL code automatically from Java Code based on certain input.

So the number of device variables generated are going to be different for each case.
Is there a way to transfer those variables from Host to Device without passing them as arguments to the kernel as otherwise I would have to set the kernel arguments manually for each case.

I have been using ClCreateBuffer, ClEnqueueWriteBuffer and ClSetKernelArg to do it manually.
I wanted to know if there is any way like CUDA where I can create a variable in the host side and just do cudaMemcpytoSymbol to access it in the kernel code.