Skip to content

Switch to packed_simd #21

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 2 commits into from
Aug 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ license = "MIT"
[dependencies]
rand = "0.5"
rand_core = "0.2"
packed_simd = "0.1"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ sfmt
[![docs.rs](https://docs.rs/sfmt/badge.svg)](https://docs.rs/sfmt)
[![Build Status](https://travis-ci.org/termoshtt/rust-sfmt.svg?branch=master)](https://travis-ci.org/termoshtt/rust-sfmt)

Rust implementation of [SIMD-oriented Fast Mersenne Twister (SFMT)] using [stable SIMD]
Rust implementation of [SIMD-oriented Fast Mersenne Twister (SFMT)]

[SIMD-oriented Fast Mersenne Twister (SFMT)]: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/
[stable SIMD]: https://github.com/rust-lang/rfcs/blob/master/text/2325-stable-simd.md

Be sure that this crate works only on nightly due to [packed_simd](https://github.com/rust-lang-nursery/packed_simd).

License
--------
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@
//! println!("random u32 number = {}", r);
//! ```

#![feature(stdsimd)]

extern crate packed_simd;
extern crate rand;
extern crate rand_core;

mod sfmt;
mod thread_rng;

use packed_simd::*;
use rand_core::{impls, Error, RngCore, SeedableRng};
use std::simd::*;

pub use thread_rng::{thread_rng, ThreadRng};

Expand Down
2 changes: 1 addition & 1 deletion src/sfmt.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Rust re-implementation of SFMT

use std::simd::{i32x4, u32x4};
use packed_simd::{i32x4, u32x4};

use super::SFMT;

Expand Down