Hi,
I've been using Boost.Compute for some tests in the last couple of days.
So far, it has proven very useful and I came to like it quite a bit. One
thing I would add to it, though, is support for arrays when adapting
your own classes for OpenCl through the Macro
BOOST_COMPUTE_ADAPT_STRUCT. A simple overload would do the trick in my
opinion:
namespace boost {
namespace compute {
namespace detail {
template
inline std::string adapt_struct_insert_member(T Struct::*, const char
*name)
{
std::stringstream s;
s << " " << type_name<T>() << " " << name << ";\n";
return s.str();
}
template
inline std::string adapt_struct_insert_member(T (Struct::*)[N], const
char *name)
{
std::stringstream s;
s << " " << type_name<T>() << " " << name << "[" << N << "]" <<
";\n";
return s.str();
}
} // end detail namespace
} // end compute namespace
} // end boost namespace
Hope something along this lines can be added, thanks,
Fabian