Re: Multi Channel FFT Audio Anaylzer + Question
Re: Multi Channel FFT Audio Anaylzer + Question
- Subject: Re: Multi Channel FFT Audio Anaylzer + Question
- From: Stephen Davis <email@hidden>
- Date: Wed, 27 Jun 2007 10:10:45 -0700
On Jun 26, 2007, at 3:38 PM, Benjamin Federer wrote: Hi Ian, first of all I'd like to say thank you for all the information you provided. I am sorry if this is getting off topic in the meantime. Maybe someone could point me to a more appropriate mailing list that discusses the Accelerate framework and/or especially the vDSP library. One thing I am unsure of is about the vector alignment: The most common reason to fall into scalar code is that your data is not aligned properly. Check that first. Different parts of Accelerate.framework require different levels of alignment. The vDSP library shows some sample code that uses the "vec_malloc" statement. Unfortunately I could not get Xcode to like it. Instead I had to use "malloc". Frank Schoep's homepage states the use of a "__attribute__ ((aligned))" postfix for GCC. I could not manage to find any specific information about vector alignment in the vDSP documentation. Any clues? malloc() on Mac OS X is guaranteed to return vector-aligned memory so all memory allocations are ready to go for vector processing.
For variables or structure members or what-have-you, you want to postfix the declaration with "__attribute__((aligned(16)))" to tell the compiler to align them for you. You can of course use higher alignments in particular cases if it helps you: Intel recommends 32-byte alignment and G5 cache lines are 128-byte aligned so experiment!
hth, stephen |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden