Scripting C++ -- 2 -- a more concrete example.

rasmussn at lanl.gov rasmussn at lanl.gov
Tue Mar 12 13:53:32 EST 2002


On Friday, March 1, 2002, at 10:25 AM, Craig Maloney wrote:

> Donovan Rebbechi <elflord at panix.com> wrote in message 
> news:<slrna7tidr.8aq.elflord at panix2.panix.com>...
>> In article <3C7E6642.2030202 at physics.ucsb.edu>, Craig Maloney wrote:
>>> If using a wrapper generator (e.g. SILOON) I don't see a way around the
>>> marshalling of the call to get at the atom data structure.
>>
>> I don't really understand exactly what the problem is.
>>>
>>> Of course, this would be taken care of by a revamp of the design of the
>>> class library... maybe making the crystal an atom factory that produces
>>> new atoms in its own address space.  But I would like to avoid thinking
>>
>> Now I'm really confused. If you're not using CORBA, the atoms are in the
>> same address space, aren't they ?
>
> This is how I presumed that Boost also worked -- I must be mistaken.
> After having seen yours and Ralf's comments, I now have the impression
> that Boost works it's magic differently.
>
> Perhaps Craig Rasmussen could enlighten us as to how SILOON deals with
> co-location issues such as the one above?

I was at a conference on software testing last week and so I'm late 
responding.

If I understand the issue correctly, the question is "can I access a C 
struct
or class directly in Python within providing accessor methods"

With Siloon you can't, as the design philosophy was to keep all data on the
server/compute engine unless explicitly provided through some interface.  
This was done
because in high performance computing, our data structures (e.g., arrays) 
can be really
really big and would swamp Python.

But a python extension (wrapper) could be generated which would copy
data directly from a C struct into a Python class.  This would involve
a series of function calls (via Py_BuildValue, for example) to copy
the data to Python land, which I view as a form of marshaling.  So I don't 
see
any way to use C++ data in Python without function calls and data 
marshaling.

Regards,
Craig





More information about the Python-list mailing list