Skip to content

Fix SIMD Fallback Import #232

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

Merged
merged 4 commits into from
May 18, 2016

Conversation

killercup
Copy link
Member

@killercup killercup commented May 15, 2016

Fixes cargo doc and some other stuff.

r? @BurntSushi

@killercup
Copy link
Member Author

I also added some details to the references since I was looking through the papers anyway. (It follows the APA style used by Google Scholar.)

@killercup killercup force-pushed the fix/simd-fallback branch 3 times, most recently from 762d335 to a1cda64 Compare May 15, 2016 13:36
@killercup killercup force-pushed the fix/simd-fallback branch from b9affae to fe9529e Compare May 16, 2016 10:29
@@ -15,8 +15,13 @@ use memchr::{memchr, memchr2, memchr3};
use syntax;

use freqs::BYTE_FREQUENCIES;

#[cfg(feature = "simd-accel")]
Copy link
Member

Choose a reason for hiding this comment

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

I think you don't actually need this cfg switch, right? The cfg switch is done in lib.rs so that simd_fallback should never actually be explicitly used.

Copy link
Member Author

Choose a reason for hiding this comment

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

You still import it as simd_fallback, though. Might be a good idea to provide a shim module in lib.rs depending on the feature flag (the shim in simd_accel only deals with the target arch feature).

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see. I thought I was using path, but maybe it was somewhere else. Maybe this should be in lib.rs?

#[cfg(not(feature = "simd-accel"))]
#[path = "simd_fallback/mod.rs"]
mod simd_accel;

I think that would work? Or something equivalent would be fine. I was just trying to stop the use of cfg switching everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that should work. Defining the shim in lib.rs is far better than using cfg here. I'll change this.

@killercup
Copy link
Member Author

Rebased.

@BurntSushi BurntSushi force-pushed the simd-teddy branch 7 times, most recently from 6f2bb0f to 203c509 Compare May 18, 2016 14:48
Add SIMD accelerated multiple pattern search.
@BurntSushi
Copy link
Member

@killercup Could you rebase this against master? Sorry for the churn. Thanks!

@killercup killercup force-pushed the fix/simd-fallback branch from 3ee97ee to 71cd186 Compare May 18, 2016 18:40
@killercup
Copy link
Member Author

@BurntSushi no problem! Rebased on master.

@BurntSushi BurntSushi merged commit 6235109 into rust-lang:simd-teddy May 18, 2016
@BurntSushi
Copy link
Member

Awesome, thanks so much! :D

@BurntSushi
Copy link
Member

@killercup Hmm, it looks like this got merged into the simd-teddy branch. Whoops. Could you resubmit against master please?

@killercup
Copy link
Member Author

Oh, Github didn't change the target branch :( just one second!
Andrew Gallant [email protected] schrieb am Do., 19. Mai 2016 um
01:39:

@killercup https://github.com/killercup Hmm, it looks like this got
merged into the simd-teddy branch. Whoops. Could you resubmit against
master please?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#232 (comment)

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.

2 participants