[flang-commits] [flang] [flang][cuda] Extends matching distance computation (PR #91810)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Fri May 10 14:12:16 PDT 2024


================
@@ -2546,15 +2557,33 @@ static int GetMatchingDistance(const characteristics::DummyArgument &dummy,
       return 2;
     }
   } else if (*dummyDataAttr == common::CUDADataAttr::Managed) {
-    if (!actualDataAttr || *actualDataAttr == common::CUDADataAttr::Device) {
+    if (!actualDataAttr) {
+      if (isGpuUnified) {
----------------
klausler wrote:

Would be more readable as `return isGpuUnified ? 1 : isGpuManaged ? 0 : cudaInfMatchingValue;`.

https://github.com/llvm/llvm-project/pull/91810


More information about the flang-commits mailing list