• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accelerate framework / memory alignment questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accelerate framework / memory alignment questions


  • Subject: Re: Accelerate framework / memory alignment questions
  • From: dct <email@hidden>
  • Date: Tue, 01 Feb 2011 13:32:19 -0800

Jean-Daniel

Thank you for the quick reply.

So, as I understand things, I only need to force the alignment of array variables.  And, given that I have only a few of those involved with accelerated functions, I don't need to worry about forcing things across the entire project.

Don


On Feb 1, 2011, at 1:11 PM, Jean-Daniel Dupas wrote:

>
> Le 1 févr. 2011 à 21:53, dct a écrit :
>
>> 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));
>
> man calloc
>
> “The malloc(), calloc(), valloc(), realloc(), and reallocf() functions allocate memory.  The allocated memory is aligned such that it can be used for any data
>     type, including AltiVec- and SSE-related types.  The free() function frees allocations that were created via the preceding allocation functions.”
>
> -- Jean-Daniel
>
>
>
>

 _______________________________________________
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

References: 
 >Accelerate framework / memory alignment questions (From: dct <email@hidden>)
 >Re: Accelerate framework / memory alignment questions (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Modifying InterfaceBuilder - make “<x> Identity” Palette an ordinary non-floating window?
  • Next by Date: Build settings not exported to environment for run script build phase
  • Previous by thread: Re: Accelerate framework / memory alignment questions
  • Next by thread: Build settings not exported to environment for run script build phase
  • Index(es):
    • Date
    • Thread