public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* modifying matrix allocation functions for use with R
@ 2001-12-19 13:20 Faheem Mitha
  2001-12-19 13:20 ` Timothy H. Keitt
  2001-12-19 13:20 ` Brian Gough
  0 siblings, 2 replies; 8+ messages in thread
From: Faheem Mitha @ 2001-12-19 13:20 UTC (permalink / raw)
  To: gsl-discuss

Dear People,

Here is a relatively esoteric question. Some of you may be familiar with
R (sometimes called GNU S) which does statistical stuff. It is possible to
use C code compiled into a shared library as a backend for R. Now, I was
wanting to use some GSL routines in this code.

In particular, I need to use allocation functions like gsl_matrix_alloc.
Unfortunately, I'm not sure whether standard calloc/malloc that are used
work with R. I'm going to check this, but I think the answer is most
likely no. R uses a routine called R_alloc which takes storage from the R
heap and manages the cleanup itself (so you don't need to use free).

One option I was considering was rewriting gsl_matrix_alloc (leaving out
the error checking) in terms of R_alloc. However, I can't find the code
for FUNCTION(gsl_block, alloc) (I assume this means gsl_block_alloc)
used in the code for gsl_matrix_alloc. gsl_matrix_alloc itself seems to be
in matrix/init_source.c. Can someone point me to the code for
gsl_block_alloc, or suggest any other options?

I'm not subscribed to the list, so I would be obliged if you would cc me.

                            Sincerely, Faheem Mitha.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-12-19 13:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-19 13:20 modifying matrix allocation functions for use with R Faheem Mitha
2001-12-19 13:20 ` Timothy H. Keitt
2001-12-19 13:20 ` Brian Gough
2001-12-19 13:20   ` Faheem Mitha
2001-12-19 13:20     ` Brian Gough
2001-12-19 13:20       ` calculating matrix inverses (was Re: modifying matrix allocationfunctions for use with R) Faheem Mitha
2001-12-19 13:20         ` James Theiler
2001-12-19 13:20           ` Faheem Mitha

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).