📄 blas.texi
字号:
@deftypefunx int gsl_blas_dcopy (const gsl_vector * @var{x}, gsl_vector * @var{y})@deftypefunx int gsl_blas_ccopy (const gsl_vector_complex_float * @var{x}, gsl_vector_complex_float * @var{y})@deftypefunx int gsl_blas_zcopy (const gsl_vector_complex * @var{x}, gsl_vector_complex * @var{y})@cindex COPY, Level-1 BLASThese functions copy the elements of the vector @var{x} into the vector@var{y}.@end deftypefun@deftypefun int gsl_blas_saxpy (float @var{alpha}, const gsl_vector_float * @var{x}, gsl_vector_float * @var{y})@deftypefunx int gsl_blas_daxpy (double @var{alpha}, const gsl_vector * @var{x}, gsl_vector * @var{y})@deftypefunx int gsl_blas_caxpy (const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, gsl_vector_complex_float * @var{y})@deftypefunx int gsl_blas_zaxpy (const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, gsl_vector_complex * @var{y})@cindex AXPY, Level-1 BLASThese functions compute the sum @math{y = \alpha x + y} for the vectors@var{x} and @var{y}.@end deftypefun@deftypefun void gsl_blas_sscal (float @var{alpha}, gsl_vector_float * @var{x})@deftypefunx void gsl_blas_dscal (double @var{alpha}, gsl_vector * @var{x})@deftypefunx void gsl_blas_cscal (const gsl_complex_float @var{alpha}, gsl_vector_complex_float * @var{x})@deftypefunx void gsl_blas_zscal (const gsl_complex @var{alpha}, gsl_vector_complex * @var{x})@deftypefunx void gsl_blas_csscal (float @var{alpha}, gsl_vector_complex_float * @var{x})@deftypefunx void gsl_blas_zdscal (double @var{alpha}, gsl_vector_complex * @var{x})@cindex SCAL, Level-1 BLASThese functions rescale the vector @var{x} by the multiplicative factor@var{alpha}.@end deftypefun@deftypefun int gsl_blas_srotg (float @var{a}[], float @var{b}[], float @var{c}[], float @var{s}[])@deftypefunx int gsl_blas_drotg (double @var{a}[], double @var{b}[], double @var{c}[], double @var{s}[])@cindex ROTG, Level-1 BLAS@cindex Givens Rotation, BLASThese functions compute a Givens rotation @math{(c,s)} which zeroes thevector @math{(a,b)},@tex\beforedisplay$$\left(\matrix{c&s\cr-s&c\cr}\right)\left(\matrix{a\crb\cr}\right)=\left(\matrix{r'\cr0\cr}\right)$$\afterdisplay@end tex@ifinfo@example[ c s ] [ a ] = [ r ][ -s c ] [ b ] [ 0 ]@end example@end ifinfo@noindentThe variables @var{a} and @var{b} are overwritten by the routine.@end deftypefun@deftypefun int gsl_blas_srot (gsl_vector_float * @var{x}, gsl_vector_float * @var{y}, float @var{c}, float @var{s})@deftypefunx int gsl_blas_drot (gsl_vector * @var{x}, gsl_vector * @var{y}, const double @var{c}, const double @var{s})These functions apply a Givens rotation @math{(x', y') = (c x + s y, -sx + c y)} to the vectors @var{x}, @var{y}.@end deftypefun@deftypefun int gsl_blas_srotmg (float @var{d1}[], float @var{d2}[], float @var{b1}[], float @var{b2}, float @var{P}[])@deftypefunx int gsl_blas_drotmg (double @var{d1}[], double @var{d2}[], double @var{b1}[], double @var{b2}, double @var{P}[])@cindex Modified Givens Rotation, BLAS@cindex Givens Rotation, Modified, BLASThese functions compute a modified Given's transformation. The modifiedGiven's transformation is defined in the original Level-1 @sc{blas}specification, given in the references.@end deftypefun@deftypefun int gsl_blas_srotm (gsl_vector_float * @var{x}, gsl_vector_float * @var{y}, const float @var{P}[])@deftypefunx int gsl_blas_drotm (gsl_vector * @var{x}, gsl_vector * @var{y}, const double @var{P}[])These functions apply a modified Given's transformation. @end deftypefun@node Level 2 GSL BLAS Interface@subsection Level 2 @deftypefun int gsl_blas_sgemv (CBLAS_TRANSPOSE_t @var{TransA}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_vector_float * @var{x}, float @var{beta}, gsl_vector_float * @var{y})@deftypefunx int gsl_blas_dgemv (CBLAS_TRANSPOSE_t @var{TransA}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_vector * @var{x}, double @var{beta}, gsl_vector * @var{y})@deftypefunx int gsl_blas_cgemv (CBLAS_TRANSPOSE_t @var{TransA}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_vector_complex_float * @var{x}, const gsl_complex_float @var{beta}, gsl_vector_complex_float * @var{y})@deftypefunx int gsl_blas_zgemv (CBLAS_TRANSPOSE_t @var{TransA}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{x}, const gsl_complex @var{beta}, gsl_vector_complex * @var{y})@cindex GEMV, Level-2 BLASThese functions compute the matrix-vector product and sum @math{y =\alpha op(A) x + \beta y}, where @math{op(A) = A},@math{A^T}, @math{A^H} for @var{TransA} = @code{CblasNoTrans},@code{CblasTrans}, @code{CblasConjTrans}.@end deftypefun@deftypefun int gsl_blas_strmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_float * @var{A}, gsl_vector_float * @var{x})@deftypefunx int gsl_blas_dtrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix * @var{A}, gsl_vector * @var{x})@deftypefunx int gsl_blas_ctrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex_float * @var{A}, gsl_vector_complex_float * @var{x})@deftypefunx int gsl_blas_ztrmv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex * @var{A}, gsl_vector_complex * @var{x})@cindex TRMV, Level-2 BLASThese functions compute the matrix-vector product @math{x =\alpha op(A) x} for the triangular matrix @var{A}, where@math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} =@code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When@var{Uplo} is @code{CblasUpper} then the upper triangle of @var{A} isused, and when @var{Uplo} is @code{CblasLower} then the lower triangleof @var{A} is used. If @var{Diag} is @code{CblasNonUnit} then thediagonal of the matrix is used, but if @var{Diag} is @code{CblasUnit}then the diagonal elements of the matrix @var{A} are taken as unity andare not referenced.@end deftypefun@deftypefun int gsl_blas_strsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_float * @var{A}, gsl_vector_float * @var{x})@deftypefunx int gsl_blas_dtrsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix * @var{A}, gsl_vector * @var{x})@deftypefunx int gsl_blas_ctrsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex_float * @var{A}, gsl_vector_complex_float * @var{x})@deftypefunx int gsl_blas_ztrsv (CBLAS_UPLO_t @var{Uplo}, CBLAS_TRANSPOSE_t @var{TransA}, CBLAS_DIAG_t @var{Diag}, const gsl_matrix_complex * @var{A}, gsl_vector_complex *@var{x})@cindex TRSV, Level-2 BLASThese functions compute @math{inv(op(A)) x} for @var{x}, where@math{op(A) = A}, @math{A^T}, @math{A^H} for @var{TransA} =@code{CblasNoTrans}, @code{CblasTrans}, @code{CblasConjTrans}. When@var{Uplo} is @code{CblasUpper} then the upper triangle of @var{A} isused, and when @var{Uplo} is @code{CblasLower} then the lower triangleof @var{A} is used. If @var{Diag} is @code{CblasNonUnit} then thediagonal of the matrix is used, but if @var{Diag} is @code{CblasUnit}then the diagonal elements of the matrix @var{A} are taken as unity andare not referenced.@end deftypefun@deftypefun int gsl_blas_ssymv (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_matrix_float * @var{A}, const gsl_vector_float * @var{x}, float @var{beta}, gsl_vector_float * @var{y})@deftypefunx int gsl_blas_dsymv (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_matrix * @var{A}, const gsl_vector * @var{x}, double @var{beta}, gsl_vector * @var{y})@cindex SYMV, Level-2 BLASThese functions compute the matrix-vector product and sum @math{y =\alpha A x + \beta y} for the symmetric matrix @var{A}. Since thematrix @var{A} is symmetric only its upper half or lower half need to bestored. When @var{Uplo} is @code{CblasUpper} then the upper triangleand diagonal of @var{A} are used, and when @var{Uplo} is@code{CblasLower} then the lower triangle and diagonal of @var{A} areused.@end deftypefun@deftypefun int gsl_blas_chemv (CBLAS_UPLO_t @var{Uplo}, const gsl_complex_float @var{alpha}, const gsl_matrix_complex_float * @var{A}, const gsl_vector_complex_float * @var{x}, const gsl_complex_float @var{beta}, gsl_vector_complex_float * @var{y})@deftypefunx int gsl_blas_zhemv (CBLAS_UPLO_t @var{Uplo}, const gsl_complex @var{alpha}, const gsl_matrix_complex * @var{A}, const gsl_vector_complex * @var{x}, const gsl_complex @var{beta}, gsl_vector_complex * @var{y})@cindex HEMV, Level-2 BLASThese functions compute the matrix-vector product and sum @math{y =\alpha A x + \beta y} for the hermitian matrix @var{A}. Since thematrix @var{A} is hermitian only its upper half or lower half need to bestored. When @var{Uplo} is @code{CblasUpper} then the upper triangleand diagonal of @var{A} are used, and when @var{Uplo} is@code{CblasLower} then the lower triangle and diagonal of @var{A} areused. The imaginary elements of the diagonal are automatically assumedto be zero and are not referenced.@end deftypefun@deftypefun int gsl_blas_sger (float @var{alpha}, const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, gsl_matrix_float * @var{A})@deftypefunx int gsl_blas_dger (double @var{alpha}, const gsl_vector * @var{x}, const gsl_vector * @var{y}, gsl_matrix * @var{A})@deftypefunx int gsl_blas_cgeru (const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_matrix_complex_float * @var{A})@deftypefunx int gsl_blas_zgeru (const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_matrix_complex * @var{A})@cindex GER, Level-2 BLAS@cindex GERU, Level-2 BLASThese functions compute the rank-1 update @math{A = \alpha x y^T + A} ofthe matrix @var{A}.@end deftypefun@deftypefun int gsl_blas_cgerc (const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_matrix_complex_float * @var{A})@deftypefunx int gsl_blas_zgerc (const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_matrix_complex * @var{A})@cindex GERC, Level-2 BLASThese functions compute the conjugate rank-1 update @math{A = \alpha xy^H + A} of the matrix @var{A}.@end deftypefun@deftypefun int gsl_blas_ssyr (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_vector_float * @var{x}, gsl_matrix_float * @var{A})@deftypefunx int gsl_blas_dsyr (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_vector * @var{x}, gsl_matrix * @var{A})@cindex SYR, Level-2 BLASThese functions compute the symmetric rank-1 update @math{A = \alpha xx^T + A} of the symmetric matrix @var{A}. Since the matrix @var{A} issymmetric only its upper half or lower half need to be stored. When@var{Uplo} is @code{CblasUpper} then the upper triangle and diagonal of@var{A} are used, and when @var{Uplo} is @code{CblasLower} then thelower triangle and diagonal of @var{A} are used.@end deftypefun@deftypefun int gsl_blas_cher (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_vector_complex_float * @var{x}, gsl_matrix_complex_float * @var{A})@deftypefunx int gsl_blas_zher (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_vector_complex * @var{x}, gsl_matrix_complex * @var{A})@cindex HER, Level-2 BLASThese functions compute the hermitian rank-1 update @math{A = \alpha xx^H + A} of the hermitian matrix @var{A}. Since the matrix @var{A} ishermitian only its upper half or lower half need to be stored. When@var{Uplo} is @code{CblasUpper} then the upper triangle and diagonal of@var{A} are used, and when @var{Uplo} is @code{CblasLower} then thelower triangle and diagonal of @var{A} are used. The imaginary elementsof the diagonal are automatically set to zero.@end deftypefun@deftypefun int gsl_blas_ssyr2 (CBLAS_UPLO_t @var{Uplo}, float @var{alpha}, const gsl_vector_float * @var{x}, const gsl_vector_float * @var{y}, gsl_matrix_float * @var{A})@deftypefunx int gsl_blas_dsyr2 (CBLAS_UPLO_t @var{Uplo}, double @var{alpha}, const gsl_vector * @var{x}, const gsl_vector * @var{y}, gsl_matrix * @var{A})@cindex SYR2, Level-2 BLASThese functions compute the symmetric rank-2 update @math{A = \alpha xy^T + \alpha y x^T + A} of the symmetric matrix @var{A}. Since thematrix @var{A} is symmetric only its upper half or lower half need to bestored. When @var{Uplo} is @code{CblasUpper} then the upper triangleand diagonal of @var{A} are used, and when @var{Uplo} is@code{CblasLower} then the lower triangle and diagonal of @var{A} areused.@end deftypefun@deftypefun int gsl_blas_cher2 (CBLAS_UPLO_t @var{Uplo}, const gsl_complex_float @var{alpha}, const gsl_vector_complex_float * @var{x}, const gsl_vector_complex_float * @var{y}, gsl_matrix_complex_float * @var{A})@deftypefunx int gsl_blas_zher2 (CBLAS_UPLO_t @var{Uplo}, const gsl_complex @var{alpha}, const gsl_vector_complex * @var{x}, const gsl_vector_complex * @var{y}, gsl_matrix_complex * @var{A})@cindex HER2, Level-2 BLASThese functions compute the hermitian rank-2 update @math{A = \alpha xy^H + \alpha^* y x^H A} of the hermitian matrix @var{A}. Since thematrix @var{A} is hermitian only its upper half or lower half need to bestored. When @var{Uplo} is @code{CblasUpper} then the upper triangleand diagonal of @var{A} are used, and when @var{Uplo} is@code{CblasLower} then the lower triangle and diagonal of @var{A} areused. The imaginary elements of the diagonal are automatically set to zero.@end deftypefun@node Level 3 GSL BLAS Interface
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -