Skip to content

Improved docs for Visiblity lib #1730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions twml/libtwml/src/lib/murmur_hash3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

//----------
Expand All @@ -139,7 +139,6 @@ void MurmurHash3_x86_32 ( const void * key, int len,
// finalization

h1 ^= len;

h1 = fmix32(h1);

*(uint32_t*)out = h1;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
16 changes: 16 additions & 0 deletions visibilitylib/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<!-- Table of content -->
# Table of content
- [Overview](#overview)
- [Notice](#notice)
- [SafetyLevel](#safetylevel)
- [Features](#features)
- [Action](#action)
- [Condition](#condition)
- [Policy](#policy)
- [RuleEngine](#ruleengine)
- [SafetyLabel](#safetylabel)
- [SafetyLabelType](#safetylabeltype)


Overview
========

Expand All @@ -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
===========

Expand Down