Skip to content

Commit a1f06d1

Browse files
committed
Add the missing wrappers in libblas.jl
1 parent cc192c0 commit a1f06d1

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

src/blas.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ for (fname, elty) in ((:dgemv,:Float64),
665665
end
666666
lda >= size(A,1) || size(A,2) <= 1 || error("when `size(A,2) > 1`, `abs(stride(A,2))` must be at least `size(A,1)`")
667667
lda = max(1, size(A,1), lda)
668-
GC.@preserve A X Y $fname(trans, size(A,1), size(A,2), alpha, pA, lda, pX, sX, beta, pY, sY, 1)
668+
GC.@preserve A X Y $fname(trans, size(A,1), size(A,2), alpha, pA, lda, pX, sX, beta, pY, sY)
669669
Y
670670
end
671671
function gemv(trans::AbstractChar, alpha::($elty), A::AbstractMatrix{$elty}, X::AbstractVector{$elty})
@@ -856,7 +856,7 @@ for (fname, elty) in ((:zhemv,:ComplexF64),
856856
lda = max(1, stride(A, 2))
857857
px, stx = vec_pointer_stride(x, ArgumentError("input vector with 0 stride is not allowed"))
858858
py, sty = vec_pointer_stride(y, ArgumentError("dest vector with 0 stride is not allowed"))
859-
GC.@preserve x y $fname(uplo, n, α, A, lda, px, stx, β, py, sty, 1)
859+
GC.@preserve x y $fname(uplo, n, α, A, lda, px, stx, β, py, sty)
860860
y
861861
end
862862
function hemv(uplo::AbstractChar, α::($elty), A::AbstractMatrix{$elty}, x::AbstractVector{$elty})
@@ -1897,8 +1897,8 @@ or `transpose(A)*B + transpose(B)*A`, according to [`trans`](@ref stdlib-blas-tr
18971897
"""
18981898
syr2k(uplo::AbstractChar, trans::AbstractChar, A::AbstractVecOrMat, B::AbstractVecOrMat) = syr2k(uplo, trans, one(eltype(A)), A, B)
18991899

1900-
for (fname, elty1, elty2) in ((:zher2k_,:ComplexF64,:Float64),
1901-
(:cher2k_,:ComplexF32,:Float32))
1900+
for (fname, elty1, elty2) in ((:zher2k,:ComplexF64,:Float64),
1901+
(:cher2k,:ComplexF32,:Float32))
19021902
@eval begin
19031903
# SUBROUTINE CHER2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
19041904
#

src/libblas.jl

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
# --- Wrappers not generated because the Fortran routines are in F90 ---
2-
# The extension of crotg.f90 is not supported!
3-
# The extension of drotg.f90 is not supported!
4-
# The extension of srotg.f90 is not supported!
5-
# The extension of zrotg.f90 is not supported!
1+
function srotg(a, b, c, s)
2+
@ccall libblastrampoline.srotg_(a::Ref{Float32}, b::Ref{Float32}, c::Ref{Float32},
3+
s::Ref{Float32})::Cvoid
4+
end
5+
6+
function drotg(a, b, c, s)
7+
@ccall libblastrampoline.drotg_(a::Ref{Float64}, b::Ref{Float64}, c::Ref{Float64},
8+
s::Ref{Float64})::Cvoid
9+
end
10+
11+
function crotg(a, b, c, s)
12+
@ccall libblastrampoline.crotg_(a::Ref{ComplexF32}, b::Ref{ComplexF32}, c::Ref{Float32},
13+
s::Ref{ComplexF32})::Cvoid
14+
end
15+
16+
function zrotg(a, b, c, s)
17+
@ccall libblastrampoline.zrotg_(a::Ref{ComplexF64}, b::Ref{ComplexF64}, c::Ref{Float64},
18+
s::Ref{ComplexF64})::Cvoid
19+
end
620

721
function snrm2(n, x, incx)
822
@ccall libblastrampoline.snrm2_(n::Ref{BlasInt}, x::Ptr{Float32},

0 commit comments

Comments
 (0)