Boost logo

Boost Users :

Subject: Re: [Boost-users] [traits] missing types aligned at 64 and 128 bytes
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-02-08 04:28:41


> The header /boost/type_traits/type_with_alignment.hpp specializes the
> template type_with_alignment only for 1, 2, 4, 8, 10, 16, 32 bytes. Unless
> there is a reason to not do so, I would like to ask for extension of the
> alignment to 64 and 128 bytes as well. (In my case, I need it for the
> cl_double16 vector type in OpenCL)
>
> As workaround, I am currently using doing the specialization in my code:
>> namespace boost {
>> namespace align { struct __attribute__((__aligned__(128))) a128 {};}
>> template<> class type_with_alignment<128> { public: typedef
>> align::a128 type; };
>> };

Nod, that's come up before, I believe it should be fixed in Trunk (and the
next release).

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net