76 G4int errcode = posix_memalign( (
void**) &buffer ,
81 G4Exception(
"G4UniformRandPool::create_pool_align()",
83 "Cannot allocate aligned buffer");
106 if (
sizeof(
G4double)*CHAR_BIT==64 )
118 : size(siz),
buffer(0), currentIdx(0)
120 if (
sizeof(
G4double)*CHAR_BIT==64 )
134 if (
sizeof(
G4double)*CHAR_BIT==64 )
146 if ( newSize != size )
158 assert(rnds!=0 && howmany>0);
167 const G4int maxcycles = howmany/size;
171 const G4int peel = howmany%size;
183 if ( maxcycles>0 && currentIdx>0 )
185 assert(currentIdx<=size);
188 for ( ; cycle < maxcycles ; ++cycle )
195 memcpy(rnds+(cycle*size),buffer,
sizeof(
G4double)*size );
208 if (currentIdx + peel >= size)
210 Fill(currentIdx<size?currentIdx:size);
212 memcpy(rnds+(cycle*size) , buffer+currentIdx ,
sizeof(
G4double)*peel );
218 assert(currentIdx<=size);
238 return rndpool->GetOne();
248 rndpool->GetMany(rnds,(
unsigned int)howmany);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static constexpr double ps