Hello,
I have a sample hierarchy of polymorphic classes (A from which B inherits).
One of them (A1, B1) is managed with boost::shared_ptr, the other one
(A2, B2) via std::shared_ptr (I defined the get_pointer template for
std::shared_ptr).
When I call f1(boost::shared_ptr) with an object B1 from
> 128 *byte* alignment? Wow. No, no compiler will support that legally
> as it would crap all over your stack frame. I vaguely remember that
> GCC caps alignment to 40 bytes due to some supported architecture's
> stack frame being incapable of going higher.
> If you're aligning to 128 bytes the
> Aligning to 128 bits is surely __attribute__((__aligned__(16)))?
Oops, I wrote it wrong in the title, it is 128-bytes aligned, double[16] with
natural alignment, i.e. __attribute__((aligned(128))).
Thanks for comments, I will try to put it into the bugtracker.
___
I am exposing a struct which is 128-bit aligned to python; it is always
constructed dynamically in c++ code, hence there is no trouble that the
alignment is correct. I was getting errors on compilation and had to add this
bit to my code:
namespace boost {
namespace align { struct __attribu
> Hmm. You might be able to make this work with another class that holds
> the AlignedType and has an implicit conversion to it:
Nice trick, it surprisingly compiled.
I found meanwhile though that the problem is more general: whenever a new
instance of AlignedType is created from python, it wil
> One could imagine writing a fancy converter that would allow the first
> form by making a temporary std::vector, passing that to the C++
> function, and then copying the elements in the vector back into the
> Python list. But that's potentially a very expensive sequence of
> operations, and
> Will std::shared_ptr just work also?
I asked this question some time ago here:
http://stackoverflow.com/questions/6568952/c0x-stdshared-ptr-vs-boostshared-ptr
To summarize: you need to define free get_pointer functions for T=your
shared_ptr type and it will work. I eventyallu did not go that way
Such is the shortest example I am able to isolate (nothing py++ specific).
Should I report that as bug? Against boost::python?
I hope some expert will be able to comment on that.
$ cat foo.cc
#include
struct Foo{
static int bar;
};
int Foo::bar=3;
BOOST_PYTHON_MODULE(foo){
> Are you using Ubuntu 9.10 (karmic)?
>
> We are trying to fix the very same issue on PySide, and so far the
> problem seems only to happen on Karmic. On Ubuntu 9.04 (jaunty) the
> same binary package works fine.
Hi, yes, I am at ubuntu karmic. (It was me discussing that with you on IRC
a few da