According to the proposal 1 and 2, we should generate some PIs or codes on the fly. This part is doable. But we need to evaluate if we can cast __global variable into what we want....
This issue is just for evaluation, no need to commit any code.
It's also possible to deliver the "#define GLOBAL_SIZE 100" in the generated code by
...
size = 100
clProg = cl.Program(ctx, fstr).build(options="-D GLOBAL_SIZE={0}".format(size))
...
According to the proposal 1 and 2, we should generate some PIs or codes on the fly. This part is doable. But we need to evaluate if we can cast __global variable into what we want....
This issue is just for evaluation, no need to commit any code.