[Openmp-commits] [PATCH] D80649: [OpenMP] Improve D2D memcpy to use more efficient driver API
George Rokos via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed May 27 15:51:00 PDT 2020
grokos added inline comments.
================
Comment at: openmp/libomptarget/src/device.cpp:400
+ return RTL->RTLName == OtherDevice.RTL->RTLName;
+}
+
----------------
jdoerfert wrote:
> We use the name? I somehow feel uneasy about this. Don't we have some form of ID?
I agree. Be careful because `RTLInfoTy::RTLName` is only available in debug builds, so this piece of code will break if we compile the library in release mode.
You can use a direct pointer comparison `RTL == OtherDevice.RTL` (devices managed by the same RTL will point to the same `RTLInfoTy` object).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80649/new/
https://reviews.llvm.org/D80649
More information about the Openmp-commits
mailing list