[Parallel_libs-commits] [PATCH] D23577: [StreamExecutor] Executor add synchronous methods
Justin Lebar via Parallel_libs-commits
parallel_libs-commits at lists.llvm.org
Tue Aug 16 17:41:43 PDT 2016
jlebar added inline comments.
================
Comment at: streamexecutor/include/streamexecutor/Executor.h:48
@@ +47,3 @@
+ /// Frees memory previously allocated with allocateDeviceMemory.
+ template <typename T> Error freeDeviceMemory(GlobalDeviceMemory<T> *Memory) {
+ return PExecutor->freeDeviceMemory(Memory);
----------------
> Is there a good way to keep this nice feature and match the model of DeviceMemory as a pointer more closely?
const-ness will get us some of the way there.
I could imaging designing an API that would let you do
MutableArrayRef<int> dst(...);
dst = CopyFromDevice(src);
But, in addition to requiring some substantial magic, that wouldn't work with our `.then` chaining.
https://reviews.llvm.org/D23577
More information about the Parallel_libs-commits
mailing list