how to detect that the vector extension is available

Ian Lance Taylor iant@google.com
Thu Sep 29 12:54:00 GMT 2011


Vincent Torri <vtorri@univ-evry.fr> writes:

>> I guess it depends on exactly what you want to check.  With current gcc
>> vector_size will work even if the target does not actually support
>> vectors in hardware.  So if you want to check whether you can use
>> vectors in your code this test will suffice.  If you want to check
>> whether you will actually get any hardware speedup, you will need a
>> different check.
>
> That would indeed interest us to know if the vectors are hardware
> accelerated. Do you have an idea of such check ?

Unfortunately I do not know how you can check for that.  There may be a
way but I don't know of one.

Ian



More information about the Gcc-help mailing list