6 #ifndef OPENMPCD_CUDA_RANDOM_GENERATORS_LINEARCONGRUENT_HPP
7 #define OPENMPCD_CUDA_RANDOM_GENERATORS_LINEARCONGRUENT_HPP
14 #include <boost/static_assert.hpp>
15 #include <boost/type_traits/is_integral.hpp>
69 BOOST_STATIC_ASSERT(boost::is_integral<T>::value);
70 BOOST_STATIC_ASSERT(0 < modulus);
71 BOOST_STATIC_ASSERT(0 < multiplier);
72 BOOST_STATIC_ASSERT(0 <= increment);
73 BOOST_STATIC_ASSERT(multiplier < modulus);
74 BOOST_STATIC_ASSERT(increment < modulus);
89 current = (multiplier * current + increment) % modulus;
103 #endif //OPENMPCD_CUDA_RANDOM_GENERATORS_LINEARCONGRUENT_HPP