[flang-commits] [flang] [flang][cuda] Add bind(c) interfaces for __fadd_rd and __fadd_ru (PR #122535)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Fri Jan 10 14:19:34 PST 2025


================
@@ -71,4 +71,18 @@ attributes(device) subroutine threadfence_system()
   end interface
   public :: threadfence_system
 
+  interface
+    attributes(device) function __fadd_rd(x, y) bind(c, name='__nv_fadd_rd')
+      real :: x, y, __fadd_rd
----------------
clementval wrote:

> Should the attributes be attributes(host,device)?

AFIAK this is only for the device. 

> Does x and y need value attribute?

No but we can add intent(in)

> Do we need !dir$ ignore_tkr (d) x, (d) y in this interface?

No necessary because variables are implicitly device in device context. 

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


More information about the flang-commits mailing list