-malign-double
Barry Smith
bsmith at mcs.anl.gov
Tue Nov 17 13:55:20 CST 2009
Thanks
On Nov 17, 2009, at 1:08 PM, Jed Brown wrote:
> I think this is complete.
>
> http://petsc.cs.iit.edu/petsc/petsc-dev/rev/a36906938641
>
> This was my first time messing with configure. It works in all
> cases I
> have tested, let me know if I screwed up. The default alignment is
> now
> 16, configurable via --with-memalign. Alignment of pointers
> compiles to
> (gcc-4.4.2/x86-64 at all positive optimization levels)
>
> lea r9,[r8+rbx*1+0xf]
> and r9,0xfffffffffffffff0
>
> so there should be no concern over runtime cost of alignment. If the
> user provides their own malloc (via PetscMallocSet) which does not
> provide the desired alignment then the first array will not have that
> alignment (obviously) but every other will. It costs a few extra
> bytes
> per allocation but this should only add up to a few kB in real
> applications.
>
> Jed
>
More information about the petsc-dev
mailing list