Accelerate framework / memory alignment questions
Accelerate framework / memory alignment questions
- Subject: Accelerate framework / memory alignment questions
- From: dct <email@hidden>
- Date: Tue, 01 Feb 2011 12:53:32 -0800
I now understand that, to get accelerated performance, I need to set memory
alignment for vector variables. I have several questions.
a) I see that the syntax for a float variable declaration is:
float vector[10] __attribute__ ((aligned));
and that this results in 16-byte alignment.
Would I set an allocated buffer in similar fashion? i.e.,
vector = calloc( 10, sizeof(float) ) __attribute__ ((aligned));
b) Does a declaration
double vector[10] __attribute__ ((aligned));
also set 16-byte alignment (or is it 32)?
c) Is there an easy way to force alignment on all of the methods and functions
included in a class, or even across a project?
Thanks, Don Thompson _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden