vexcl
vexcl copied to clipboard
Is it possible to create an Boost Compute vector and wrap a vexcl vector with Compute vector?
As given in the documentation we can do it for the vexcl but not for the compute vecotrs.
Both boost.compute and vexcl vectors are just wrappers around raw opencl buffers, so the conversion is possible both ways.
// Wrap boost.compute vectors into vexcl vectors (no data is copied):
compute::vector
this is the way to wrap a compute vector but is it possible to wrap a vex vector?
See examples in <vexcl/external/boost_compute.hpp>, which uses Boost.compute algorithms with vexcl vectors:
https://github.com/ddemidov/vexcl/blob/ec0cc1fe037f68a9d1c19f56960e92cd820f4f20/vexcl/external/boost_compute.hpp#L60-L102