Re: Fastest way to change sign of the odd elements of vSInt16
- Subject: Re: Fastest way to change sign of the odd elements of vSInt16
- From: Ian Ollmann <email@hidden>
- Date: Sun, 27 Nov 2005 21:04:23 -0800
- Delivered-to: email@hidden
- Delivered-to: email@hidden
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
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.