size value of vector_size attribute

Xi Ruoyao xry111@mengyan1223.wang
Mon Dec 16 06:14:00 GMT 2019


Hi,

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.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University



More information about the Gcc-help mailing list