AVX log intrinsics (_mm256_log_ps) missing in g++-4.8?

前端 未结 2 1448
温柔的废话
温柔的废话 2020-12-17 22:24

I am trying to utilise some AVX intrinsics in my code and have run into a brick wall with the logarithm intrinsics.

Using the Intel Intrinsics Guide v3.0.1 for Linux

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-17 22:49

    As indicated in the comments to your question, that intrinsic doesn't map to an actual AVX instruction; it is an Intel extension to the intrinsic set. The implementation likely uses many underlying instructions, as a logarithm isn't a trivial operation.

    If you'd like to use a non-Intel compiler but want a fast logarithm implementation, you might check out this open-source implementation of sin(), cos(), exp(), and log() functions using AVX. They are based on an earlier SSE2 version of the same functions.

提交回复
热议问题