66 G4Exception(
"G4UniformRandPool::create_pool_align()",
"InvalidCondition",
81 if(
sizeof(
G4double) * CHAR_BIT == 64)
97 if(
sizeof(
G4double) * CHAR_BIT == 64)
110 if(
sizeof(
G4double) * CHAR_BIT == 64)
132void G4UniformRandPool::Fill(
G4int howmany)
134 assert(howmany > 0 && howmany <= size);
138 G4Random::getTheEngine()->flatArray(howmany, buffer);
144 assert(rnds != 0 && howmany > 0);
153 const G4int maxcycles = howmany / size;
157 const G4int peel = howmany % size;
169 if(maxcycles > 0 && currentIdx > 0)
171 assert(currentIdx <= size);
174 for(; cycle < maxcycles; ++cycle)
180 memcpy(rnds + (cycle * size), buffer,
sizeof(
G4double) * size);
194 if(currentIdx + peel >= size)
196 Fill(currentIdx < size ? currentIdx : size);
198 memcpy(rnds + (cycle * size), buffer + currentIdx,
sizeof(
G4double) * peel);
204 assert(currentIdx <= size);
221 return rndpool->GetOne();
231 rndpool->GetMany(rnds, (
unsigned int) howmany);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)