Skip to content
This repository
Browse code

Some blas/lapack related cosmetic cleanups as part of #1248

  • Loading branch information...
commit 35ca1862ff6cb2247acd4ffdd41fe3265999a4fc 1 parent f7f4a16
Viral B. Shah ViralBShah authored
4 base/Makefile
@@ -15,8 +15,8 @@ os_detect.jl: ../src/os_detect.h
15 15 $(QUIET_PERL) ${CC} -E -P -DJULIA ../src/os_detect.h | perl -p -e 's/\\n/\n/g' > $@
16 16
17 17 build_h.jl: ../Make.inc
18   - @echo "_jl_libblas_name = \"$(LIBBLASNAME)\"" > $@
19   - @echo "_jl_liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@
  18 + @echo "libblas_name = \"$(LIBBLASNAME)\"" > $@
  19 + @echo "liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@
20 20
21 21 clean:
22 22 rm -f *# *~
34 base/linalg_blas.jl → base/blas.jl
... ... @@ -1,6 +1,6 @@
1 1 typealias LapackScalar Union(Float64,Float32,Complex128,Complex64)
2 2
3   -module BLAS
  3 +module Blas
4 4 import Base.*
5 5
6 6 # SUBROUTINE DCOPY(N,DX,INCX,DY,INCY)
@@ -8,7 +8,7 @@ for (fname, elty) in ((:dcopy_,:Float64), (:scopy_,:Float32),
8 8 (:zcopy_,:Complex128), (:ccopy_,:Complex64))
9 9 @eval begin
10 10 function copy!(n::Integer, DX::Union(Ptr{$elty},Array{$elty}), incx::Integer, DY::Union(Ptr{$elty},Array{$elty}), incy::Integer)
11   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  11 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
12 12 (Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
13 13 &n, DX, &incx, DY, &incy)
14 14 DY
@@ -23,7 +23,7 @@ end
23 23 for (fname, elty) in ((:ddot_,:Float64), (:sdot_,:Float32))
24 24 @eval begin
25 25 function dot(n::Integer, DX::Union(Ptr{$elty},Array{$elty}), incx::Integer, DY::Union(Ptr{$elty},Array{$elty}), incy::Integer)
26   - ccall(dlsym(Base._jl_libblas, $(string(fname))), $elty,
  26 + ccall(dlsym(Base.libblas, $(string(fname))), $elty,
27 27 (Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
28 28 &n, DX, &incx, DY, &incy)
29 29 end
@@ -37,7 +37,7 @@ for (fname, elty, ret_type) in ((:dnrm2_,:Float64,:Float64),
37 37 (:scnrm2_,:Complex64,:Float32))
38 38 @eval begin
39 39 function nrm2(n::Integer, X::Union(Ptr{$elty},Array{$elty}), incx::Integer)
40   - ccall(dlsym(Base._jl_libblas, $(string(fname))), $ret_type,
  40 + ccall(dlsym(Base.libblas, $(string(fname))), $ret_type,
41 41 (Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
42 42 &n, X, &incx)
43 43 end
@@ -57,7 +57,7 @@ for (fname, elty) in ((:daxpy_,:Float64), (:saxpy_,:Float32),
57 57 function axpy!(n::Integer, a::($elty),
58 58 DX::Union(Ptr{$elty},Array{$elty}), incx::Integer,
59 59 DY::Union(Ptr{$elty},Array{$elty}), incy::Integer)
60   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  60 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
61 61 (Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
62 62 &n, &a, DX, &incx, DY, &incy)
63 63 DY
@@ -83,7 +83,7 @@ for (fname, elty) in ((:dsyrk_,:Float64), (:ssyrk_,:Float32),
83 83 nn = size(A, trans == 'N' ? 1 : 2)
84 84 if nn != n error("syrk!: dimension mismatch") end
85 85 k = size(A, trans == 'N' ? 2 : 1)
86   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  86 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
87 87 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
88 88 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
89 89 &uplo, &trans, &n, &k, &alpha, A, &stride(A,2), &beta, C, &stride(C,2))
@@ -93,7 +93,7 @@ for (fname, elty) in ((:dsyrk_,:Float64), (:ssyrk_,:Float32),
93 93 n = size(A, trans == 'N' ? 1 : 2)
94 94 k = size(A, trans == 'N' ? 2 : 1)
95 95 C = Array($elty, (n, n))
96   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  96 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
97 97 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
98 98 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
99 99 &uplo, &trans, &n, &k, &alpha, A, &stride(A,2), &0., C, &stride(C,2))
@@ -119,7 +119,7 @@ for (fname, elty) in ((:zherk_,:Complex128), (:cherk_,:Complex64))
119 119 nn = size(A, trans == 'N' ? 1 : 2)
120 120 if nn != n error("syrk!: dimension mismatch") end
121 121 k = size(A, trans == 'N' ? 2 : 1)
122   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  122 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
123 123 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
124 124 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
125 125 &uplo, &trans, &n, &k, &alpha, A, &stride(A,2), &beta, C, &stride(C,2))
@@ -129,7 +129,7 @@ for (fname, elty) in ((:zherk_,:Complex128), (:cherk_,:Complex64))
129 129 n = size(A, trans == 'N' ? 1 : 2)
130 130 k = size(A, trans == 'N' ? 2 : 1)
131 131 C = Array($elty, (n, n))
132   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  132 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
133 133 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
134 134 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
135 135 &uplo, &trans, &n, &k, &alpha, A, &stride(A,2), &0., C, &stride(C,2))
@@ -153,7 +153,7 @@ for (fname, elty) in ((:dgbmv_,:Float64), (:sgbmv_,:Float32),
153 153 function gbmv!(trans, m::Integer, kl::Integer, ku::Integer,
154 154 alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty},
155 155 beta::($elty), y::StridedVector{$elty})
156   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  156 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
157 157 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
158 158 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
159 159 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
@@ -165,7 +165,7 @@ for (fname, elty) in ((:dgbmv_,:Float64), (:sgbmv_,:Float32),
165 165 alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty})
166 166 n = stride(A,2)
167 167 y = Array($elty, n)
168   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  168 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
169 169 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
170 170 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
171 171 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
@@ -192,7 +192,7 @@ for (fname, elty) in ((:dsbmv_,:Float64), (:ssbmv_,:Float32),
192 192 function sbmv!(uplo, k::Integer,
193 193 alpha::($elty), A::StridedMatrix{$elty}, x::StridedVector{$elty},
194 194 beta::($elty), y::StridedVector{$elty})
195   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  195 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
196 196 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
197 197 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
198 198 &uplo, &size(A,2), &k, &alpha, A, &stride(A,2), x, &stride(x,1), &beta, y, &stride(y,1))
@@ -202,7 +202,7 @@ for (fname, elty) in ((:dsbmv_,:Float64), (:ssbmv_,:Float32),
202 202 x::StridedVector{$elty})
203 203 n = size(A,2)
204 204 y = Array($elty, n)
205   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  205 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
206 206 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
207 207 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
208 208 &uplo, &size(A,2), &k, &alpha, A, &stride(A,2), x, &stride(x,1), &0., y, &1)
@@ -228,7 +228,7 @@ for (fname, elty) in ((:dgemm_,:Float64), (:sgemm_,:Float32),
228 228 k = size(A, transA == 'N' ? 2 : 1)
229 229 n = size(B, transB == 'N' ? 2 : 1)
230 230 if m != size(C,1) || n != size(C,2) error("gemm!: mismatched dimensions") end
231   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  231 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
232 232 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
233 233 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
234 234 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
@@ -242,7 +242,7 @@ for (fname, elty) in ((:dgemm_,:Float64), (:sgemm_,:Float32),
242 242 if k != size(B, transB == 'N' ? 1 : 2) error("gemm!: mismatched dimensions") end
243 243 n = size(B, transB == 'N' ? 2 : 1)
244 244 C = Array($elty, (m, n))
245   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  245 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
246 246 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
247 247 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
248 248 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
@@ -266,7 +266,7 @@ for (fname, elty) in ((:dgemv_,:Float64), (:sgemv_,:Float32),
266 266 @eval begin
267 267 function gemv!(trans, alpha::($elty), A::StridedMatrix{$elty},
268 268 X::StridedVector{$elty}, beta::($elty), Y::StridedVector{$elty})
269   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  269 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
270 270 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
271 271 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
272 272 &trans, &size(A,1), &size(A,2), &alpha, A, &stride(A,2),
@@ -275,7 +275,7 @@ for (fname, elty) in ((:dgemv_,:Float64), (:sgemv_,:Float32),
275 275 end
276 276 function gemv!(trans, alpha::($elty), A::StridedMatrix{$elty}, X::StridedVector{$elty})
277 277 Y = Array($elty, size(A,1))
278   - ccall(dlsym(Base._jl_libblas, $(string(fname))), Void,
  278 + ccall(dlsym(Base.libblas, $(string(fname))), Void,
279 279 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
280 280 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
281 281 &trans, &size(A,1), &size(A,2), &alpha, A, &stride(A,2),
2  base/export.jl
@@ -7,7 +7,7 @@ export
7 7 FFTW,
8 8 DSP,
9 9 Lapack,
10   - BLAS,
  10 + Blas,
11 11
12 12 # Types
13 13 AbstractMatrix,
2  base/factorizations.jl
@@ -3,7 +3,7 @@ abstract Factorization{T}
3 3 ## LD for BunchKaufman, LR for CholeskyDense, LU for LUDense and
4 4 ## define size methods for Factorization types using it.
5 5
6   -## merge symmetrize with _jl_copy_upper_to_lower in linalg_blas.jl
  6 +## merge symmetrize with _jl_copy_upper_to_lower in blas.jl
7 7 ## maybe another function makehermitian and use conj for complex
8 8 function symmetrize!(A::AbstractMatrix, upper::Bool)
9 9 m, n = size(A)
92 base/lapack.jl
@@ -42,7 +42,7 @@ for (gbtrf, gbtrs, elty) in
42 42 n = size(AB, 2)
43 43 mnmn = min(m, n)
44 44 ipiv = Array(Int32, mnmn)
45   - ccall(dlsym(Base._jl_liblapack, $(string(gbtrf))), Void,
  45 + ccall(dlsym(Base.liblapack, $(string(gbtrf))), Void,
46 46 (Ptr{Int32}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
47 47 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32}),
48 48 &m, &n, &kl, &ku, AB, &stride(AB,2), ipiv, info)
@@ -63,7 +63,7 @@ for (gbtrf, gbtrs, elty) in
63 63 info = Array(Int32, 1)
64 64 n = size(AB,2)
65 65 if m != n || m != size(B,1) throw(LapackDimMisMatch("gbtrs!")) end
66   - ccall(dlsym(Base._jl_liblapack, $(string(gbtrs))), Void,
  66 + ccall(dlsym(Base.liblapack, $(string(gbtrs))), Void,
67 67 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
68 68 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32}),
69 69 &trans, &n, &kl, &ku, &size(B,2), AB, &stride(AB,2), ipiv,
@@ -95,7 +95,7 @@ for (gebal, gebak, elty) in
95 95 ihi = Array(Int32, 1)
96 96 ilo = Array(Int32, 1)
97 97 scale = Array($elty, n)
98   - ccall(dlsym(Base.Base._jl_liblapack, $(string(gebal))), Void,
  98 + ccall(dlsym(Base.liblapack, $(string(gebal))), Void,
99 99 (Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
100 100 Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
101 101 &job, &n, A, &stride(A,2), ilo, ihi, scale, info)
@@ -114,7 +114,7 @@ for (gebal, gebak, elty) in
114 114 chkstride1(V)
115 115 chksquare(V)
116 116 info = Array(Int32, 1)
117   - ccall(dlsym(Base.Base._jl_liblapack, $(string(gebak))), Void,
  117 + ccall(dlsym(Base.liblapack, $(string(gebak))), Void,
118 118 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
119 119 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
120 120 &job, &side, &size(V,1), &ilo, &ihi, scale, &n, V, &stride(V,2), info)
@@ -157,7 +157,7 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
157 157 lwork = int32(-1)
158 158 info = Array(Int32, 1)
159 159 for i in 1:2
160   - ccall(dlsym(Base._jl_liblapack, $(string(gebrd))), Void,
  160 + ccall(dlsym(Base.liblapack, $(string(gebrd))), Void,
161 161 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
162 162 Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty},
163 163 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
@@ -184,7 +184,7 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
184 184 lwork = int32(-1)
185 185 work = Array($elty, (1,))
186 186 for i in 1:2 # first call returns lwork as work[1]
187   - ccall(dlsym(Base._jl_liblapack, $(string(gelqf))), Void,
  187 + ccall(dlsym(Base.liblapack, $(string(gelqf))), Void,
188 188 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
189 189 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
190 190 &m, &n, A, &lda, tau, work, &lwork, info)
@@ -211,7 +211,7 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
211 211 lwork = int32(-1)
212 212 work = Array($elty, (1,))
213 213 for i in 1:2 # first call returns lwork as work[1]
214   - ccall(dlsym(Base._jl_liblapack, $(string(geqlf))), Void,
  214 + ccall(dlsym(Base.liblapack, $(string(geqlf))), Void,
215 215 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
216 216 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
217 217 &m, &n, A, &lda, tau, work, &lwork, info)
@@ -242,13 +242,13 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
242 242 if cmplx rwork = Array(Rtyp, 2n) end
243 243 for i in 1:2
244 244 if cmplx
245   - ccall(dlsym(Base._jl_liblapack, $(string(geqp3))), Void,
  245 + ccall(dlsym(Base.liblapack, $(string(geqp3))), Void,
246 246 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
247 247 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
248 248 Ptr{Rtyp}, Ptr{Int32}),
249 249 &m, &n, A, &stride(A,2), jpvt, tau, work, &lwork, rwork, info)
250 250 else
251   - ccall(dlsym(Base._jl_liblapack, $(string(geqp3))), Void,
  251 + ccall(dlsym(Base.liblapack, $(string(geqp3))), Void,
252 252 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
253 253 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
254 254 Ptr{Int32}),
@@ -279,7 +279,7 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
279 279 lwork = int32(-1)
280 280 info = Array(Int32, 1)
281 281 for i in 1:2 # first call returns lwork as work[1]
282   - ccall(dlsym(Base._jl_liblapack, $(string(geqrf))), Void,
  282 + ccall(dlsym(Base.liblapack, $(string(geqrf))), Void,
283 283 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
284 284 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
285 285 &m, &n, A, &stride(A,2), tau, work, &lwork, info)
@@ -304,7 +304,7 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
304 304 lwork = int32(-1)
305 305 work = Array($elty, 1)
306 306 for i in 1:2 # first call returns lwork as work[1]
307   - ccall(dlsym(Base._jl_liblapack, $(string(gerqf))), Void,
  307 + ccall(dlsym(Base.liblapack, $(string(gerqf))), Void,
308 308 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
309 309 Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
310 310 &m, &n, A, &stride(A,2), tau, work, &lwork, info)
@@ -328,7 +328,7 @@ for (gebrd, gelqf, geqlf, geqrf, geqp3, gerqf, getrf, elty) in
328 328 m, n = size(A)
329 329 lda = stride(A, 2)
330 330 ipiv = Array(Int32, n)
331   - ccall(dlsym(Base._jl_liblapack, $(string(getrf))), Void,
  331 + ccall(dlsym(Base.liblapack, $(string(getrf))), Void,
332 332 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
333 333 Ptr{Int32}, Ptr{Int32}, Ptr{Int32}),
334 334 &m, &n, A, &lda, ipiv, info)
@@ -358,7 +358,7 @@ for (gels, gesv, getrs, getri, elty) in
358 358 work = Array($elty, 1)
359 359 lwork = int32(-1)
360 360 for i in 1:2
361   - ccall(dlsym(Base._jl_liblapack, $(string(gels))), Void,
  361 + ccall(dlsym(Base.liblapack, $(string(gels))), Void,
362 362 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
363 363 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
364 364 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
@@ -388,7 +388,7 @@ for (gels, gesv, getrs, getri, elty) in
388 388 if size(B,1) != n throw(LapackDimMisMatch("gesv!")) end
389 389 ipiv = Array(Int32, n)
390 390 info = Array(Int32, 1)
391   - ccall(dlsym(Base._jl_liblapack, $(string(gesv))), Void,
  391 + ccall(dlsym(Base.liblapack, $(string(gesv))), Void,
392 392 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32},
393 393 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
394 394 &n, &size(B,2), A, &stride(A,2), ipiv, B, &stride(B,2), info)
@@ -408,7 +408,7 @@ for (gels, gesv, getrs, getri, elty) in
408 408 if m != n || size(B, 1) != m error("getrs!: dimension mismatch") end
409 409 nrhs = size(B, 2)
410 410 info = Array(Int32, 1)
411   - ccall(dlsym(Base._jl_liblapack, $(string(getrs))), Void,
  411 + ccall(dlsym(Base.liblapack, $(string(getrs))), Void,
412 412 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
413 413 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
414 414 &trans, &n, &size(B,2), A, &stride(A,2), ipiv, B, &stride(B,2), info)
@@ -430,7 +430,7 @@ for (gels, gesv, getrs, getri, elty) in
430 430 lwork = -1
431 431 work = Array($elty, 1)
432 432 for i in 1:2
433   - ccall(dlsym(Base._jl_liblapack, $(string(getri))), Void,
  433 + ccall(dlsym(Base.liblapack, $(string(getri))), Void,
434 434 (Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32},
435 435 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
436 436 &n, A, &lda, ipiv, work, &lwork, info)
@@ -482,7 +482,7 @@ for (geev, gesvd, gesdd, elty) in
482 482 info = Array(Int32, 1)
483 483 for i = 1:2
484 484 if cmplx
485   - ccall(dlsym(Base._jl_liblapack, $(string(geev))), Void,
  485 + ccall(dlsym(Base.liblapack, $(string(geev))), Void,
486 486 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{$elty},
487 487 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
488 488 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
@@ -490,7 +490,7 @@ for (geev, gesvd, gesdd, elty) in
490 490 &jobvl, &jobvr, &n, A, &stride(A,2), W, VL, &n, VR, &n,
491 491 work, &lwork, rwork, info)
492 492 else
493   - ccall(dlsym(Base._jl_liblapack, $(string(geev))), Void,
  493 + ccall(dlsym(Base.liblapack, $(string(geev))), Void,
494 494 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{$elty},
495 495 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty},
496 496 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty},
@@ -545,7 +545,7 @@ for (geev, gesvd, gesdd, elty) in
545 545 info = Array(Int32, 1)
546 546 for i = 1:2
547 547 if cmplx
548   - ccall(dlsym(Base._jl_liblapack, $(string(gesdd))), Void,
  548 + ccall(dlsym(Base.liblapack, $(string(gesdd))), Void,
549 549 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
550 550 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
551 551 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
@@ -553,7 +553,7 @@ for (geev, gesvd, gesdd, elty) in
553 553 &job, &m, &n, A, &stride(A,2), S, U, &m, VT, &n,
554 554 work, &lwork, rwork, iwork, info)
555 555 else
556   - ccall(dlsym(Base._jl_liblapack, $(string(gesdd))), Void,
  556 + ccall(dlsym(Base.liblapack, $(string(gesdd))), Void,
557 557 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
558 558 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
559 559 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
@@ -592,7 +592,7 @@ for (geev, gesvd, gesdd, elty) in
592 592 info = Array(Int32, 1)
593 593 for i in 1:2
594 594 if cmplx
595   - ccall(dlsym(Base._jl_liblapack, $(string(gesvd))), Void,
  595 + ccall(dlsym(Base.liblapack, $(string(gesvd))), Void,
596 596 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32},
597 597 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty},
598 598 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty},
@@ -600,7 +600,7 @@ for (geev, gesvd, gesdd, elty) in
600 600 &jobu, &jobvt, &m, &n, A, &stride(A,2), S, U, &m, VT, &n,
601 601 work, &lwork, rwork, info)
602 602 else
603   - ccall(dlsym(Base._jl_liblapack, $(string(gesvd))), Void,
  603 + ccall(dlsym(Base.liblapack, $(string(gesvd))), Void,
604 604 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32},
605 605 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty},
606 606 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{$elty},
@@ -642,7 +642,7 @@ for (gtsv, gttrf, gttrs, elty) in
642 642 end
643 643 if n != size(B,1) throw(LapackDimMisMatch("gtsv!")) end
644 644 info = Array(Int32, 1)
645   - ccall(dlsym(Base._jl_liblapack, $(string(gtsv))), Void,
  645 + ccall(dlsym(Base.liblapack, $(string(gtsv))), Void,
646 646 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty},
647 647 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
648 648 &n, &size(B,2), dl, d, du, B, &stride(B,2), info)
@@ -663,7 +663,7 @@ for (gtsv, gttrf, gttrs, elty) in
663 663 du2 = Array($elty, n-2)
664 664 ipiv = Array(Int32, n)
665 665 info = Array(Int32, 1)
666   - ccall(dlsym(Base._jl_liblapack, $(string(gttrf))), Void,
  666 + ccall(dlsym(Base.liblapack, $(string(gttrf))), Void,
667 667 (Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty},
668 668 Ptr{Int32}, Ptr{Int32}),
669 669 &n, dl, d, du, du2, ipiv, info)
@@ -685,7 +685,7 @@ for (gtsv, gttrf, gttrs, elty) in
685 685 if length(dl) != n - 1 || length(du) != n - 1 throw(LapackDimMisMatch("gttrs!")) end
686 686 if n != size(B,1) throw(LapackDimMisMatch("gttrs!")) end
687 687 info = Array(Int32, 1)
688   - ccall(dlsym(Base._jl_liblapack, $(string(gttrs))), Void,
  688 + ccall(dlsym(Base.liblapack, $(string(gttrs))), Void,
689 689 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32},
690 690 Ptr{$elty}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty},
691 691 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
@@ -714,7 +714,7 @@ for (orglq, orgqr, ormlq, ormqr, elty) in
714 714 lwork = int32(-1)
715 715 info = Array(Int32, 1)
716 716 for i in 1:2
717   - ccall(dlsym(Base._jl_liblapack, $(string(orglq))), Void,
  717 + ccall(dlsym(Base.liblapack, $(string(orglq))), Void,
718 718 (Ptr{Int32}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
719 719 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
720 720 &size(A,1), &size(A,2), &k, A, &stride(A,2), tau, work, &lwork, info)
@@ -737,7 +737,7 @@ for (orglq, orgqr, ormlq, ormqr, elty) in
737 737 lwork = int32(-1)
738 738 info = Array(Int32, 1)
739 739 for i in 1:2
740   - ccall(dlsym(Base._jl_liblapack, $(string(orgqr))), Void,
  740 + ccall(dlsym(Base.liblapack, $(string(orgqr))), Void,
741 741 (Ptr{Int32}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty},
742 742 Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
743 743 &size(A,1), &size(A,2), &k, A, &stride(A,2), tau, work, &lwork, info)
@@ -765,7 +765,7 @@ for (orglq, orgqr, ormlq, ormqr, elty) in
765 765 lwork = int32(-1)
766 766 info = Array(Int32, 1)
767 767 for i in 1:2
768   - ccall(dlsym(Base._jl_liblapack, $(string(ormlq))), Void,
  768 + ccall(dlsym(Base.liblapack, $(string(ormlq))), Void,
769 769 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
770 770 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
771 771 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
@@ -795,7 +795,7 @@ for (orglq, orgqr, ormlq, ormqr, elty) in
795 795 lwork = int32(-1)
796 796 info = Array(Int32, 1)
797 797 for i in 1:2
798   - ccall(dlsym(Base._jl_liblapack, $(string(ormqr))), Void,
  798 + ccall(dlsym(Base.liblapack, $(string(ormqr))), Void,
799 799 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{Int32},
800 800 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32},
801 801 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
@@ -834,7 +834,7 @@ for (posv, potrf, potri, potrs, elty) in
834 834 n = size(A,1)
835 835 if size(B,1) != n throw(LapackDimMisMatch("posv!")) end
836 836 info = Array(Int32, 1)
837   - ccall(dlsym(Base._jl_liblapack, $(string(posv))), Void,
  837 + ccall(dlsym(Base.liblapack, $(string(posv))), Void,
838 838 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
839 839 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
840 840 &uplo, &n, &size(B,2), A, &stride(A,2), B, &stride(B,2), info)
@@ -853,7 +853,7 @@ for (posv, potrf, potri, potrs, elty) in
853 853 chkstride1(A)
854 854 chksquare(A)
855 855 info = Array(Int32, 1)
856   - ccall(dlsym(Base._jl_liblapack, $(string(potrf))), Void,
  856 + ccall(dlsym(Base.liblapack, $(string(potrf))), Void,
857 857 (Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
858 858 &uplo, &size(A,1), A, &stride(A,2), info)
859 859 if info[1] < 0 throw(LapackException(info[1])) end
@@ -870,7 +870,7 @@ for (posv, potrf, potri, potrs, elty) in
870 870 function potri!(uplo::LapackChar, A::StridedMatrix{$elty})
871 871 chkstride1(A)
872 872 info = Array(Int32, 1)
873   - ccall(dlsym(Base._jl_liblapack, $(string(potri))), Void,
  873 + ccall(dlsym(Base.liblapack, $(string(potri))), Void,
874 874 (Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
875 875 &uplo, &size(A,1), A, &stride(A,2), info)
876 876 if info[1] < 0 throw(LapackException(info[1])) end
@@ -888,7 +888,7 @@ for (posv, potrf, potri, potrs, elty) in
888 888 n = size(A,2)
889 889 if size(B,1) != n error("potrs!: dimension mismatch") end
890 890 info = Array(Int32, 1)
891   - ccall(dlsym(Base._jl_liblapack, $(string(potrs))), Void,
  891 + ccall(dlsym(Base.liblapack, $(string(potrs))), Void,
892 892 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
893 893 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
894 894 &uplo, &n, &size(B,2), A, &stride(A,2), B, &stride(B,2), info)
@@ -917,7 +917,7 @@ for (ptsv, pttrf, pttrs, elty) in
917 917 n = length(D)
918 918 if length(E) != n - 1 || n != size(B,1) throw(LapackDimMismatch("ptsv!")) end
919 919 info = Array(Int32, 1)
920   - ccall(dlsym(Base._jl_liblapack, $(string(ptsv))), Void,
  920 + ccall(dlsym(Base.liblapack, $(string(ptsv))), Void,
921 921 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty},
922 922 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
923 923 &n, &size(B,2), D, E, B, &stride(B,2), info)
@@ -933,7 +933,7 @@ for (ptsv, pttrf, pttrs, elty) in
933 933 n = length(D)
934 934 if length(E) != (n-1) throw(LapackDimMisMatch("pttrf!")) end
935 935 info = Array(Int32, 1)
936   - ccall(dlsym(Base._jl_liblapack, $(string(pttrf))), Void,
  936 + ccall(dlsym(Base.liblapack, $(string(pttrf))), Void,
937 937 (Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{Int32}),
938 938 &n, D, E, info)
939 939 if info[1] != 0 throw(LapackException(info[1])) end
@@ -949,7 +949,7 @@ for (ptsv, pttrf, pttrs, elty) in
949 949 n = length(D)
950 950 if length(E) != (n-1) || size(B,1) != n throw(LapackDimMisMatch("pttrs!")) end
951 951 info = Array(Int32, 1)
952   - ccall(dlsym(Base._jl_liblapack, $(string(pttrs))), Void,
  952 + ccall(dlsym(Base.liblapack, $(string(pttrs))), Void,
953 953 (Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty},
954 954 Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
955 955 &n, &size(B,2), D, E, B, &stride(B,2), info)
@@ -978,7 +978,7 @@ for (trtri, trtrs, elty) in
978 978 if m != n error("trtri!: dimension mismatch") end
979 979 lda = stride(A, 2)
980 980 info = Array(Int32, 1)
981   - ccall(dlsym(Base._jl_liblapack, $trtri), Void,
  981 + ccall(dlsym(Base.liblapack, $trtri), Void,
982 982 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
983 983 Ptr{Int32}),
984 984 &uplo, &diag, &n, A, &lda, info)
@@ -998,7 +998,7 @@ for (trtri, trtrs, elty) in
998 998 n = size(A,2)
999 999 if size(B,1) != n throw(LapackDimMisMatch("trtrs!")) end
1000 1000 info = Array(Int32, 1)
1001   - ccall(dlsym(Base._jl_liblapack, $(string(trtrs))), Void,
  1001 + ccall(dlsym(Base.liblapack, $(string(trtrs))), Void,
1002 1002 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{Int32},
1003 1003 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
1004 1004 &uplo, &trans, &diag, &n, &size(B,2), A, &stride(A,2),
@@ -1023,7 +1023,7 @@ for (stev, elty) in
1023 1023 Zmat = Array($elty, (n, job != 'N' ? n : 0))
1024 1024 work = Array($elty, max(1, 2n-2))
1025 1025 info = Array(Int32, 1)
1026   - ccall(dlsym(Base._jl_liblapack, $(string(stev))), Void,
  1026 + ccall(dlsym(Base.liblapack, $(string(stev))), Void,
1027 1027 (Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{$elty}, Ptr{$elty},
1028 1028 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
1029 1029 &job, &n, dv, ev, Zmat, &n, work, info)
@@ -1054,7 +1054,7 @@ for (syconv, syev, sysv, sytrf, sytri, sytrs, elty) in
1054 1054 n = size(A,1)
1055 1055 work = Array($elty, n)
1056 1056 info = Array(Int32, 1)
1057   - ccall(dlsym(Base._jl_liblapack, $(string(syconv))), Void,
  1057 + ccall(dlsym(Base.liblapack, $(string(syconv))), Void,
1058 1058 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
1059 1059 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}),
1060 1060 &uplo, &'C', &n, A, &stride(A,2), ipiv, work, info)
@@ -1082,12 +1082,12 @@ for (syconv, syev, sysv, sytrf, sytri, sytrs, elty) in
1082 1082 info = Array(Int32, 1)
1083 1083 for i in 1:2
1084 1084 if cmplx
1085   - ccall(dlsym(Base._jl_liblapack, $(string(syev))), Void,
  1085 + ccall(dlsym(Base.liblapack, $(string(syev))), Void,
1086 1086 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
1087 1087 Ptr{Rtyp}, Ptr{$elty}, Ptr{Int32}, Ptr{Rtyp}, Ptr{Int32}),
1088 1088 &jobz, &uplo, &n, A, &stride(A,2), W, work, &lwork, rwork, info)
1089 1089 else
1090   - ccall(dlsym(Base._jl_liblapack, $(string(syev))), Void,
  1090 + ccall(dlsym(Base.liblapack, $(string(syev))), Void,
1091 1091 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
1092 1092 Ptr{Rtyp}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
1093 1093 &jobz, &uplo, &n, A, &stride(A,2), W, work, &lwork, info)
@@ -1118,7 +1118,7 @@ for (syconv, syev, sysv, sytrf, sytri, sytrs, elty) in
1118 1118 lwork = int32(-1)
1119 1119 info = Array(Int32, 1)
1120 1120 for i in 1:2
1121   - ccall(dlsym(Base._jl_liblapack, $(string(sysv))), Void,
  1121 + ccall(dlsym(Base.liblapack, $(string(sysv))), Void,
1122 1122 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32},
1123 1123 Ptr{$elty}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
1124 1124 &uplo, &n, &size(B,2), A, &stride(A,2), ipiv, B, &stride(B,2),
@@ -1147,7 +1147,7 @@ for (syconv, syev, sysv, sytrf, sytri, sytrs, elty) in
1147 1147 lwork = int32(-1)
1148 1148 info = Array(Int32, 1)
1149 1149 for i in 1:2
1150   - ccall(dlsym(Base._jl_liblapack, $(string(sytrf))), Void,
  1150 + ccall(dlsym(Base.liblapack, $(string(sytrf))), Void,
1151 1151 (Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
1152 1152 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
1153 1153 &uplo, &n, A, &stride(A,2), ipiv, work, &lwork, info)
@@ -1174,7 +1174,7 @@ for (syconv, syev, sysv, sytrf, sytri, sytrs, elty) in
1174 1174 lwork = int32(-1)
1175 1175 info = Array(Int32, 1)
1176 1176 for i in 1:2
1177   - ccall(dlsym(Base._jl_liblapack, $(string(sytri))), Void,
  1177 + ccall(dlsym(Base.liblapack, $(string(sytri))), Void,
1178 1178 (Ptr{Uint8}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
1179 1179 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
1180 1180 &uplo, &n, A, &stride(A,2), ipiv, work, &lwork, info)
@@ -1201,7 +1201,7 @@ for (syconv, syev, sysv, sytrf, sytri, sytrs, elty) in
1201 1201 n = size(A,1)
1202 1202 if n != size(B,1) throw(LapackDimMismatch("sytrs!")) end
1203 1203 info = Array(Int32, 1)
1204   - ccall(dlsym(Base._jl_liblapack, $(string(sytrs))), Void,
  1204 + ccall(dlsym(Base.liblapack, $(string(sytrs))), Void,
1205 1205 (Ptr{Uint8}, Ptr{Int32}, Ptr{Int32}, Ptr{$elty}, Ptr{Int32},
1206 1206 Ptr{Int32}, Ptr{$elty}, Ptr{Int32}, Ptr{Int32}),
1207 1207 &uplo, &n, &size(B,2), A, &stride(A,2), ipiv, B, &stride(B,2), info)
26 base/linalg.jl
@@ -23,7 +23,7 @@ function axpy{TA<:Number, T<:LapackScalar}(alpha::TA, x::Array{T}, y::Array{T})
23 23 if length(x) != length(y)
24 24 error("Inputs should be of the same length")
25 25 end
26   - BLAS.axpy!(length(x), convert(T, alpha), x, 1, y, 1)
  26 + Blas.axpy!(length(x), convert(T, alpha), x, 1, y, 1)
27 27 return y
28 28 end
29 29
@@ -34,13 +34,13 @@ function axpy{TA<:Number, T<:LapackScalar, TI<:Integer}(alpha::TA, x::Array{T},
34 34 if min(rx) < 1 || max(rx) > length(x) || min(ry) < 1 || max(ry) > length(y)
35 35 throw(BoundsError())
36 36 end
37   - BLAS.axpy!(length(rx), convert(T, alpha), pointer(x)+(first(rx)-1)*sizeof(T), step(rx), pointer(y)+(first(ry)-1)*sizeof(T), step(ry))
  37 + Blas.axpy!(length(rx), convert(T, alpha), pointer(x)+(first(rx)-1)*sizeof(T), step(rx), pointer(y)+(first(ry)-1)*sizeof(T), step(ry))
38 38 return y
39 39 end
40 40
41 41 function copy_to{T<:LapackScalar}(dest::Ptr{T}, src::Ptr{T}, n::Integer)
42 42 if n < 200
43   - BLAS.copy!(n, src, 1, dest, 1)
  43 + Blas.copy!(n, src, 1, dest, 1)
44 44 else
45 45 ccall(:memcpy, Ptr{Void}, (Ptr{Void}, Ptr{Void}, Uint), dest, src, n*sizeof(T))
46 46 end
@@ -53,7 +53,7 @@ function copy_to{T<:LapackScalar}(dest::Array{T}, src::Array{T})
53 53 throw(BoundsError())
54 54 end
55 55 if n < 200
56   - BLAS.copy!(n, src, 1, dest, 1)
  56 + Blas.copy!(n, src, 1, dest, 1)
57 57 else
58 58 ccall(:memcpy, Ptr{Void}, (Ptr{Void}, Ptr{Void}, Uint), dest, src, n*sizeof(T))
59 59 end
@@ -67,14 +67,14 @@ function copy_to{T<:LapackScalar,TI<:Integer}(dest::Array{T}, rdest::Union(Range
67 67 if length(rdest) != length(rsrc)
68 68 error("Ranges must be of the same length")
69 69 end
70   - BLAS.copy!(length(rsrc), pointer(src)+(first(rsrc)-1)*sizeof(T), step(rsrc),
  70 + Blas.copy!(length(rsrc), pointer(src)+(first(rsrc)-1)*sizeof(T), step(rsrc),
71 71 pointer(dest)+(first(rdest)-1)*sizeof(T), step(rdest))
72 72 return dest
73 73 end
74 74
75 75 function dot{T<:Union(Vector{Float64}, Vector{Float32})}(x::T, y::T)
76 76 length(x) != length(y) ? error("Inputs should be of same length") : true
77   - BLAS.dot(length(x), x, 1, y, 1)
  77 + Blas.dot(length(x), x, 1, y, 1)
78 78 end
79 79
80 80 function dot{T<:Union(Float64, Float32), TI<:Integer}(x::Vector{T}, rx::Union(Range1{TI},Range{TI}), y::Vector{T}, ry::Union(Range1{TI},Range{TI}))
@@ -82,16 +82,16 @@ function dot{T<:Union(Float64, Float32), TI<:Integer}(x::Vector{T}, rx::Union(Ra
82 82 if min(rx) < 1 || max(rx) > length(x) || min(ry) < 1 || max(ry) > length(y)
83 83 throw(BoundsError())
84 84 end
85   - BLAS.dot(length(rx), pointer(x)+(first(rx)-1)*sizeof(T), step(rx), pointer(y)+(first(ry)-1)*sizeof(T), step(ry))
  85 + Blas.dot(length(rx), pointer(x)+(first(rx)-1)*sizeof(T), step(rx), pointer(y)+(first(ry)-1)*sizeof(T), step(ry))
86 86 end
87 87
88   -norm{T<:LapackScalar}(x::Vector{T}) = BLAS.nrm2(length(x), x, 1)
  88 +norm{T<:LapackScalar}(x::Vector{T}) = Blas.nrm2(length(x), x, 1)
89 89
90 90 function norm{T<:LapackScalar, TI<:Integer}(x::Vector{T}, rx::Union(Range1{TI},Range{TI}))
91 91 if min(rx) < 1 || max(rx) > length(x)
92 92 throw(BoundsError())
93 93 end
94   - BLAS.nrm2(length(rx), pointer(x)+(first(rx)-1)*sizeof(T), step(rx))
  94 + Blas.nrm2(length(rx), pointer(x)+(first(rx)-1)*sizeof(T), step(rx))
95 95 end
96 96
97 97
@@ -189,7 +189,7 @@ function _jl_syrk{T<:LapackScalar}(tA, A::StridedMatrix{T})
189 189 return _jl_generic_matmatmul(tA, tAt, A, A)
190 190 end
191 191
192   - _jl_copy_upper_to_lower(BLAS.syrk('U', tA, one(T), A))
  192 + _jl_copy_upper_to_lower(Blas.syrk('U', tA, one(T), A))
193 193 end
194 194
195 195 function _jl_copy_upper_to_lower_conj(A::StridedMatrix)
@@ -221,7 +221,7 @@ function _jl_herk{T<:LapackScalar}(tA, A::StridedMatrix{T})
221 221 # Result array does not need to be initialized as long as beta==0
222 222 # C = Array(T, mA, mA)
223 223
224   - _jl_copy_upper_to_lower_conj(BLAS.herk('U', tA, one(T), A))
  224 + _jl_copy_upper_to_lower_conj(Blas.herk('U', tA, one(T), A))
225 225 end
226 226
227 227
@@ -251,7 +251,7 @@ function _jl_gemm{T<:LapackScalar}(C::StridedMatrix{T}, tA, tB,
251 251 return _jl_generic_matmatmul(C, tA, tB, A, B)
252 252 end
253 253
254   - BLAS.gemm!(tA, tB, one(T), A, B, zero(T), C)
  254 + Blas.gemm!(tA, tB, one(T), A, B, zero(T), C)
255 255 end
256 256
257 257 function (*){T<:LapackScalar}(A::StridedMatrix{T},
@@ -290,7 +290,7 @@ function _jl_gemv{T<:LapackScalar}(y::StridedVector{T},
290 290 if nA != length(x); error("*: argument shapes do not match"); end
291 291 if mA != length(y); error("*: output size is incorrect"); end
292 292
293   - BLAS.gemv!(tA, one(T), A, x, zero(T), y)
  293 + Blas.gemv!(tA, one(T), A, x, zero(T), y)
294 294 end
295 295
296 296 triu(M::AbstractMatrix) = triu(M,0)
2  base/linalg_dense.jl
@@ -17,7 +17,7 @@ end
17 17 cross(a::Vector, b::Vector) =
18 18 [a[2]*b[3]-a[3]*b[2], a[3]*b[1]-a[1]*b[3], a[1]*b[2]-a[2]*b[1]]
19 19
20   -# linalg_blas.jl defines matmul for floats; other integer and mixed precision
  20 +# blas.jl defines matmul for floats; other integer and mixed precision
21 21 # cases are handled here
22 22
23 23 lapack_size(t::Char, M::StridedVecOrMat) = (t == 'N') ? (size(M, 1), size(M, 2)) : (size(M,2), size(M, 1))
4 base/start_image.jl
@@ -14,8 +14,8 @@ _jl_librandom = dlopen("librandom");
14 14 @windows_only _jl_advapi32 = dlopen("Advapi32")
15 15
16 16 # Optional libraries
17   -const _jl_libblas = dlopen(_jl_libblas_name)
18   -const _jl_liblapack = (_jl_libblas_name == _jl_liblapack_name) ? _jl_libblas : dlopen(_jl_liblapack_name)
  17 +const libblas = dlopen(libblas_name)
  18 +const liblapack = (libblas_name == liblapack_name) ? libblas : dlopen(liblapack_name)
19 19 const libfftw = dlopen("libfftw3_threads")
20 20 const libfftwf = dlopen("libfftw3f_threads")
21 21
2  base/sysimg.jl
@@ -128,7 +128,7 @@ include("deepcopy.jl")
128 128 include("build_h.jl")
129 129
130 130 # linear algebra
131   -include("linalg_blas.jl")
  131 +include("blas.jl")
132 132 include("linalg.jl")
133 133 include("linalg_dense.jl")
134 134 include("lapack.jl")

1 comment on commit 35ca186

Douglas Bates
Collaborator

Thanks for doing this, Viral.

Please sign in to comment.
Something went wrong with that request. Please try again.