• 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: Jean-Daniel Dupas <email@hidden>
  • Date: Tue, 1 Feb 2011 22:11:14 +0100

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

  • Follow-Ups:
    • Re: Accelerate framework / memory alignment questions
      • From: dct <email@hidden>
References: 
 >Accelerate framework / memory alignment questions (From: dct <email@hidden>)

  • Prev by Date: Accelerate framework / memory alignment questions
  • Next by Date: Re: Modifying InterfaceBuilder - make “<x> Identity” Palette an ordinary non-floating window?
  • Previous by thread: Accelerate framework / memory alignment questions
  • Next by thread: Re: Accelerate framework / memory alignment questions
  • Index(es):
    • Date
    • Thread