This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
GSL and CLAPACK together
- From: Andrew Fredricks <fredra at comcast dot net>
- To: gsl-discuss at sources dot redhat dot com
- Date: 19 Nov 2003 09:50:52 -0500
- Subject: GSL and CLAPACK together
Hello,
I have recently been using GSL and CLAPACK together on a project and
was happy to see they work easily. But it was not obvious that they
would. I suggest that there be a place in documentation that list hints
or trick to doing things like that.
I have included examples of using the two libraries together for other
people searching for the same information.
/* solve Ax=b for x
x is put in to b
transpose is need to work with CLAPACK*/
gsl_matrix_transpose(A);
dgesv_(&SL, &nrhs, gsl_matrix_ptr(A,0,0), &SL, ipiv,
gsl_vector_ptr(b,0), &SL, &info);
/* solve Ax=b for x
x is put in to b
transpose is need to work with CLAPACK*/
gsl_matrix_complex_transpose(A);
zgesv_(&SL, &nrhs, gsl_matrix_complex_ptr(A,0,0), &SL, ipiv,
gsl_vector_complex_ptr(b,0), &SL, &info);
Andrew Fredricks