[flang][cuda] Add interfaces for __uint2float_rX functions (#153620)
Also add bind name for __uint2double_rn
This commit is contained in:
parent
dc0becc4d0
commit
e27e4f3a99
@ -590,8 +590,36 @@ implicit none
|
||||
end function
|
||||
end interface
|
||||
|
||||
interface __uint2float_rd
|
||||
attributes(device) real function __uint2float_rd(i) bind(c, name='__nv_uint2float_rd')
|
||||
!dir$ ignore_tkr (d) i
|
||||
integer, value :: i
|
||||
end function
|
||||
end interface
|
||||
|
||||
interface __uint2float_rn
|
||||
attributes(device) real function __uint2float_rn(i) bind(c, name='__nv_uint2float_rn')
|
||||
!dir$ ignore_tkr (d) i
|
||||
integer, value :: i
|
||||
end function
|
||||
end interface
|
||||
|
||||
interface __uint2float_ru
|
||||
attributes(device) real function __uint2float_ru(i) bind(c, name='__nv_uint2float_ru')
|
||||
!dir$ ignore_tkr (d) i
|
||||
integer, value :: i
|
||||
end function
|
||||
end interface
|
||||
|
||||
interface __uint2float_rz
|
||||
attributes(device) real function __uint2float_rz(i) bind(c, name='__nv_uint2float_rz')
|
||||
!dir$ ignore_tkr (d) i
|
||||
integer, value :: i
|
||||
end function
|
||||
end interface
|
||||
|
||||
interface __uint2double_rn
|
||||
attributes(device) double precision function __uint2double_rn(i) bind(c)
|
||||
attributes(device) double precision function __uint2double_rn(i) bind(c, name='__nv_uint2double_rn')
|
||||
!dir$ ignore_tkr (d) i
|
||||
integer, value :: i
|
||||
end function
|
||||
|
@ -20,6 +20,30 @@ end subroutine
|
||||
! CHECK-LABEL: _QPtest_usad
|
||||
! CHECK: %{{.*}} = fir.call @__nv_usad(%{{.*}}, %{{.*}}, %{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32, i32, i32) -> i32
|
||||
|
||||
attributes(global) subroutine test_uint2float_rX()
|
||||
real :: res
|
||||
integer :: i
|
||||
res = __uint2float_rd(i)
|
||||
res = __uint2float_rn(i)
|
||||
res = __uint2float_ru(i)
|
||||
res = __uint2float_rz(i)
|
||||
end subroutine
|
||||
|
||||
! CHECK-LABEL: _QPtest_uint2float_rx
|
||||
! CHECK: %{{.*}} = fir.call @__nv_uint2float_rd(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
|
||||
! CHECK: %{{.*}} = fir.call @__nv_uint2float_rn(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
|
||||
! CHECK: %{{.*}} = fir.call @__nv_uint2float_ru(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
|
||||
! CHECK: %{{.*}} = fir.call @__nv_uint2float_rz(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f32
|
||||
|
||||
attributes(global) subroutine test_uint2double_rn()
|
||||
double precision :: res
|
||||
integer :: i
|
||||
res = __uint2double_rn(i)
|
||||
end subroutine
|
||||
|
||||
! CHECK-LABEL: _QPtest_uint2double_rn
|
||||
! CHECK: %{{.*}} = fir.call @__nv_uint2double_rn(%{{.*}}) proc_attrs<bind_c> fastmath<contract> : (i32) -> f64
|
||||
|
||||
attributes(global) subroutine test_ull2dloat_rX()
|
||||
real :: res
|
||||
integer(8) :: i
|
||||
|
Loading…
x
Reference in New Issue
Block a user