File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -71,4 +71,20 @@ attributes(device) subroutine threadfence_system()
71
71
end interface
72
72
public :: threadfence_system
73
73
74
+ interface
75
+ attributes(device) function __fadd_rd (x , y ) bind(c, name= ' __nv_fadd_rd' )
76
+ real , intent (in ) :: x, y
77
+ real :: __fadd_rd
78
+ end function
79
+ end interface
80
+ public :: __fadd_rd
81
+
82
+ interface
83
+ attributes(device) function __fadd_ru (x , y ) bind(c, name= ' __nv_fadd_ru' )
84
+ real , intent (in ) :: x, y
85
+ real :: __fadd_ru
86
+ end function
87
+ end interface
88
+ public :: __fadd_ru
89
+
74
90
end module
Original file line number Diff line number Diff line change
1
+ ! RUN: bbc -emit-hlfir -fcuda %s -o - | FileCheck %s
2
+
3
+ module mod1
4
+ type int
5
+ real :: inf, sup
6
+ end type int
7
+ contains
8
+ attributes(global) subroutine fadd(c, a, b)
9
+ type (int) :: c, a, b
10
+ c%inf = __fadd_rd(a%inf, b%inf)
11
+ c%sup = __fadd_ru(a%sup, b%sup)
12
+ end subroutine
13
+ end
14
+
15
+ ! CHECK-LABEL: func.func @_QMmod1Pfadd
16
+ ! CHECK: fir.call @__nv_fadd_rd
17
+ ! CHECK: fir.call @__nv_fadd_ru
You can’t perform that action at this time.
0 commit comments