Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Structs versus Vectors




On 2008/05/12, at 16:47, Jean-Francois Roy wrote:

One may force the structure to be packed by using #pragma pack or the pack attribute. See http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html for details. Of course, one may pay a performance penalty by doing so, or outright crash (Altivec / SSE have a strong 16 bytes alignment requirement, for example).


I only warned that it might not work in standard C, of course, it works most of the time, and compilers often have means to make it work. It's only to make people aware it might crash/don't work one day, on a system with different packing.

--
kuon

http://kuon.goyman.com
http://goyman.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >Structs versus Vectors (From: Richard Somers <email@hidden>)
 >Re: Structs versus Vectors (From: "Wesley Smith" <email@hidden>)
 >Re: Structs versus Vectors (From: Richard Somers <email@hidden>)
 >Re: Structs versus Vectors (From: "Nicolas Goy, Kuon" <email@hidden>)
 >Re: Structs versus Vectors (From: Jean-Francois Roy <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.