@@ -870,6 +870,7 @@ for (fname, elty) in ((:zhpmv_, :ComplexF64),
870870 β,
871871 y,
872872 incy)
873+ return y
873874 end
874875 end
875876end
@@ -882,7 +883,7 @@ function hpmv!(uplo::AbstractChar,
882883 if N != length (y)
883884 throw (DimensionMismatch (" x has length $(N) , but y has length $(length (y)) " ))
884885 end
885- if length (AP) < Int64 ( N* (N+ 1 ) / 2 )
886+ if 2 * length (AP) < N* (N + 1 )
886887 throw (DimensionMismatch (" Packed Hermitian matrix A has size smaller than length(x) = $(N) ." ))
887888 end
888889 return hpmv! (uplo, N, convert (T, α), AP, x, stride (x, 1 ), convert (T, β), y, stride (y, 1 ))
@@ -891,14 +892,22 @@ end
891892"""
892893 hpmv!(uplo, α, AP, x, β, y)
893894
894- Update vector `y` as `α*AP*x + β*y` where `AP` is a packed Hermitian matrix.
895- The storage layout for `AP` is described in the reference BLAS module, level-2 BLAS at
896- <http://www.netlib.org/lapack/explore-html/>.
895+ Update vector `y` as `α*A*x + β*y`, where `A` is a Hermitian matrix provided
896+ in packed format `AP`.
897+
898+ With `uplo = 'U'`, the array AP must contain the upper triangular part of the
899+ Hermitian matrix packed sequentially, column by column, so that `AP[1]`
900+ contains `A[1, 1]`, `AP[2]` and `AP[3]` contain `A[1, 2]` and `A[2, 2]`
901+ respectively, and so on.
902+
903+ With `uplo = 'L'`, the array AP must contain the lower triangular part of the
904+ Hermitian matrix packed sequentially, column by column, so that `AP[1]`
905+ contains `A[1, 1]`, `AP[2]` and `AP[3]` contain `A[2, 1]` and `A[3, 1]`
906+ respectively, and so on.
897907
898- The scalar inputs `α` and `β` shall be numbers.
908+ The scalar inputs `α` and `β` must be complex or real numbers.
899909
900- The array inputs `x`, `y` and `AP` must be complex one-dimensional julia arrays of the
901- same type that is either `ComplexF32` or `ComplexF64`.
910+ The array inputs `x`, `y` and `AP` must all be of `ComplexF32` or `ComplexF64` type.
902911
903912Return the updated `y`.
904913"""
0 commit comments