Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIIO::bitcast adjustments #4101

Merged
merged 2 commits into from
Jan 5, 2024
Merged

Commits on Jan 3, 2024

  1. OIIO::bitcast adjustments

    Use gcc __builtin_bit_cast when available.
    
    Get rid of specializations -- they are not needed, as verified by
    godbolt.
    
    Signed-off-by: Larry Gritz <[email protected]>
    lgritz committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    c8590f1 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Revision, after realizing that the memcpy trick + icc will fail to

    vectorize loops containing it:
    
    * Restore the intrinsics, just for icc, just for the float<->int/uint
      varietes (still axe the ones involving doubles).
    
    * Remove the __builtin_bitcast clauses, it seems to provide no benefit
      for the compilers that support it (icc doesn't, and that's the one
      that seems to need the exra hints).
    
    * Add comments explaining why this is all the case and also reminding
      us NOT to switch to C++20 std::bit_cast in the future without also
      testing whether using it prevents auto-vectorization.
    
    Signed-off-by: Larry Gritz <[email protected]>
    lgritz committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    e5fa2e1 View commit details
    Browse the repository at this point in the history