Hi guys,

as I was recently discussing asynchronous transfer and execution with 
Evan in an MPI context, this is now addressed with
  viennacl::async_copy()

Typical use case:
  std::vector<double>      std_x(SIZE);
  viennacl::vector<double> vcl_x(SIZE);
  viennacl::async_copy(std_x, vcl_x);  // same as next line
  viennacl::async_copy(std_x.begin(), vcl_x.begin(), vcl_x.end());
  /* do some other stuff here */
  viennacl::backend::finish();    // sync queue (OpenCL) or device (CUDA)

Copying from device back to host works analogously. This also works with 
vector_range and vector_stride.

There is no async copy for matrices right now, because there are 
essentially always data conversions involved, preventing truly 
asynchronous operations.

Best regards,
Karli

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to