MCPcopy Create free account
hub / github.com/F-Stack/f-stack / DiB_fillNoise

Function DiB_fillNoise

freebsd/contrib/zstd/programs/dibio.c:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199static void DiB_fillNoise(void* buffer, size_t length)
200{
201 unsigned const prime1 = 2654435761U;
202 unsigned const prime2 = 2246822519U;
203 unsigned acc = prime1;
204 size_t p=0;
205
206 for (p=0; p<length; p++) {
207 acc *= prime2;
208 ((unsigned char*)buffer)[p] = (unsigned char)(acc >> 21);
209 }
210}
211
212
213static void DiB_saveDict(const char* dictFileName,

Callers 1

DiB_trainFromFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected