[phoenix] Using Phoenix lambdas on top of custom Proto expressions
Hello,
I am working on VexCL (https://github.com/ddemidov/vexcl) - a vector
expression template library for OpenCL. I have recently added support for
automatic generation of OpenCL kernels from generic functors (description
of the feature: https://github.com/ddemidov/vexcl#function-generator).
In order to implement this, I pass the instances of vex::symbolic<T> class
to the given functor. vex::symbolic<T> dumps to output stream any
arithmetic operations it is being subjected to, and that's how I am able to
construct the OpenCL kernel source. The symbolic<T> class is of course a
Boost.Proto terminal.
Now, it seems natural to use Boost.Phoenix to provide the generic functors
for the function generator. And indeed it is possible with simple
expressions (see
https://github.com/ddemidov/vexcl/blob/a95dfdd68/tests/generator.cpp#L124).
However, if I try to bring cmath functions overloads from
participants (1)
-
Denis Demidov