@@ -6992,4 +6992,57 @@ Returns `X` (overwriting `C`) and `scale`.
69926992"""
69936993trsyl! (transa:: AbstractChar , transb:: AbstractChar , A:: AbstractMatrix , B:: AbstractMatrix , C:: AbstractMatrix , isgn:: Int = 1 )
69946994
6995+ for (fn, elty) in ((:dlacpy_ , :Float64 ),
6996+ (:slacpy_ , :Float32 ),
6997+ (:zlacpy_ , :ComplexF64 ),
6998+ (:clacpy_ , :ComplexF32 ))
6999+ @eval begin
7000+ # SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
7001+ # .. Scalar Arguments ..
7002+ # CHARACTER UPLO
7003+ # INTEGER LDA, LDB, M, N
7004+ # ..
7005+ # .. Array Arguments ..
7006+ # DOUBLE PRECISION A( LDA, * ), B( LDB, * )
7007+ # ..
7008+ function lacpy! (B:: AbstractMatrix{$elty} , A:: AbstractMatrix{$elty} , uplo:: AbstractChar )
7009+ require_one_based_indexing (A, B)
7010+ chkstride1 (A, B)
7011+ m,n = size (A)
7012+ m1,n1 = size (B)
7013+ (m1 < m || n1 < n) && throw (DimensionMismatch (" B of size ($m1 ,$n1 ) should have at least the same number of rows and columns than A of size ($m ,$n )" ))
7014+ lda = max (1 , stride (A, 2 ))
7015+ ldb = max (1 , stride (B, 2 ))
7016+ ccall ((@blasfunc ($ fn), libblastrampoline), Cvoid,
7017+ (Ref{UInt8}, Ref{BlasInt}, Ref{BlasInt}, Ptr{$ elty},
7018+ Ref{BlasInt}, Ptr{$ elty}, Ref{BlasInt}, Clong),
7019+ uplo, m, n, A, lda, B, ldb, 1 )
7020+ B
7021+ end
7022+ end
7023+ end
7024+
7025+ """
7026+ lacpy!(B, A, uplo) -> B
7027+
7028+ Copies all or part of a matrix `A` to another matrix `B`.
7029+ uplo specifies the part of the matrix `A` to be copied to `B`.
7030+ Set `uplo = 'L'` for the lower triangular part, `uplo = 'U'`
7031+ for the upper triangular part, any other character for all
7032+ the matrix `A`.
7033+
7034+ # Examples
7035+ ```jldoctest
7036+ julia> A = [1. 2. ; 3. 4.];
7037+
7038+ julia> B = [0. 0. ; 0. 0.];
7039+
7040+ julia> LAPACK.lacpy!(B, A, 'U')
7041+ 2×2 Matrix{Float64}:
7042+ 1.0 2.0
7043+ 0.0 4.0
7044+ ```
7045+ """
7046+ lacpy! (B:: AbstractMatrix , A:: AbstractMatrix , uplo:: AbstractChar )
7047+
69957048end # module
0 commit comments