Re: [Algorithms] How to get 3dvector largest coordinate index?
Brought to you by:
vexxed72
From: Anoop M. <cod...@gm...> - 2009-03-05 04:11:47
|
It might be worth noting that gcc has a "may_alias" type attribute: http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html Quoting the docs: "Accesses through pointers to types with this attribute are not subject to type-based alias analysis, but are instead assumed to be able to alias any other type of objects. In the context of 6.5/7 an lvalue expression dereferencing such a pointer is treated like having a character type. See -fstrict-aliasing for more information on aliasing issues. This extension exists to support some vector APIs, in which pointers to one vector type are permitted to alias pointers to a different vector type." Mike Acton has written a detailed article on the subject of type aliasing: http://www.cellperformance.com/mike_acton/2006/06/understanding_strict_aliasing.html Cheers, Anoop. On Wed, Mar 4, 2009 at 8:39 PM, Conor Stokes < bor...@ya...> wrote: > Unions are for variants (and trix are for kids!). They can be used to > implement tagged variant types and even full algebraic data types (if you > put a union inside of another construct), as well as the lower level uses > (such as saving storage space, usually through some sort of implicit > tagging). > > Cheers, > Conor > > ------------------------------ > *From:* Jeff Russell <je...@8m...> > *To:* Game Development Algorithms <gda...@li... > > > *Sent:* Thursday, 5 March, 2009 11:33:32 AM > *Subject:* Re: [Algorithms] How to get 3dvector largest coordinate index? > > if cast-through-union violates the standard, then why are unions in the > language? isn't storing bytes and interpreting them as different types what > unions are for? > > ------------------------------ > Stay connected to the people that matter most with a smarter inbox. Take a > look<http://au.rd.yahoo.com/galaxy/mail/tagline2/*http://au.docs.yahoo.com/mail/smarterinbox> > . > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list > |