So far, I'm aware of the Mars, though what about alternatives?
At present, the easiest interface is provided by thrust::reduce.
As you noted, there is also Mars.
Years ago I have implemented cumar.
As I was using Mac OS X and 'nvcc' compiler was not happy with Apple's 'clang', I designed this library pure C++ ( and a flavor of lambda ).
A typical map operation looks like this:
//A = B + C, all of length 'n'
cumar::map()("[](double a&, double b, double c){ a = b+c; }" )(A, A+n, B, C);
For reduce operation, it looks like this:
// x = min(A), A of size 'n'
cumar::reduce()( "[](double a, double b){ return a < b ? a : b; }" )(A, A+n);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With