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: Fastest way to change sign of the odd elements of vSInt16




You don't actually need the permute unit. This frees it up to handle other things like misalignment:


//set up a constant -- do once
vector signed short mask = vec_mergeh( vec_splat_s16( 0 ), vec_splat_s16(-1) ); // 0X0, 0XFFFF, 0X0, 0XFFFF...



//the two cycle way to do it v = vec_xor( v, mask ); v = vec_subs( v, mask );

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

This email sent to email@hidden
References: 
 >Fastest way to change sign of the odd elements of vSInt16 (From: Rustam Muginov <email@hidden>)
 >Re: Fastest way to change sign of the odd elements of vSInt16 (From: Paul Russell <email@hidden>)
 >Re: Fastest way to change sign of the odd elements of vSInt16 (From: Rustam Muginov <email@hidden>)
 >Re: Fastest way to change sign of the odd elements of vSInt16 (From: Holger Bettag <email@hidden>)
 >Re: Fastest way to change sign of the odd elements of vSInt16 (From: Rustam Muginov <email@hidden>)
 >Re: Fastest way to change sign of the odd elements of vSInt16 (From: Holger Bettag <email@hidden>)
 >Re: Fastest way to change sign of the odd elements of vSInt16 (From: Rustam Muginov <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.