From 781bf4ad58c22525622a62d2ff042706f61bc8ca Mon Sep 17 00:00:00 2001 From: Mohammad Ruman <88760648+mohammadruman@users.noreply.github.com> Date: Fri, 7 Apr 2023 00:50:44 +0530 Subject: [PATCH 1/2] Update murmur_hash3.cpp --- twml/libtwml/src/lib/murmur_hash3.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/twml/libtwml/src/lib/murmur_hash3.cpp b/twml/libtwml/src/lib/murmur_hash3.cpp index 89c9c1fc1..996ec9d14 100644 --- a/twml/libtwml/src/lib/murmur_hash3.cpp +++ b/twml/libtwml/src/lib/murmur_hash3.cpp @@ -117,7 +117,7 @@ void MurmurHash3_x86_32 ( const void * key, int len, h1 ^= k1; h1 = ROTL32(h1,13); - h1 = h1*5+0xe6546b64; + h1 = (h1*5)+0xe6546b64; } //---------- @@ -139,7 +139,6 @@ void MurmurHash3_x86_32 ( const void * key, int len, // finalization h1 ^= len; - h1 = fmix32(h1); *(uint32_t*)out = h1; @@ -192,7 +191,7 @@ void MurmurHash3_x86_128 ( const void * key, const int len, h4 = ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17; } - //---------- + //----------------------------------------------------- // tail const uint8_t * tail = (const uint8_t*)(data + nblocks*16); @@ -228,7 +227,7 @@ void MurmurHash3_x86_128 ( const void * key, const int len, k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; }; - //---------- + //-------------------------------------------------------------- // finalization h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; @@ -252,7 +251,7 @@ void MurmurHash3_x86_128 ( const void * key, const int len, //----------------------------------------------------------------------------- -void MurmurHash3_x64_128 ( const void * key, const int len, +void MurmurHash3_x64_128 (const void * key, const int len, const uint32_t seed, void * out ) { const uint8_t * data = (const uint8_t*)key; @@ -283,7 +282,7 @@ void MurmurHash3_x64_128 ( const void * key, const int len, h2 = ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5; } - //---------- + //------------------------------------------------------- // tail const uint8_t * tail = (const uint8_t*)(data + nblocks*16); @@ -313,7 +312,7 @@ void MurmurHash3_x64_128 ( const void * key, const int len, k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; }; - //---------- + //-------------------------------------------------------------- // finalization h1 ^= len; h2 ^= len; From 69eb7e411f2c98c0a786c8957335b188d02be2a5 Mon Sep 17 00:00:00 2001 From: Mohammad Ruman <88760648+mohammadruman@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:22:20 +0530 Subject: [PATCH 2/2] Update README.md --- visibilitylib/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/visibilitylib/README.md b/visibilitylib/README.md index 28c7af03f..6962fa5ac 100644 --- a/visibilitylib/README.md +++ b/visibilitylib/README.md @@ -1,3 +1,17 @@ + + +# Table of content +- [Overview](#overview) +- [Notice](#notice) +- [SafetyLevel](#safetylevel) +- [Features](#features) +- [Action](#action) +- [Condition](#condition) +- [Policy](#policy) +- [RuleEngine](#ruleengine) +- [SafetyLabel](#safetylabel) +- [SafetyLabelType](#safetylabeltype) + Overview ======== @@ -8,6 +22,8 @@ Notice Visibility Filtering library is currently being reviewed and rebuilt, and part of the code has been removed and is not ready to be shared yet. The remaining part of the code needs further review and will be shared once it’s ready. Also code comments have been sanitized. + + SafetyLevel ===========