help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] matrix multiplication


From: Paulo Jabardo
Subject: Re: [Help-gsl] matrix multiplication
Date: Wed, 28 Feb 2007 12:46:20 -0300 (ART)

There are two interfaces to multiply the matrices. The
The one you are attempting to use is the low level
cblas interface. In this case you should use something
like

cblas_dgemm(
        CblasRowMajor,
        CblasNoTrans,
        CblasNoTrans,
        n, l, n, 1.0, A->data, A->tda, B->data,
B->tda, 0.0, AB->data, AB->tda);


This function is defined in gsl_cblas.h.

Since you are using gsl_matrix matrices, gsl has
wrappers that operate on gsl_matrix objetcs (defined
on gsl_blas.h:

gsl_blas_dgemm(
        CblasNoTrans,
        CblasNoTrans,
        1.0, A, B, 0.0, C)

I recommend you use that.


Hope this helps

Paulo

--- Keymone <address@hidden> escreveu:

> hello guys
> 
> help me please to multiplicate 2 matrices :)
> 
> gsl_matrix * A = gsl_matrix_alloc(n, n);
> gsl_matrix * B = gsl_matrix_alloc(n, l);
> gsl_matrix * AB = gsl_matrix_alloc(n, l);
> 
> cblas_dgemm(
>         CblasRowMajor,
>         CblasNoTrans,
>         CblasNoTrans,
>         ?, ?, ?, 1.0, ?, ?, ?, ?, 0, ?, ?);
> 
> it looks like primitive operation but i can't figure
> this out
> i started with GSL only tomorrow so don't kill me :)
> 
> -- 
> Regards, Keymone
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
> 


__________________________________________________
Fale com seus amigos  de graça com o novo Yahoo! Messenger 
http://br.messenger.yahoo.com/ 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]