Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.9k
Fix 1.9 alignment#5478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Fix 1.9 alignment#5478
Uh oh!
There was an error while loading.Please reload this page.
Conversation
If itemsize is a power of two use that as the required alignment up tothe maximum provided by the platform. Power of two sizes may be accessedvia larger moves than bytes.Non-power of two sizes are accessed bytewise and can thus always beconsidered aligned.Closesnumpygh-5293
malloc only provides 8byte alignment and is sufficient to load complexon x86 platforms.This fixes the f2py alignment failures with complex types on win32 or onlinux32 with -malign-double
charris commentedJan 22, 2015
@juliantaylor Could you check this? |
charris commentedJan 22, 2015
OK remove 'fixup'. |
juliantaylor commentedJan 22, 2015
looks ok, I'll probably backport some more minor stuff this weekend and then we can do a 1.9.2 |
juliantaylor commentedJan 22, 2015
note I don't know when I'll finish the other fix, I tend to look at the duplication in raw_assign* get anoyed and stop, and I'm also to lazy to actually try to homogenize it ;) |
Fix too large alignment of complex types
Backport of#5316 with potential modification suggested by Julian. After review, extra commit willl be squashed.