public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gerard Jungman <jungman@lanl.gov>
To: GSL Discuss Mailing List <gsl-discuss@sourceware.org>
Subject: Re: simplicity vs. efficiency of algorithms in GSL
Date: Tue, 14 Oct 2008 21:33:00 -0000	[thread overview]
Message-ID: <1224019738.14338.157.camel@bellerophon.lanl.gov> (raw)
In-Reply-To: <m3fxn4cfws.wl%bjg@network-theory.co.uk>


On Fri, 2008-10-10 at 22:13 +0100, Brian Gough wrote:
> > 
> > It's a draft standard for a C LAPACK interface.
> 
> Interesting, but it's column major only.

Yup.

Here's the way I see it. Anybody who uses lapack already
faces this problem; if you want to use lapack, you have
to get your ducks lined up in columns at the start.
People must already be doing this. So it makes sense to
me that a library (GSL) should encapsulate whatever they
are doing, so they don't have to do it over and over again.

This is the problem that we face. The C/C++ community must
decide for themselves what it means to "use lapack". Does it
mean that column-major is required? If so, how does
one manage both the row-major and column-major data
types? A library should presumably provide both.
What are the relative costs of runtime conversion?
For many uses that could be a viable option, if
people are forced into using both types in code.
People who use only lapack and blas functions
probably don't care and don't need to know how
their data is laid out, and could be given the
column-major type by default.

How should a library support both types? Clearly,
the data layer need not change, only the access
patterns need to be abstracted. Those patterns
can be parametrized in such a way as to make
code generation easy. Personally, I would
prefer C++ templates for this, but we can
use whatever C code-generation kludge people
happen to fancy.

Are these problems best solved as part of a general
"interface to fortran", or are they specific to
matrix operations? Is any of this addressed in
the new fortran standard (fortran-2003 apparently
has specific standardization for inter-language
support, including stuff like passing structs
back and forth, but I don't know the details).
Obviously they can't tell you how to lay out
your data, but any guidance in this area could
be helpful.

Finally, we should contact the people working on
this interface standard. It may be just that one
guy. He might appreciate some discussion.

As people are probably aware, the cblas interface
is data-order agnostic; you can treat any matrix
as row-major or column-major, using a flag. It is
unfortunate that the proposed lapack standard does
not adopt this idea. But we may have to accept the
fact that lapack is essentially legacy code,
and that's just the way it is.

Let's talk to them and find out.

--
G. Jungman


  reply	other threads:[~2008-10-14 21:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200809221621.54890.emanuele.passera@treuropa.com>
     [not found] ` <20080922162507.GA29877@hippogriff.homeunix.org>
2008-09-22 18:32   ` Tuomo Keskitalo
2008-09-22 19:48     ` Patrick Alken
2008-09-22 21:01       ` Robert G. Brown
2008-09-23 21:52         ` Gerard Jungman
2008-09-24 21:19           ` Brian Gough
2008-09-25  0:07             ` Gerard Jungman
2008-09-25  3:07               ` Andrew W. Steiner
2008-09-25  3:50               ` Z F
2008-09-26 21:48               ` Brian Gough
2008-09-27  6:12                 ` Jochen Küpper
2008-09-29 13:35                   ` Brian Gough
2008-10-07 21:14                   ` Gerard Jungman
2008-10-09 18:38                     ` Tuomo Keskitalo
2008-10-09 18:57                       ` Frank Reininghaus
2008-10-09 21:17                         ` Gerard Jungman
2008-10-10  0:05                       ` Gerard Jungman
2008-10-10 15:50                         ` Robert G. Brown
2008-10-10 18:47                           ` James Amundson
2008-10-11  2:48                         ` Brian Gough
2008-10-14 21:33                           ` Gerard Jungman [this message]
2008-10-14 22:41                             ` Daniel Franke
2008-10-16 22:20                               ` Gerard Jungman
2008-10-17 13:27                             ` Brian Gough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1224019738.14338.157.camel@bellerophon.lanl.gov \
    --to=jungman@lanl.gov \
    --cc=gsl-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).