Skip to content

Commit acba822

Browse files
Renaud-Kclementval
andauthored
[CUF] Moving __fadd_rd and __fadd_ru to cudadevice.f90 as they are symbol already known upstream. (llvm#123127)
They are defined under `__clang_cuda_device_functions.h` --------- Co-authored-by: Valentin Clement (バレンタイン クレメン) <[email protected]>
1 parent 06edefa commit acba822

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

flang/module/__cuda_device.f90

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,4 @@
1414
! Set PRIVATE by default to explicitly only export what is meant
1515
! to be exported by this MODULE.
1616

17-
interface
18-
attributes(device) function __fadd_rd(x, y) bind(c, name='__nv_fadd_rd')
19-
real, intent(in), value :: x, y
20-
real :: __fadd_rd
21-
end function
22-
end interface
23-
public :: __fadd_rd
24-
25-
interface
26-
attributes(device) function __fadd_ru(x, y) bind(c, name='__nv_fadd_ru')
27-
real, intent(in), value :: x, y
28-
real :: __fadd_ru
29-
end function
30-
end interface
31-
public :: __fadd_ru
3217
end module

flang/module/cudadevice.f90

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,22 @@ attributes(device) subroutine threadfence_system()
7575
end interface
7676
public :: threadfence_system
7777

78+
! Math API
79+
80+
interface
81+
attributes(device) function __fadd_rd(x, y) bind(c, name='__nv_fadd_rd')
82+
real, intent(in), value :: x, y
83+
real :: __fadd_rd
84+
end function
85+
end interface
86+
public :: __fadd_rd
87+
88+
interface
89+
attributes(device) function __fadd_ru(x, y) bind(c, name='__nv_fadd_ru')
90+
real, intent(in), value :: x, y
91+
real :: __fadd_ru
92+
end function
93+
end interface
94+
public :: __fadd_ru
95+
7896
end module

0 commit comments

Comments
 (0)