Skip to content

Commit 2e27ba1

Browse files
authored
Merge pull request #140 from imciner2/im/ilp64
Introduce manual mapping of some ILP64 routines
2 parents 4128618 + 5408701 commit 2e27ba1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/MKL.jl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,35 @@ function __init__()
5050
BLAS.lbt_forward(libmkl_rt; clear=true, suffix_hint="64")
5151
# Load LP64 forward
5252
BLAS.lbt_forward(libmkl_rt; suffix_hint="")
53+
54+
# Some BLAS/LAPACK functions that don't have integers in their API aren't exported
55+
# from libmkl_rt with the 64 suffix, and instead we must map the ILP64 to the
56+
# non-suffixed variants
57+
for f in (:dlartgp_, :slartgp_,
58+
:dlartgs_, :slartgs_,
59+
:disnan_, :sisnan_,
60+
:dlabad_, :slabad_,
61+
:dladiv_, :sladiv_,
62+
:dlae2_, :slae2_,
63+
:dlaev2_, :slaev2_,
64+
:dlaisnan_, :slaisnan_,
65+
:dlamch_, :slamch_,
66+
:dlamc3_, :slamc3_,
67+
:dlanv2_, :slanv2_,
68+
:dlapy2_, :slapy2_,
69+
:dlapy3_, :slapy3_,
70+
:dlartg_, :slartg_,
71+
:dlas2_, :slas2_,
72+
:dsecnd_, :second_,
73+
:dlasv2_, :slasv2_,
74+
:iladiag_,
75+
:ilaprec_,
76+
:ilatrans_,
77+
:ilauplo_,
78+
)
79+
fptr = BLAS.lbt_get_forward(f, BLAS.LBT_INTERFACE_LP64)
80+
BLAS.lbt_set_forward(f, fptr, BLAS.LBT_INTERFACE_ILP64)
81+
end
5382
else
5483
BLAS.lbt_forward(libmkl_rt; clear=true, suffix_hint="")
5584
end

0 commit comments

Comments
 (0)