-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying Memory location of an OpenCl backend using VexCL and using that location with Boost.compute #284
Comments
Something like this? |
I will try this and let you know. Btw, Thank you. |
Hi,for Boost.compute i can convert the boost vector into vexcl vector but I am also trying to convert the opencl (Cl mem object) to a vexcl vector. Is it possible? |
Yes, vex::vector may be initialized with and
|
vex::vector a(&queue, &buffer, data_size); When I was trying to create the inline vector it doesn't work. It shows the error. I have the parameters to pass on to the inline vector but it doesn't work. Is there any problem in declaring the function? |
The following works for me: #include <vexcl/vexcl.hpp>
int main() {
vex::Context ctx(vex::Filter::Env && vex::Filter::Count(1));
std::cout << ctx << std::endl;
const int n = 1024;
// Raw OpenCL buffer
cl::Buffer raw(ctx.context(0), CL_MEM_READ_WRITE, n * sizeof(float));
// vex::vector wrapping the buffer
vex::vector<float> vec(ctx.queue(0), raw, n);
vec = 42.0f;
} |
Is it possible to Copy Memory location of an OpenCl backend using VexCL and using that location with Boost.compute? As Boost.compute uses vector type..
The text was updated successfully, but these errors were encountered: