Use AVX/AVX512 selectively

Florian Weimer fw@deneb.enyo.de
Thu Mar 3 14:46:00 GMT 2016


* Alexander Monakov:

> On Thu, 3 Mar 2016, Florian Weimer wrote:
>> Both hardware with amd without avx512f capability.  There is run-time
>> detection for it, but for it to be effective, most of the program has
>> to be compiled without -mavx512f, otherwise the program will use
>> avx512f instructions before getting to the detection code.
>
> I think separate compilation is the proper tool for this.  Your initial
> message seems to imply you seek another method; why?

Mere convenience.  I wouldn't have to split the test file into two
source files.



More information about the Gcc-help mailing list