What's the proper way to use different versions of SSE intrinsics in GCC?

后端 未结 4 1385
旧巷少年郎
旧巷少年郎 2020-12-29 09:12

I will ask my question by giving an example. Now I have a function called do_something().

It has three versions: do_something(), do_s

4条回答
  •  鱼传尺愫
    2020-12-29 09:32

    I think that the Mystical's tip is fine, but if you really want to do it in the one file, you can use proper pragmas, for instance:

    #pragma GCC target("sse4.1")
    

    GCC 4.4 is needed, AFAIR.

提交回复
热议问题