39 for (
int i = 0; i < IP; ++i) {
46 for (
int j = 0; j < IP; ++j) {
49 for (
int i = 0; i < 32; ++i) {
50 iwork = iwork * 2 + IB[JR];
51 IB[JR] = IB[JR] ^ IB[KR];
79 unsigned IWK[2 * IP - 1];
85 for (
int i = 0; i < IP; ++i) {
89 for (
int i = IP; i < 2 * IP - 1; ++i) {
90 IWK[i] = IWK[i - IP] ^ IWK[i - IQ];
93 for (
int i = 0; i < MU; ++i) {
100 if (M <= IP - 1)
goto continued300;
107 for (
int i = 0; i < IP; ++i) {
112 for (
int j = NB; j >= 0; --j) {
113 for (
int i = IP - 1; i >= 0; --i) {
114 C[2 * i + IB[j]] = C[i];
115 C[2 * i + 1 - IB[j]] = 0;
117 for (
int i = 2 * IP - 1; i >= IP; --i) {
118 C[i - IP] = C[i - IP] ^ C[i];
119 C[i - IQ] = C[i - IQ] ^ C[i];
123 for (
int j = 0; j < IP; ++j) {
125 for (
int i = 0; i < IP; ++i) {
126 iwork = iwork ^ (C[i] * IWK[j + i]);
139 std::ofstream outfile;
140 outfile.open(filename.c_str());
147 outfile <<
" " <<
jr <<
" " <<
kr << std::endl;
149 for (
int i = 0; i <
Np; i++) {
150 outfile <<
" " <<
w[i] << std::endl;
164 std::ifstream infile;
165 infile.open(filename.c_str());
174 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