Menu

Usage of Instruction Set

Royi
2018-02-19
2018-02-19
  • Royi

    Royi - 2018-02-19

    Hello,
    I was wondering, how does Sleef decides which Instruction Set to use?
    For instance, if I call it on __m256 will AVX be automatically used?
    If yet, will it use AVX or AVX2?

    Namely, just more information.

    I for once would be happy for a mode where __m128 goes to SSE4 Code Path and __m256 goes to AVX2 code path. Could that be configureable?

     
  • Naoki Shibata

    Naoki Shibata - 2018-02-19

    Hello,

    SLEEF has a dispatcher that automatically detects available vector extensions and chooses the best one.
    You can just call Sleef_sind2_u10, for example, and it automatically use AVX2 if available.

     
  • Royi

    Royi - 2018-02-19

    Is it on Run Time or decided at Compile Time?

    Thank You.

     

    Last edit: Royi 2018-02-19
  • Naoki Shibata

    Naoki Shibata - 2018-02-19

    It is decided when it is run.

    Please see :
    http://sleef.org/additional.xhtml#dispatcher

     

    Last edit: Naoki Shibata 2018-02-19

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.