hyper_thread_random/lib.rs
1// This file is part of hyper-thread-random. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/hyper-thread-random/master/COPYRIGHT. No part of hyper-thread-random, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2018 The developers of hyper-thread-random. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/hyper-thread-random/master/COPYRIGHT.
3
4
5#![deny(missing_docs)]
6
7
8//! #hyper-thread-random
9//! Provides hyper-thread local random number generators optimized for recent Intel x86-64 chips with the `RDRAND` instruction; falls back to rand crate for others.
10
11
12#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "rdrnd")))] extern crate rand;
13
14
15#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "rdrand")))] use ::rand::Rng;
16#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "rdrand")))] use ::rand::thread_rng;
17
18
19include!("generate.rs");
20include!("generate_hyper_thread_safe_random_u16.rs");
21include!("generate_hyper_thread_safe_random_u32.rs");
22include!("generate_hyper_thread_safe_random_u64.rs");
23include!("generate_hyper_thread_safe_random_usize.rs");