17 #ifdef USE_FACTORY_AUTOREGISTER
19 bool init = RandomNumbers_Mseries::register_factory();
47 for (
int i = 0; i < IP; ++i) {
54 for (
int j = 0; j < IP; ++j) {
57 for (
int i = 0; i < 32; ++i) {
58 iwork = iwork * 2 + IB[JR];
59 IB[JR] = IB[JR] ^ IB[KR];
87 unsigned IWK[2 * IP - 1];
93 for (
int i = 0; i < IP; ++i) {
97 for (
int i = IP; i < 2 * IP - 1; ++i) {
98 IWK[i] = IWK[i - IP] ^ IWK[i - IQ];
101 for (
int i = 0; i < MU; ++i) {
108 if (M <= IP - 1)
goto continued300;
115 for (
int i = 0; i < IP; ++i) {
120 for (
int j = NB; j >= 0; --j) {
121 for (
int i = IP - 1; i >= 0; --i) {
122 C[2 * i + IB[j]] = C[i];
123 C[2 * i + 1 - IB[j]] = 0;
125 for (
int i = 2 * IP - 1; i >= IP; --i) {
126 C[i - IP] = C[i - IP] ^ C[i];
127 C[i - IQ] = C[i - IQ] ^ C[i];
131 for (
int j = 0; j < IP; ++j) {
133 for (
int i = 0; i < IP; ++i) {
134 iwork = iwork ^ (C[i] * IWK[j + i]);
147 std::ofstream outfile;
148 outfile.open(filename.c_str());
155 outfile <<
" " <<
jr <<
" " <<
kr << std::endl;
157 for (
int i = 0; i <
Np; i++) {
158 outfile <<
" " <<
w[i] << std::endl;
172 std::ifstream infile;
173 infile.open(filename.c_str());
182 for (
int i = 0; i <
Np; i++) {
void read_file(const std::string &)
save and load random number status.
void general(const char *format,...)
void delay3(const int ndelay)
Bridge::VerboseLevel m_vl
void initset(const int ndelay)
void reset(unsigned long seed)
reset state with new seed.
void write_file(const std::string &)
void crucial(const char *format,...)
static const double Fnorm
initialized in .cpp file.
static int broadcast(int count, double *data, int sender)
broadcast array of double from sender.
static bool is_primary()
check if the present node is primary in small communicator.
static const std::string class_name