boostorg / compute

A C++ GPU Computing Library for OpenCL
http://boostorg.github.io/compute/
Boost Software License 1.0
1.55k stars 333 forks source link

Support calling custom functions from lambda expressions #59

Open kylelutz opened 10 years ago

kylelutz commented 10 years ago

It should be possible to call custom functions from lambda expressions.

For example, this should be possible:

BOOST_COMPUTE_FUNCTION(float, square, (float x),
{
    return x * x;
});

transform(vec.begin(), vec.end(), vec.begin(), square(2 * _1), queue);

kylelutz commented 9 years ago

This has been requested multiple times during the Boost.Compute review. Bumping it up in priority.