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]

Re: Non square matrix transpose?


Brian Gough wrote:

> As you found,
> there has not been a function to do rectangular transposes.
>
> I have added a function gsl_matrix_transpose_memcpy(dest,src)
> to handle the rectangular case.   It is in CVS now.
>
> It operates out of place.
> (BLAS matrices use a unit stride in one direction,
>  so in general the in-place transpose of a submatrix view
>  cannot itself be represented as a submatrix view).

Ahem!

What's going on here Brian?  Was it just an oversite
to leave gsl_matrix_transpose_memcpy(dest, src)
out of the original API?
Are you sure that there is no other missing functionality?
Or do you mean you to just keep tacking functions onto the library
as people ask for them?

It strikes me as just a bit inefficient to make a copy of a matrix
just so that you can reference the elements in a different order.
And, as I recall, the BLAS library will operate just as happily
on the transpose view of a matrix as upon the matrix itself.

Why couldn't you just add a field of type CBLAS_TRANSPOSE_t
to your matrix struct which tells GSL library functions
whether the data array represents a matrix or it's transpose?
At least, that would have saved application programmers
the trouble of passing an extra argument
of type CBLAS_TRANSPOSE_t to function gsl_blas_dgemm.


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