Skip to content

Commit 9a292f7

Browse files
committed
Merge pull request #3 from lionpeloux/master
Fix a bug on osx for julia 0.4 : needeed to load libmkl_rt
2 parents 6d9e772 + a0d287f commit 9a292f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/VML.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ module VML
22

33
# TODO detect CPU architecture
44
const lib = :libmkl_vml_avx
5+
Libdl.dlopen(:libmkl_rt)
56

67
immutable VMLAccuracy
7-
mode::Uint
8+
mode::UInt
89
end
910
const VML_LA = VMLAccuracy(0x00000001)
1011
const VML_HA = VMLAccuracy(0x00000002)
1112
const VML_EP = VMLAccuracy(0x00000003)
1213
Base.show(io::IO, m::VMLAccuracy) = print(io, m == VML_LA ? "VML_LA" :
1314
m == VML_HA ? "VML_HA" : "VML_EP")
1415
vml_get_mode() = ccall((:_vmlGetMode, lib), Cuint, ())
15-
vml_set_mode(mode::Integer) = (ccall((:_vmlSetMode, lib), Cuint, (Uint,), mode); nothing)
16+
vml_set_mode(mode::Integer) = (ccall((:_vmlSetMode, lib), Cuint, (UInt,), mode); nothing)
1617

1718
vml_set_accuracy(m::VMLAccuracy) = vml_set_mode((vml_get_mode() & ~0x03) | m.mode)
1819
vml_get_accuracy() = VMLAccuracy(vml_get_mode() & 0x3)

0 commit comments

Comments
 (0)