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

fix(simd.h): Make all-architecture matrix44::inverse() #4076

Merged
merged 1 commit into from
Jan 2, 2024

Commits on Dec 16, 2023

  1. fix(simd.h): Make all-architecture matrix44::inverse()

    We had an awkward situation of the simd matrix44::inverse() only being
    defined for Intel SSE, and in all other cases falling back on
    Imath::M44f::inverse. The problem with that is that it made simd.h
    depend either directly on ImathMatrix.h, or assume that it would be
    included prior to inclusion of simd.h. This was not good.
    
    This patch rewrites inverse() to eliminate all of the direct SSE
    intrinsics in terms of other simd wrapper functions, which means that
    they will be defined one way or another on all architectures.
    
    Along the way I added a new vfloat4 shuffle that combines two vectors
    (corresponding to _mm_shuffle_ps in SSE land), and a vfloat4
    constructor from 2 float*', where the first two elements come from the
    first ptr and the second two elements come from the second
    ptr. Ultimately, the final implementation I settled on for the new
    inverse didn't use these (an earlier version did), but I want to keep
    them around anyway in case they are useful in the future. I did add a
    test for them.
    
    Signed-off-by: Larry Gritz <[email protected]>
    lgritz committed Dec 16, 2023
    Configuration menu
    Copy the full SHA
    30eb8cc View commit details
    Browse the repository at this point in the history