[Rd] Initializing a large data structure to be accessed strictly within a shared C library

From: James Muller <james.s.muller_at_gmail.com>
Date: Tue, 27 Dec 2011 17:58:44 -0500

Dear R-devel members,

The question: Is it possible to initialize and later free a large data structure strictly within a shared C library, to be used by a function in the C library that I'll call from R--without ever having to pass data to and from R? This is analogous to C++ object initialization/use/destruction, but if possible I'd like to stay in C.

The context: I'm implementing a particle swarm optimization of a 60-dimension nonlinear transform, where the transform is defined in a half-gigabyte dataset. By carefully initializing a C struct I can trim a large amount of work from the PSO iteration stage. This is, of course, straight forward if I implement the whole thing in a self-contained C program--however, I'd like R to handle the optimization routines, and my shared library to implement the value function.

So: what do folks think?



        [[alternative HTML version deleted]]

R-devel_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 27 Dec 2011 - 23:51:12 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 28 Dec 2011 - 01:40:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive