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

Add SSE2 trivial aliases and conversions. #165

Merged
merged 1 commit into from
Nov 2, 2017

Conversation

MaloJaffre
Copy link
Contributor

_mm_cvtsd_f64, _mm_cvtsd_si64x and _mm_cvttsd_si64x.
See #40.

#[inline(always)]
#[target_feature = "+sse2"]
#[cfg_attr(test, assert_instr(cvttsd2si))]
pub unsafe fn _mm_cvttsd_si64x(a: f64x2) -> i64 { _mm_cvttsd_si64(a) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for this please? I know it's an alias, but we should try to cover the full public API.

#[inline(always)]
#[target_feature = "+sse2"]
#[cfg_attr(test, assert_instr(cvtsd2si))]
pub unsafe fn _mm_cvtsd_si64x(a: f64x2) -> i64 { _mm_cvtsd_si64(a) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for this please? I know it's an alias, but we should try to cover the full public API.

`_mm_cvtsd_f64`, `_mm_cvtsd_si64x` and `_mm_cvttsd_si64x`.
See rust-lang#40.
@MaloJaffre
Copy link
Contributor Author

Thanks for your review!
I've split the tests between the aliases, to avoid repetition, and squashed my fixup commit.

Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Note, I think repetition is fine, but I'm OK with this too!

@alexcrichton alexcrichton merged commit 4c244fb into rust-lang:master Nov 2, 2017
@alexcrichton
Copy link
Member

👍

@MaloJaffre MaloJaffre deleted the sse2 branch November 2, 2017 22:14
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 this pull request may close these issues.

3 participants