Re: size value of vector_size attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Dec 2019, Xi Ruoyao wrote:

Is there any reason to enforce "x must be a power of 2" in
__attribute__((vector_size(x)))?

I want to use this attribute in my source code to simplify coding
(instead of utilizing SIMD instructions, normally).  Someone may argue
that I should use std::valarray but it is stupidly slow.  Now with this
restriction on size value I may have to write something like
std::valarray but w/o dynamic allocation.

See PR53024. One main reason is that supporting it would be some work, for not enough demand. Also, it can be done in user code, compiler support is not necessary (it would be convenient though). Even lowering an unsupported power of 2 to a set of smaller vectors still generates pretty bad code IIRC.

By the way, for 3 double on x86, would you prefer __m128d+double, or __m256d with one slot ignored?

--
Marc Glisse



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux