| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
-Eric
On Jul 27, 2006, at 11:38 AM, Jeremy Sagan wrote:
Hello Eric,
Thanks for the quick response. I am aware of how to swap using standard methods and I understand that this is not a compute intensive operation. On the other hand what I want to know is how to do this using SSE as a small example like this will likely bootstrap me into writing the code that I need to, that simply begins with an endian swap and then does much more, like convert to float, vector multiplication and addition, etc, etc, I have looked at using the Accelerate framework but I do not see that as a good fit.
Also I am looking for a reference to the C interface to SSE. Are the only references the Intel Pentium manuals?
Jeremy
On Jul 27, 2006, at 2:24 PM, Eric Albert wrote:
On Jul 27, 2006, at 11:15 AM, Jeremy Sagan wrote:
Does anyone have any example code for endian byte swapping an aligned array of SInt16's using SSE on intel Macs?
I think is should be the equivalent of a sequence of loads, permutes, and stores but I am not sure where to find the C interface documentation for SSE and I am very interested to see sample code like this.
Unless your array is huge, you'll usually get reasonable performance from a simple for loop:
#include <libkern/OSByteOrder.h>
for(int i = 0; i < length; i++) { array[i] = OSSwapInt16(array[i]); }
That's the main reason why we haven't added bulk byte swappers to the system yet. We've found that byte swapping rarely shows up as a performance bottleneck for us.
If it is a performance bottleneck for you, you might want to ask about this on the perfoptimization-dev mailing list.
-Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/eric% 40outofcheese.org
This email sent to email@hidden
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden
| References: | |
| >Array Byte swapping with SSE (From: Jeremy Sagan <email@hidden>) | |
| >Re: Array Byte swapping with SSE (From: Eric Albert <email@hidden>) | |
| >Re: Array Byte swapping with SSE (From: Jeremy Sagan <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.