I can create restrict(amp)
function as follows:
auto f = [](int& item) restrict(amp) {item += 1;};
And I can use this function in other restrict(amp)
functions, for example:
concurrency::parallel_for_each(av.extent,
[=](concurrency::index<1> idx) restrict(amp)
{
f(av[idx]);
}
);
What type of substituted instead "auto
" after compilation? I tried to use the "std::function":
std::function<void (int&) restrict(amp)> f
= [](int& item) restrict(amp) {item += 1;};
but received a compile error.
Thank you for your attention!