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

switch to std::simd, expand SIMD & docs #1239

Merged
merged 5 commits into from
Aug 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix doc test
  • Loading branch information
TheIronBorn committed Aug 8, 2022
commit 949d70f6a5bcb74adb28c6d3183c92591122b988
7 changes: 6 additions & 1 deletion src/distributions/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ impl Distribution<bool> for Standard {
///
/// Since most bits are unused you could also generate only as many bits as you need, i.e.:
/// ```
/// let x = u16x8::splat(rng.gen::<u8> as u16);
/// #![feature(portable_simd)]
/// use std::simd::*;
/// use rand::prelude::*;
/// let mut rng = thread_rng();
///
/// let x = u16x8::splat(rng.gen::<u8>() as u16);
/// let mask = u16x8::splat(1) << u16x8::from([0, 1, 2, 3, 4, 5, 6, 7]);
/// let rand_mask = (x & mask).simd_eq(mask);
/// ```
Expand Down