[C++-sig] Exposing 128-bytes aligned datatype
Niall Douglas
s_sourceforge at nedprod.com
Wed Feb 22 00:49:24 CET 2012
On 21 Feb 2012 at 16:46, VáclavSmilauer wrote:
> > 128 *byte* alignment? Wow. No, no compiler will support that legally
> > as it would crap all over your stack frame. I vaguely remember that
> > GCC caps alignment to 40 bytes due to some supported architecture's
> > stack frame being incapable of going higher.
> > If you're aligning to 128 bytes then you almost certainly need to
> > revisit how your code is designed and what algorithms are being used.
>
> I did not design the OpenCL standard (see
> http://www.khronos.org/registry/cl/api/1.2/cl_platform.h at the end, there is
> cl_double16). Just to assure you, those types are never ever passed on stack.
> That header works just fine with gcc.
I agree that GCC/MSVC needs two alignment specifiers, one for static
data alignment and another for everything else.
This would be a good candidate for inclusion into the C programming
language actually. I may propose it to WG14.
Niall
--
Technology & Consulting Services - ned Productions Limited.
http://www.nedproductions.biz/. VAT reg: IE 9708311Q. Company no:
472909.
More information about the Cplusplus-sig
mailing list