Can I use Vector of strings in for loop?
mennahmostafa opened this issue · comments
mennahmostafa commented
Is it possible to do something like this:
{% for auto j: myStringVector %}
..
{% endfor %}
Hugh Perkins commented
I use Lua for everything now. see any of the OpenCL files, *.cl
in https://github.com/hughperkins/cltorch/tree/master/src/lib eg https://github.com/hughperkins/cltorch/blob/master/src/lib/THClApply.cl
I've factorized out the lua templater into https://github.com/hughperkins/luacpptemplater
Lua is super lightweight (~46KB or so?), but it's an actual real scripting language. So it's perfect for this. I use it for templating OpenCL kernels, at runtime. It works great. No painpoints :-)