This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gsl_blas_zgemv bug


John Ketchum writes:
 > gsl_blas_zgemv does not handle the case when the matrix transpose type is 
 > specified to be 'CblasConjTrans', so when the TRANSA a parameter is set to 
 > this value, the program aborts with an "invalid length" error instead of 
 > doing the requested matrix-vector multiply.

Hi,
Thanks for the bug report.
The patch below should fix the problem
regards
Brian Gough


Index: blas.c
===================================================================
RCS file: /cvs/gsl/gsl/blas/blas.c,v
retrieving revision 1.26
diff -c -r1.26 blas.c
*** blas.c	2001/11/19 22:32:02	1.26
--- blas.c	2002/03/18 19:41:28
***************
*** 648,654 ****
    const size_t N = A->size2;
  
    if ((TransA == CblasNoTrans && N == X->size && M == Y->size)
!       || (TransA == CblasTrans && M == X->size && N == Y->size))
      {
        cblas_cgemv (CblasRowMajor, TransA, INT (M), INT (N),
  		   GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), X->data,
--- 648,655 ----
    const size_t N = A->size2;
  
    if ((TransA == CblasNoTrans && N == X->size && M == Y->size)
!       || (TransA == CblasTrans && M == X->size && N == Y->size)
!       || (TransA == CblasConjTrans && M == X->size && N == Y->size))
      {
        cblas_cgemv (CblasRowMajor, TransA, INT (M), INT (N),
  		   GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), X->data,
***************
*** 672,678 ****
    const size_t N = A->size2;
  
    if ((TransA == CblasNoTrans && N == X->size && M == Y->size)
!       || (TransA == CblasTrans && M == X->size && N == Y->size))
      {
        cblas_zgemv (CblasRowMajor, TransA, INT (M), INT (N),
  		   GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), X->data,
--- 673,680 ----
    const size_t N = A->size2;
  
    if ((TransA == CblasNoTrans && N == X->size && M == Y->size)
!       || (TransA == CblasTrans && M == X->size && N == Y->size)
!       || (TransA == CblasConjTrans && M == X->size && N == Y->size))
      {
        cblas_zgemv (CblasRowMajor, TransA, INT (M), INT (N),
  		   GSL_COMPLEX_P (&alpha), A->data, INT (A->tda), X->data,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]