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

Calculation Error in line 601 #39

Open
jyhsia5174 opened this issue Apr 24, 2020 · 1 comment · May be fixed by #45
Open

Calculation Error in line 601 #39

jyhsia5174 opened this issue Apr 24, 2020 · 1 comment · May be fixed by #45

Comments

@jyhsia5174
Copy link

libmf/mf.cpp

Line 601 in e70b9a3

XMM = _mm_add_ps(XMM, _mm_shuffle_ps(XMMtmp, XMMtmp, 1));

Line 600 and 601 are trying to add 4 floats to a single float. That is, they try to do
XMM[31:0] = XMM[31:0] + XMM[63:32] + XMM[95:64] + XMM[127:96].

Line 600 first add two pairs of floats. It does the following operation:
XMMtmp[63:0] = XMM[63:0] + XMM[127:64].

The current line 601 has the following operation:
XMM[31:0] = XMM[31:0] + XMMtmp[63:32].
But, I think the correct operation should be
XMM[31:0] = XMMtmp[31:0] + XMMtmp[63:32].

Therefore, line 601 should change to
"XMM = _mm_add_ps(XMMtmp, _mm_shuffle_ps(XMMtmp, XMMtmp, 1));".

@ryaninhust
Copy link
Contributor

@JohnCreed can you help create a pull request for this change?

@jyhsia5174 jyhsia5174 linked a pull request Jul 3, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants