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. ...