[Parallel_libs-commits] [PATCH] D24172: [StreamExecutor] Pass device memory by ref

Justin Lebar via Parallel_libs-commits parallel_libs-commits at lists.llvm.org
Thu Sep 1 17:16:51 PDT 2016


jlebar added inline comments.

================
Comment at: streamexecutor/include/streamexecutor/Device.h:223
@@ -222,3 +222,3 @@
   template <typename T>
-  Error synchronousCopyH2D(llvm::ArrayRef<T> Src, GlobalDeviceMemory<T> Dst,
+  Error synchronousCopyH2D(llvm::ArrayRef<T> Src, GlobalDeviceMemory<T> *Dst,
                            size_t ElementCount) {
----------------
I wonder if we should take by non-const reference.  This "pass mutable things by pointer" idiom is kind of a Google-ism; I am not sure it will make a lot of sense to other people reading the code.


https://reviews.llvm.org/D24172





More information about the Parallel_libs-commits mailing list