how to detect that the vector extension is available

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

 




Hi

I want to write an autoconf test to see if the vector extension is available or not.

if I have

typedef int v4si __attribute__ ((vector_size (16)));

I can check the size of v4si.

I'm wondering if it's sufficient. Indeed, with my gcc 4.4.5, the size of v4si is 16 bytes, but the code in the doc [1]:

v4si a, b;
a=b+1;

fails with error "can't convert between vector values of different size". With gcc 4.7, it works.

So :

1) from which version of gcc is the addition with a scalar possible (just for my curiosity)

2) is checking the size sufficient to be sure that the extension is available ?

3) is there better code for such check ?

thank you

Vincent Torri

[1] http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html




[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