[flang-commits] [flang] [flang][cuda] Add more math intrinsic interfaces in cudadevice (PR #128931)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Wed Feb 26 11:25:02 PST 2025
================
@@ -431,6 +431,351 @@ attributes(device) real(8) function sinpi(x) bind(c,name='__nv_sinpi')
end function
end interface
+ interface __float2half_rn
+ attributes(device) real(2) function __float2half_rn(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ real, value :: r
+ end function
+ end interface
+
+ interface __half2float
+ attributes(device) real function __half2float(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ real(2), value :: i
+ end function
+ end interface
+
+ interface __double2int_rn
+ attributes(device) integer function __double2int_rn(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2int_rz
+ attributes(device) integer function __double2int_rz(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2int_ru
+ attributes(device) integer function __double2int_ru(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2int_rd
+ attributes(device) integer function __double2int_rd(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2uint_rn
+ attributes(device) integer function __double2uint_rn(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2uint_rz
+ attributes(device) integer function __double2uint_rz(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2uint_ru
+ attributes(device) integer function __double2uint_ru(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2uint_rd
+ attributes(device) integer function __double2uint_rd(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2float_rn
+ attributes(device) real function __double2float_rn(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2float_rz
+ attributes(device) real function __double2float_rz(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2float_ru
+ attributes(device) real function __double2float_ru(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2float_rd
+ attributes(device) real function __double2float_rd(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2loint
+ attributes(device) integer function __double2loint(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2hiint
+ attributes(device) integer function __double2hiint(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __hiloint2double
+ attributes(device) double precision function __hiloint2double(i, j) bind(c)
+ integer, value :: i, j
+ !dir$ ignore_tkr (d) i, (d) j
+ end function
+ end interface
+
+ interface __int2double_rn
+ attributes(device) double precision function __int2double_rn(i) bind(c)
+ !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)
+ !dir$ ignore_tkr (d) i
+ integer, value :: i
+ end function
+ end interface
+
+ interface __double2ll_rn
+ attributes(device) integer(8) function __double2ll_rn(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ll_rz
+ attributes(device) integer(8) function __double2ll_rz(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ll_ru
+ attributes(device) integer(8) function __double2ll_ru(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ll_rd
+ attributes(device) integer(8) function __double2ll_rd(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ull_rn
+ attributes(device) integer(8) function __double2ull_rn(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ull_rz
+ attributes(device) integer(8) function __double2ull_rz(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ull_ru
+ attributes(device) integer(8) function __double2ull_ru(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __double2ull_rd
+ attributes(device) integer(8) function __double2ull_rd(r) bind(c)
+ !dir$ ignore_tkr (d) r
+ double precision, value :: r
+ end function
+ end interface
+
+ interface __ll2double_rn
+ attributes(device) double precision function __ll2double_rn(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ll2double_rz
+ attributes(device) double precision function __ll2double_rz(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ll2double_ru
+ attributes(device) double precision function __ll2double_ru(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ll2double_rd
+ attributes(device) double precision function __ll2double_rd(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ull2double_rn
+ attributes(device) double precision function __ull2double_rn(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ull2double_rz
+ attributes(device) double precision function __ull2double_rz(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ull2double_ru
+ attributes(device) double precision function __ull2double_ru(i) bind(c)
+ !dir$ ignore_tkr (d) i
+ integer(8), value :: i
+ end function
+ end interface
+
+ interface __ull2double_rd
+ attributes(device) double precision function __ull2double_rd(i) bind(c)
+ integer(8), value :: i
+ !dir$ ignore_tkr (d) i
----------------
clementval wrote:
Thanks! Good catch!
https://github.com/llvm/llvm-project/pull/128931
More information about the flang-commits
mailing list