[Numpy-discussion] [RFC] complex functions in npymath
Fri Oct 30 04:57:12 CDT 2009
Pauli Virtanen wrote:
> I can probably take a shot at this.
> Correct me if I'm wrong, but I think the problem is that for
> typedef struct foo foo_t;
> foo_t bar();
You're right, I was thinking about alignment issues myself - that's why
I mentioned npy_complex and double being equivalent, as defining
complex with a struct does not guarantee this.
> different compilers may put the return value of bar() to a different
> place (registers vs. memory). If we put those functions in a library, and
> switch compilers, I think the behavior is undefined as there seems to be
> no standard.
Is this a problem in practice ? If two compilers differ in this,
wouldn't they have incompatible ABI ?
More information about the NumPy-Discussion