Lines Matching refs:sum
56 register Prng_t* sum;
62 if (sum = newof(0, Prng_t, 1, 0))
64 sum->method = (Method_t*)method;
65 sum->name = name;
75 sum->mpy = strtoul(t, NiL, 0);
77 sum->add = v ? strtoul(v + 1, NiL, 0) : ~sum->add;
79 sum->init = v ? strtoul(v + 1, NiL, 0) : ~sum->init;
83 if (!sum->mpy)
85 sum->mpy = FNV_MULT;
86 if (!sum->init)
87 sum->init = FNV_INIT;
89 return (Sum_t*)sum;
95 Prng_t* sum = (Prng_t*)p;
97 sum->sum = sum->init;
104 Prng_t* sum = (Prng_t*)p;
105 register Prngnum_t c = sum->sum;
110 c = c * sum->mpy + sum->add + *b++;
111 sum->sum = c;