PyOCL / OpenCLGA

A Python Library for Genetic Algorithm on OpenCL
MIT License
119 stars 34 forks source link

try to use pyopencl -D to define preprocess definitions. #35

Open john-hu opened 7 years ago

john-hu commented 7 years ago

kilik had found a way to define preprocessor definition at python, see #9 .

size = 100
clProg = cl.Program(ctx, fstr).build(options="-D GLOBAL_SIZE={0}".format(size))

Currently, we use code generation to put all preprocessor definitions. If possible, we should use build options to do so. I cannot make sure how long it can use or any limitation at that.