[Parallel_libs-commits] [PATCH] D23577: [StreamExecutor] Executor add synchronous methods

Jason Henline via Parallel_libs-commits parallel_libs-commits at lists.llvm.org
Wed Aug 17 14:37:15 PDT 2016


jhen added a comment.

The `to` and `from` functions ended up not being so elegant because ADL doesn't happen for the host arguments (`llvm::ArrayRef`, `llvm::MutableArrayRef`). So, instead, I made two classes just to wrap the device arrays: `DeviceArrayRef` and `DeviceMutableArrayRef`. I think this makes a nice symmetry between host and device and makes the user be explicit about which argument is src and which is dst.

The one thing I don't like is that the `DeviceArrayRef` constructor takes a `size_t` offset as its second argument, and this might get confusing because the `llvm::ArrayRef` takes a `size_t` size as its second argument.

Once we get this synchronous memcpy interface the way we like it, I'll also fix the other functions like `free` and asynchronous copies.


https://reviews.llvm.org/D23577





More information about the Parallel_libs-commits mailing list