From: John D Lamb <J.D.Lamb@johndlamb.net>
To: gsl-discuss@sourceware.org
Subject: Re: GSL containers: was Re: [Help-gsl] Linear least squares, webpages and the next release
Date: Sat, 07 Nov 2015 14:09:00 -0000 [thread overview]
Message-ID: <563E0604.6080802@johndlamb.net> (raw)
In-Reply-To: <563ADDF5.1020206@colorado.edu>
On 05/11/15 04:41, Patrick Alken wrote:
> I agree that stuff is very confusing. I also wonder how much of it is
> needed. In my work I've only ever used the double and complex versions
> of gsl_vector/gsl_matrix. Most of the routines in GSL only work with
> double vectors, with a few extended to complex double (linalg,eigen for
> example).
>
> Do we really need gsl_vector's for int/short/uint/long/etc?
I have used gsl_vector_long on occasion.
> On 11/04/2015 06:43 PM, Gerard Jungman wrote:
>> On 11/04/2015 04:16 PM, Patrick Alken wrote:
>>> I think this is a good idea. Would you be able/willing to design a
>>> new gsl_vector_view structure? Even something very preliminary which
>>> we could iterate a bit to get it to a nice mature status. I, or
>>> someone else, could then run with it and begin the tedious work of
>>> converting all the existing interfaces.
>>>
>>> Patrick
>>
>> If anybody can think of a better way to do the generalizations,
>> besides the current preprocessor implementation, that would be
>> great. I have nothing against the preprocessor, but the current
>> framework makes it nearly impossible to actually read the code.
Ruby? Python? In the absence of C++ templates I usually use one or
other. Python is likely more readable to C programmers.
>> The current impl is like traits classes, but where the traits
>> are all defined in a very rudimentary way in "templates_on.h".
>> It is impossible to tell what traits are available, which ones
>> are required, and how the separate traits are associated with
>> the basic types at the point where the macros are invoked.
Iâm happy to help if someone can suggest a basic workable design. I can
certainly change the alloc functions to use a pool allocator internally.
And, since I mostly use C++, I can see the logic of initialising vector
structs. But I canât think of a good design that wonât break a lot of
user code. One of the features of the GSL is that you canât alloc a
vector of size 0 without writing a custom allocator. It would be easy to
change gsl_vector_alloc. But I canât even think how to do that and
guarantee not to break user code.
--
John D Lamb
prev parent reply other threads:[~2015-11-07 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <56293649.8010009@colorado.edu>
[not found] ` <562BA530.7090508@johndlamb.net>
[not found] ` <562E432D.9050002@colorado.edu>
2015-11-01 21:00 ` John D Lamb
2015-11-03 20:56 ` Gerard Jungman
2015-11-04 20:35 ` Patrick Alken
2015-11-04 23:06 ` Gerard Jungman
2015-11-04 23:16 ` Patrick Alken
[not found] ` <563AB455.1020706@lanl.gov>
2015-11-05 4:41 ` Patrick Alken
2015-11-07 14:09 ` John D Lamb [this message]
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=563E0604.6080802@johndlamb.net \
--to=j.d.lamb@johndlamb.net \
--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).