[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 14:09:28 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);
----------------
Should we take this by reference?

================
Comment at: streamexecutor/include/streamexecutor/Executor.h:110
@@ +109,3 @@
+                                DeviceSrc.getElementCount());
+  }
+
----------------
I wonder if we should assert that the two arrays' sizes are the same, in this case.  Same for the H2D function.


https://reviews.llvm.org/D23577





More information about the Parallel_libs-commits mailing list