|
1 | | -for (f!, char) in ((:mul!, 'N'), |
2 | | - (:At_mul_B!, 'T'), |
3 | | - (:Ac_mul_B!, 'C')) |
4 | | - for (fname, elty) in ((:dgemv_, :Float64), |
5 | | - (:sgemv_, :Float32), |
6 | | - (:zgemv_, :Complex128), |
7 | | - (:cgemv_, :Complex64)) |
8 | | - @eval begin |
9 | | - function $f!(y::VecOrMat{$elty}, A::Matrix{$elty}, x::VecOrMat{$elty}, istart::Int, jstart::Int, INCX::Int, INCY::Int) |
10 | | - ccall((@blasfunc($fname), libblas), Void, |
11 | | - (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
12 | | - Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
13 | | - Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
14 | | - $char, size(A,1), size(A,2), $elty(1.0), |
15 | | - A, max(1,stride(A,2)), pointer(x, jstart), INCX, |
16 | | - $elty(1.0), pointer(y, istart), INCY) |
17 | | - y |
18 | | - end |
| 1 | +for (fname, elty) in ((:dgemv_, :Float64), |
| 2 | + (:sgemv_, :Float32), |
| 3 | + (:zgemv_, :ComplexF64), |
| 4 | + (:cgemv_, :ComplexF32)) |
| 5 | + @eval begin |
| 6 | + function mul!(y::VecOrMat{$elty}, A::Matrix{$elty}, x::VecOrMat{$elty}, istart::Int, jstart::Int, INCX::Int, INCY::Int) |
| 7 | + ccall((@blasfunc($fname), libblas), Nothing, |
| 8 | + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
| 9 | + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
| 10 | + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
| 11 | + 'N', size(A,1), size(A,2), $elty(1.0), |
| 12 | + A, max(1,stride(A,2)), pointer(x, jstart), INCX, |
| 13 | + $elty(1.0), pointer(y, istart), INCY) |
| 14 | + y |
| 15 | + end |
| 16 | + function mul!(y::VecOrMat{$elty}, At::Transpose{$elty,Matrix{$elty}}, x::VecOrMat{$elty}, istart::Int, jstart::Int, INCX::Int, INCY::Int) |
| 17 | + A = parent(At) |
| 18 | + ccall((@blasfunc($fname), libblas), Nothing, |
| 19 | + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
| 20 | + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
| 21 | + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
| 22 | + 'T', size(A,1), size(A,2), $elty(1.0), |
| 23 | + A, max(1,stride(A,2)), pointer(x, jstart), INCX, |
| 24 | + $elty(1.0), pointer(y, istart), INCY) |
| 25 | + y |
19 | 26 | end |
| 27 | + function mul!(y::VecOrMat{$elty}, Ac::Adjoint{$elty,Matrix{$elty}}, x::VecOrMat{$elty}, istart::Int, jstart::Int, INCX::Int, INCY::Int) |
| 28 | + A = parent(Ac) |
| 29 | + ccall((@blasfunc($fname), libblas), Nothing, |
| 30 | + (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
| 31 | + Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
| 32 | + Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
| 33 | + 'C', size(A,1), size(A,2), $elty(1.0), |
| 34 | + A, max(1,stride(A,2)), pointer(x, jstart), INCX, |
| 35 | + $elty(1.0), pointer(y, istart), INCY) |
| 36 | + y |
| 37 | + end |
20 | 38 | end |
21 | 39 | end |
22 | 40 |
|
23 | 41 |
|
24 | | - |
25 | | - |
26 | 42 | for (fname, elty) in ((:dgemv_,:Float64), |
27 | 43 | (:sgemv_,:Float32), |
28 | | - (:zgemv_,:Complex128), |
29 | | - (:cgemv_,:Complex64)) |
| 44 | + (:zgemv_,:ComplexF64), |
| 45 | + (:cgemv_,:ComplexF32)) |
30 | 46 | @eval begin |
31 | 47 | function mul!(y::VecOrMat{$elty}, L::LowRankMatrix{$elty}, x::VecOrMat{$elty}, istart::Int, jstart::Int, INCX::Int, INCY::Int) |
32 | 48 | fill!(L.temp, zero($elty)) |
33 | | - ccall((@blasfunc($fname), libblas), Void, |
| 49 | + ccall((@blasfunc($fname), libblas), Nothing, |
34 | 50 | (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
35 | 51 | Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
36 | 52 | Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
37 | 53 | 'T', size(L,2), rank(L), $elty(1.0), |
38 | 54 | L.V, max(1,stride(L.V,2)), pointer(x, jstart), INCX, |
39 | 55 | $elty(1.0), L.temp, 1) |
40 | 56 | unsafe_broadcasttimes!(L.temp, L.Σ.diag) |
41 | | - ccall((@blasfunc($fname), libblas), Void, |
| 57 | + ccall((@blasfunc($fname), libblas), Nothing, |
42 | 58 | (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
43 | 59 | Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
44 | 60 | Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
|
55 | 71 |
|
56 | 72 | for (fname, elty) in ((:dgemv_,:Float64), |
57 | 73 | (:sgemv_,:Float32), |
58 | | - (:zgemv_,:Complex128), |
59 | | - (:cgemv_,:Complex64)) |
| 74 | + (:zgemv_,:ComplexF64), |
| 75 | + (:cgemv_,:ComplexF32)) |
60 | 76 | @eval begin |
61 | 77 | function mul!(u::Vector{$elty}, B::BarycentricMatrix2D{$elty}, v::Vector{$elty}, istart::Int, jstart::Int) |
62 | 78 | fill!(B.temp1, zero($elty)) |
63 | | - ccall((@blasfunc($fname), libblas), Void, |
| 79 | + ccall((@blasfunc($fname), libblas), Nothing, |
64 | 80 | (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
65 | 81 | Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
66 | 82 | Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
67 | 83 | 'T', size(B.V,1), size(B.V,2), $elty(1.0), |
68 | 84 | B.V, max(1,stride(B.V,2)), pointer(v, jstart), 1, |
69 | 85 | $elty(1.0), B.temp1, 1) |
70 | 86 | fill!(B.temp2, zero($elty)) |
71 | | - ccall((@blasfunc($fname), libblas), Void, |
| 87 | + ccall((@blasfunc($fname), libblas), Nothing, |
72 | 88 | (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
73 | 89 | Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
74 | 90 | Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
75 | 91 | 'N', size(B.B.F,1), size(B.B.F,2), $elty(1.0), |
76 | 92 | B.B.F, max(1,stride(B.B.F,2)), B.temp1, 1, |
77 | 93 | $elty(1.0), B.temp2, 1) |
78 | | - ccall((@blasfunc($fname), libblas), Void, |
| 94 | + ccall((@blasfunc($fname), libblas), Nothing, |
79 | 95 | (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ref{$elty}, |
80 | 96 | Ptr{$elty}, Ref{BlasInt}, Ptr{$elty}, Ref{BlasInt}, |
81 | 97 | Ref{$elty}, Ptr{$elty}, Ref{BlasInt}), |
|
0 commit comments