cpu dispatcher for visual studio for AVX and SSE

前端 未结 3 1687
庸人自扰
庸人自扰 2020-11-30 07:56

I work with two computers. One without AVX support and one with AVX. It would be convenient to have my code find the instruction set supported by my CPU at run-time and ch

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 08:37

    The fact that the link order matters makes me think that there might be some kind of initialization code in the obj file. If the initialization code is communal, then only the first one is taken. I can't reproduce it, but you should be able to see it in an assembly listing (compile with /c /Ftestavx.asm)

提交回复
热议问题