X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fstringhash.h;h=d62e8d1a1823c3e54df8cf890d7873b0af095785;hb=87cd81502f23b63c980bbce93b6159379299c782;hp=40f472521afb2ca0e1db3a6947a0265050ebfc6c;hpb=3ff5c433efcaee8b01fbeed90ab848008f2e6278;p=com%2Fgs-lite.git diff --git a/include/stringhash.h b/include/stringhash.h index 40f4725..d62e8d1 100644 --- a/include/stringhash.h +++ b/include/stringhash.h @@ -88,7 +88,7 @@ const INT64 Prime61 = (((INT64)1)<<61) - 1; //Random numbers from random.org based on atmostpheric noise. -INT64 Random64[200]= {0x285eb7722a62ce6eull, +static INT64 Random64[200]= {0x285eb7722a62ce6eull, 0xa84c7463e2b7856bull, 0xb29100d6abcc8666ull, 0xf9bfca5b7461fb1full, @@ -294,8 +294,8 @@ INT64 Random64[200]= {0x285eb7722a62ce6eull, -gs_int32_t nextrandom = 0; -gs_int32_t endrandom = 100; +static gs_int32_t nextrandom = 0; +static gs_int32_t endrandom = 100; // The first "endrandom" numbers returned are truely random INT64. @@ -309,8 +309,8 @@ inline static INT64 RandINT64() { INT64 r,r1; if (nextrandom> 32; +// return h; + if (length&1) return OddStringHash64bit(x,length,hid); + else return EvenStringHash64bit(x,length,hid); +} + +// --------------------------------------------- + + //string of length 2 inline INT32 String2Hash32bit2univ(INT32 * x,Hash32bit2univID hid) {