diff --git a/doc/v0.8.3/annotated.html b/doc/v0.8.3/annotated.html new file mode 100644 index 00000000..e136914b --- /dev/null +++ b/doc/v0.8.3/annotated.html @@ -0,0 +1,129 @@ + + + + + + + +xxHash: Data Structures + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + + + + + + +
 CXXH128_canonical_t
 CXXH128_hash_tThe return value from 128-bit hashes
 CXXH32_canonical_tCanonical (big endian) representation of XXH32_hash_t
 CXXH32_state_s
 CXXH3_state_s
 CXXH64_canonical_tCanonical (big endian) representation of XXH64_hash_t
 CXXH64_state_s
+
+
+
+ + + + diff --git a/doc/v0.8.3/annotated_dup.js b/doc/v0.8.3/annotated_dup.js new file mode 100644 index 00000000..adf0f47d --- /dev/null +++ b/doc/v0.8.3/annotated_dup.js @@ -0,0 +1,10 @@ +var annotated_dup = +[ + [ "XXH128_canonical_t", "struct_x_x_h128__canonical__t.html", null ], + [ "XXH128_hash_t", "struct_x_x_h128__hash__t.html", "struct_x_x_h128__hash__t" ], + [ "XXH32_canonical_t", "struct_x_x_h32__canonical__t.html", "struct_x_x_h32__canonical__t" ], + [ "XXH32_state_s", "struct_x_x_h32__state__s.html", "struct_x_x_h32__state__s" ], + [ "XXH3_state_s", "struct_x_x_h3__state__s.html", "struct_x_x_h3__state__s" ], + [ "XXH64_canonical_t", "struct_x_x_h64__canonical__t.html", null ], + [ "XXH64_state_s", "struct_x_x_h64__state__s.html", "struct_x_x_h64__state__s" ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/bc_s.png b/doc/v0.8.3/bc_s.png new file mode 100644 index 00000000..ecef8469 Binary files /dev/null and b/doc/v0.8.3/bc_s.png differ diff --git a/doc/v0.8.3/bc_sd.png b/doc/v0.8.3/bc_sd.png new file mode 100644 index 00000000..238ab18e Binary files /dev/null and b/doc/v0.8.3/bc_sd.png differ diff --git a/doc/v0.8.3/classes.html b/doc/v0.8.3/classes.html new file mode 100644 index 00000000..d47897ea --- /dev/null +++ b/doc/v0.8.3/classes.html @@ -0,0 +1,124 @@ + + + + + + + +xxHash: Data Structure Index + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Data Structure Index
+
+
+ + +
+
+ + + + diff --git a/doc/v0.8.3/clipboard.js b/doc/v0.8.3/clipboard.js new file mode 100644 index 00000000..42c1fb0e --- /dev/null +++ b/doc/v0.8.3/clipboard.js @@ -0,0 +1,61 @@ +/** + +The code below is based on the Doxygen Awesome project, see +https://github.com/jothepro/doxygen-awesome-css + +MIT License + +Copyright (c) 2021 - 2022 jothepro + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +let clipboard_title = "Copy to clipboard" +let clipboard_icon = `` +let clipboard_successIcon = `` +let clipboard_successDuration = 1000 + +$(function() { + if(navigator.clipboard) { + const fragments = document.getElementsByClassName("fragment") + for(const fragment of fragments) { + const clipboard_div = document.createElement("div") + clipboard_div.classList.add("clipboard") + clipboard_div.innerHTML = clipboard_icon + clipboard_div.title = clipboard_title + $(clipboard_div).click(function() { + const content = this.parentNode.cloneNode(true) + // filter out line number and folded fragments from file listings + content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() }) + let text = content.textContent + // remove trailing newlines and trailing spaces from empty lines + text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'') + navigator.clipboard.writeText(text); + this.classList.add("success") + this.innerHTML = clipboard_successIcon + window.setTimeout(() => { // switch back to normal icon after timeout + this.classList.remove("success") + this.innerHTML = clipboard_icon + }, clipboard_successDuration); + }) + fragment.insertBefore(clipboard_div, fragment.firstChild) + } + } +}) diff --git a/doc/v0.8.3/closed.png b/doc/v0.8.3/closed.png new file mode 100644 index 00000000..86099e07 Binary files /dev/null and b/doc/v0.8.3/closed.png differ diff --git a/doc/v0.8.3/cookie.js b/doc/v0.8.3/cookie.js new file mode 100644 index 00000000..53ad21d9 --- /dev/null +++ b/doc/v0.8.3/cookie.js @@ -0,0 +1,58 @@ +/*! + Cookie helper functions + Copyright (c) 2023 Dimitri van Heesch + Released under MIT license. +*/ +let Cookie = { + cookie_namespace: 'doxygen_', + + readSetting(cookie,defVal) { + if (window.chrome) { + const val = localStorage.getItem(this.cookie_namespace+cookie) || + sessionStorage.getItem(this.cookie_namespace+cookie); + if (val) return val; + } else { + let myCookie = this.cookie_namespace+cookie+"="; + if (document.cookie) { + const index = document.cookie.indexOf(myCookie); + if (index != -1) { + const valStart = index + myCookie.length; + let valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) { + valEnd = document.cookie.length; + } + return document.cookie.substring(valStart, valEnd); + } + } + } + return defVal; + }, + + writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete + if (window.chrome) { + if (days==0) { + sessionStorage.setItem(this.cookie_namespace+cookie,val); + } else { + localStorage.setItem(this.cookie_namespace+cookie,val); + } + } else { + let date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + const expiration = days!=0 ? "expires="+date.toGMTString()+";" : ""; + document.cookie = this.cookie_namespace + cookie + "=" + + val + "; SameSite=Lax;" + expiration + "path=/"; + } + }, + + eraseSetting(cookie) { + if (window.chrome) { + if (localStorage.getItem(this.cookie_namespace+cookie)) { + localStorage.removeItem(this.cookie_namespace+cookie); + } else if (sessionStorage.getItem(this.cookie_namespace+cookie)) { + sessionStorage.removeItem(this.cookie_namespace+cookie); + } + } else { + this.writeSetting(cookie,'',-1); + } + }, +} diff --git a/doc/v0.8.3/doc.svg b/doc/v0.8.3/doc.svg new file mode 100644 index 00000000..070f7479 --- /dev/null +++ b/doc/v0.8.3/doc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/doc/v0.8.3/docd.svg b/doc/v0.8.3/docd.svg new file mode 100644 index 00000000..b2e16384 --- /dev/null +++ b/doc/v0.8.3/docd.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/doc/v0.8.3/doxygen.css b/doc/v0.8.3/doxygen.css new file mode 100644 index 00000000..0f10557d --- /dev/null +++ b/doc/v0.8.3/doxygen.css @@ -0,0 +1,2256 @@ +/* The standard CSS for doxygen 1.13.1*/ + +html { +/* page base colors */ +--page-background-color: white; +--page-foreground-color: black; +--page-link-color: #30456F; +--page-visited-link-color: #3A5385; + +/* index */ +--index-odd-item-bg-color: #F6F8FB; +--index-even-item-bg-color: white; +--index-header-color: black; +--index-separator-color: #A0A0A0; + +/* header */ +--header-background-color: #F8F9FB; +--header-separator-color: #B8C5E0; +--header-gradient-image: url('nav_h.png'); +--group-header-separator-color: #708BC1; +--group-header-color: #293B5E; +--inherit-header-color: gray; + +--footer-foreground-color: #1F2C47; +--footer-logo-width: 104px; +--citation-label-color: #263759; +--glow-color: cyan; + +--title-background-color: white; +--title-separator-color: #44619B; +--directory-separator-color: #889ECB; +--separator-color: #3E588E; + +--blockquote-background-color: #F5F7FA; +--blockquote-border-color: #889ECB; + +--scrollbar-thumb-color: #889ECB; +--scrollbar-background-color: #F8F9FB; + +--icon-background-color: #5978B6; +--icon-foreground-color: white; +--icon-doc-image: url('doc.svg'); +--icon-folder-open-image: url('folderopen.svg'); +--icon-folder-closed-image: url('folderclosed.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #F8F9FB; +--memdecl-separator-color: #D6DEED; +--memdecl-foreground-color: #555; +--memdecl-template-color: #3A5385; + +/* detailed member list */ +--memdef-border-color: #96AAD1; +--memdef-title-background-color: #DCE2EF; +--memdef-title-gradient-image: url('nav_f.png'); +--memdef-proto-background-color: #D8DFED; +--memdef-proto-text-color: #1A253B; +--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--memdef-doc-background-color: white; +--memdef-param-name-color: #602020; +--memdef-template-color: #3A5385; + +/* tables */ +--table-cell-border-color: #212F4C; +--table-header-background-color: #2B3D62; +--table-header-foreground-color: #FFFFFF; + +/* labels */ +--label-background-color: #5978B6; +--label-left-top-border-color: #44619B; +--label-right-bottom-border-color: #B8C5E0; +--label-foreground-color: white; + +/** navigation bar/tree/menu */ +--nav-background-color: #F8F9FB; +--nav-foreground-color: #293B60; +--nav-gradient-image: url('tab_b.png'); +--nav-gradient-hover-image: url('tab_h.png'); +--nav-gradient-active-image: url('tab_a.png'); +--nav-gradient-active-image-parent: url("../tab_a.png"); +--nav-separator-image: url('tab_s.png'); +--nav-breadcrumb-image: url('bc_s.png'); +--nav-breadcrumb-border-color: #B5C3DE; +--nav-splitbar-image: url('splitbar.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #1D2942; +--nav-text-hover-color: white; +--nav-text-active-color: white; +--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #293B60; +--nav-menu-background-color: white; +--nav-menu-foreground-color: #555555; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.5); +--nav-arrow-color: #889ECB; +--nav-arrow-selected-color: #889ECB; + +/* table of contents */ +--toc-background-color: #F2F4F9; +--toc-border-color: #CFD8EA; +--toc-header-color: #3A5385; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: white; +--search-foreground-color: #909090; +--search-magnification-image: url('mag.svg'); +--search-magnification-select-image: url('mag_sel.svg'); +--search-active-color: black; +--search-filter-background-color: #F8F9FB; +--search-filter-foreground-color: black; +--search-filter-border-color: #7A93C5; +--search-filter-highlight-text-color: white; +--search-filter-highlight-bg-color: #30456F; +--search-results-foreground-color: #354C7A; +--search-results-background-color: #EAEEF5; +--search-results-border-color: black; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #555; + +/** code fragments */ +--code-keyword-color: #008000; +--code-type-keyword-color: #604020; +--code-flow-keyword-color: #E08000; +--code-comment-color: #800000; +--code-preprocessor-color: #806020; +--code-string-literal-color: #002080; +--code-char-literal-color: #008080; +--code-xml-cdata-color: black; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #000000; +--code-vhdl-keyword-color: #700070; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #3A5385; +--code-external-link-color: #3A5385; +--fragment-foreground-color: black; +--fragment-background-color: #FAFBFD; +--fragment-border-color: #B8C5E0; +--fragment-lineno-border-color: #00FF00; +--fragment-lineno-background-color: #E8E8E8; +--fragment-lineno-foreground-color: black; +--fragment-lineno-link-fg-color: #3A5385; +--fragment-lineno-link-bg-color: #D8D8D8; +--fragment-lineno-link-hover-fg-color: #3A5385; +--fragment-lineno-link-hover-bg-color: #C8C8C8; +--fragment-copy-ok-color: #2EC82E; +--tooltip-foreground-color: black; +--tooltip-background-color: white; +--tooltip-border-color: gray; +--tooltip-doc-color: grey; +--tooltip-declaration-color: #006318; +--tooltip-link-color: #3A5385; +--tooltip-shadow: 1px 1px 7px gray; +--fold-line-color: #808080; +--fold-minus-image: url('minus.svg'); +--fold-plus-image: url('plus.svg'); +--fold-minus-image-relpath: url('../../minus.svg'); +--fold-plus-image-relpath: url('../../plus.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #f8d1cc; +--warning-color-hl: #b61825; +--warning-color-text: #75070f; +--note-color-bg: #faf3d8; +--note-color-hl: #f3a600; +--note-color-text: #5f4204; +--todo-color-bg: #e4f3ff; +--todo-color-hl: #1879C4; +--todo-color-text: #274a5c; +--test-color-bg: #e8e8ff; +--test-color-hl: #3939C4; +--test-color-text: #1a1a5c; +--deprecated-color-bg: #ecf0f3; +--deprecated-color-hl: #5b6269; +--deprecated-color-text: #43454a; +--bug-color-bg: #e4dafd; +--bug-color-hl: #5b2bdd; +--bug-color-text: #2a0d72; +--invariant-color-bg: #d8f1e3; +--invariant-color-hl: #44b86f; +--invariant-color-text: #265532; +} + +@media (prefers-color-scheme: dark) { + html:not(.dark-mode) { + color-scheme: dark; + +/* page base colors */ +--page-background-color: black; +--page-foreground-color: #C9D1D9; +--page-link-color: #7A93C5; +--page-visited-link-color: #91A5CE; + +/* index */ +--index-odd-item-bg-color: #06080D; +--index-even-item-bg-color: black; +--index-header-color: #B8C5E0; +--index-separator-color: #263759; + +/* header */ +--header-background-color: #030508; +--header-separator-color: #0C111B; +--header-gradient-image: url('nav_hd.png'); +--group-header-separator-color: #1D2942; +--group-header-color: #7A93C5; +--inherit-header-color: #A0A0A0; + +--footer-foreground-color: #4766A4; +--footer-logo-width: 60px; +--citation-label-color: #7A93C5; +--glow-color: cyan; + +--title-background-color: #04060B; +--title-separator-color: #283A5D; +--directory-separator-color: #1D2942; +--separator-color: #1D2942; + +--blockquote-background-color: #090D16; +--blockquote-border-color: #1D2942; + +--scrollbar-thumb-color: #1D2942; +--scrollbar-background-color: #030508; + +--icon-background-color: #263759; +--icon-foreground-color: #B8C5E0; +--icon-doc-image: url('docd.svg'); +--icon-folder-open-image: url('folderopend.svg'); +--icon-folder-closed-image: url('folderclosedd.svg'); + +/* brief member declaration list */ +--memdecl-background-color: #06080D; +--memdecl-separator-color: #202E49; +--memdecl-foreground-color: #BBB; +--memdecl-template-color: #6481BB; + +/* detailed member list */ +--memdef-border-color: #182237; +--memdef-title-background-color: #121A29; +--memdef-title-gradient-image: url('nav_fd.png'); +--memdef-proto-background-color: #101725; +--memdef-proto-text-color: #8AA0CB; +--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9); +--memdef-doc-background-color: black; +--memdef-param-name-color: #D28757; +--memdef-template-color: #6481BB; + +/* tables */ +--table-cell-border-color: #1D2942; +--table-header-background-color: #1D2942; +--table-header-foreground-color: #B8C5E0; + +/* labels */ +--label-background-color: #293B5E; +--label-left-top-border-color: #3A5385; +--label-right-bottom-border-color: #1D2942; +--label-foreground-color: #CCCCCC; + +/** navigation bar/tree/menu */ +--nav-background-color: #090D16; +--nav-foreground-color: #293B60; +--nav-gradient-image: url('tab_bd.png'); +--nav-gradient-hover-image: url('tab_hd.png'); +--nav-gradient-active-image: url('tab_ad.png'); +--nav-gradient-active-image-parent: url("../tab_ad.png"); +--nav-separator-image: url('tab_sd.png'); +--nav-breadcrumb-image: url('bc_sd.png'); +--nav-breadcrumb-border-color: #1F2C47; +--nav-splitbar-image: url('splitbard.png'); +--nav-font-size-level1: 13px; +--nav-font-size-level2: 10px; +--nav-font-size-level3: 9px; +--nav-text-normal-color: #A7B7D8; +--nav-text-hover-color: #D3DBEC; +--nav-text-active-color: #D3DBEC; +--nav-text-normal-shadow: 0px 1px 1px black; +--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +--nav-menu-button-color: #A7B7D8; +--nav-menu-background-color: #020305; +--nav-menu-foreground-color: #BBBBBB; +--nav-menu-toggle-color: rgba(255, 255, 255, 0.2); +--nav-arrow-color: #263759; +--nav-arrow-selected-color: #7A93C5; + +/* table of contents */ +--toc-background-color: #0C121D; +--toc-border-color: #151F32; +--toc-header-color: #91A5CE; +--toc-down-arrow-image: url("data:image/svg+xml;utf8,&%238595;"); + +/** search field */ +--search-background-color: black; +--search-foreground-color: #C5C5C5; +--search-magnification-image: url('mag_d.svg'); +--search-magnification-select-image: url('mag_seld.svg'); +--search-active-color: #C5C5C5; +--search-filter-background-color: #090D16; +--search-filter-foreground-color: #7A93C5; +--search-filter-border-color: #6481BB; +--search-filter-highlight-text-color: #AEBDDB; +--search-filter-highlight-bg-color: #1D2942; +--search-results-background-color: #090D16; +--search-results-foreground-color: #7A93C5; +--search-results-border-color: #6481BB; +--search-box-shadow: inset 0.5px 0.5px 3px 0px #233250; + +/** code fragments */ +--code-keyword-color: #CC99CD; +--code-type-keyword-color: #AB99CD; +--code-flow-keyword-color: #E08000; +--code-comment-color: #717790; +--code-preprocessor-color: #65CABE; +--code-string-literal-color: #7EC699; +--code-char-literal-color: #00E0F0; +--code-xml-cdata-color: #C9D1D9; +--code-vhdl-digit-color: #FF00FF; +--code-vhdl-char-color: #C0C0C0; +--code-vhdl-keyword-color: #CF53C9; +--code-vhdl-logic-color: #FF0000; +--code-link-color: #79C0FF; +--code-external-link-color: #79C0FF; +--fragment-foreground-color: #C9D1D9; +--fragment-background-color: #04060B; +--fragment-border-color: #30363D; +--fragment-lineno-border-color: #30363D; +--fragment-lineno-background-color: black; +--fragment-lineno-foreground-color: #6E7681; +--fragment-lineno-link-fg-color: #6E7681; +--fragment-lineno-link-bg-color: #303030; +--fragment-lineno-link-hover-fg-color: #8E96A1; +--fragment-lineno-link-hover-bg-color: #505050; +--fragment-copy-ok-color: #0EA80E; +--tooltip-foreground-color: #C9D1D9; +--tooltip-background-color: #202020; +--tooltip-border-color: #C9D1D9; +--tooltip-doc-color: #D9E1E9; +--tooltip-declaration-color: #20C348; +--tooltip-link-color: #79C0FF; +--tooltip-shadow: none; +--fold-line-color: #808080; +--fold-minus-image: url('minusd.svg'); +--fold-plus-image: url('plusd.svg'); +--fold-minus-image-relpath: url('../../minusd.svg'); +--fold-plus-image-relpath: url('../../plusd.svg'); + +/** font-family */ +--font-family-normal: Roboto,sans-serif; +--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed; +--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +--font-family-title: Tahoma,Arial,sans-serif; +--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif; +--font-family-search: Arial,Verdana,sans-serif; +--font-family-icon: Arial,Helvetica; +--font-family-tooltip: Roboto,sans-serif; + +/** special sections */ +--warning-color-bg: #2e1917; +--warning-color-hl: #ad2617; +--warning-color-text: #f5b1aa; +--note-color-bg: #3b2e04; +--note-color-hl: #f1b602; +--note-color-text: #ceb670; +--todo-color-bg: #163750; +--todo-color-hl: #1982D2; +--todo-color-text: #dcf0fa; +--test-color-bg: #121258; +--test-color-hl: #4242cf; +--test-color-text: #c0c0da; +--deprecated-color-bg: #2e323b; +--deprecated-color-hl: #738396; +--deprecated-color-text: #abb0bd; +--bug-color-bg: #2a2536; +--bug-color-hl: #7661b3; +--bug-color-text: #ae9ed6; +--invariant-color-bg: #303a35; +--invariant-color-hl: #76ce96; +--invariant-color-text: #cceed5; +}} +body { + background-color: var(--page-background-color); + color: var(--page-foreground-color); +} + +body, table, div, p, dl { + font-weight: 400; + font-size: 14px; + font-family: var(--font-family-normal); + line-height: 22px; +} + +/* @group Heading Levels */ + +.title { + font-family: var(--font-family-normal); + line-height: 28px; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h1.groupheader { + font-size: 150%; +} + +h2.groupheader { + border-bottom: 1px solid var(--group-header-separator-color); + color: var(--group-header-color); + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--glow-color); +} + +dt { + font-weight: bold; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL { + background-image: var(--nav-gradient-active-image); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: var(--index-separator-color); +} + +#main-menu a:focus { + outline: auto; + z-index: 10; + position: relative; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: var(--index-header-color); +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.even { + background-color: var(--index-even-item-bg-color); +} + +.classindex dl.odd { + background-color: var(--index-odd-item-bg-color); +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: var(--page-link-color); + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: var(--page-visited-link-color); +} + +a:hover { + text-decoration: none; + background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%); +} + +a:hover > span.arrow { + text-decoration: none; + background : var(--nav-background-color); +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: var(--code-link-color); +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: var(--code-external-link-color); +} + +a.code.hl_class { /* style for links to class names in code snippets */ } +a.code.hl_struct { /* style for links to struct names in code snippets */ } +a.code.hl_union { /* style for links to union names in code snippets */ } +a.code.hl_interface { /* style for links to interface names in code snippets */ } +a.code.hl_protocol { /* style for links to protocol names in code snippets */ } +a.code.hl_category { /* style for links to category names in code snippets */ } +a.code.hl_exception { /* style for links to exception names in code snippets */ } +a.code.hl_service { /* style for links to service names in code snippets */ } +a.code.hl_singleton { /* style for links to singleton names in code snippets */ } +a.code.hl_concept { /* style for links to concept names in code snippets */ } +a.code.hl_namespace { /* style for links to namespace names in code snippets */ } +a.code.hl_package { /* style for links to package names in code snippets */ } +a.code.hl_define { /* style for links to macro names in code snippets */ } +a.code.hl_function { /* style for links to function names in code snippets */ } +a.code.hl_variable { /* style for links to variable names in code snippets */ } +a.code.hl_typedef { /* style for links to typedef names in code snippets */ } +a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ } +a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ } +a.code.hl_signal { /* style for links to Qt signal names in code snippets */ } +a.code.hl_slot { /* style for links to Qt slot names in code snippets */ } +a.code.hl_friend { /* style for links to friend names in code snippets */ } +a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ } +a.code.hl_property { /* style for links to property names in code snippets */ } +a.code.hl_event { /* style for links to event names in code snippets */ } +a.code.hl_sequence { /* style for links to sequence names in code snippets */ } +a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ } + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul.check { + list-style:none; + text-indent: -16px; + padding-left: 38px; +} +li.unchecked:before { + content: "\2610\A0"; +} +li.checked:before { + content: "\2611\A0"; +} + +ol { + text-indent: 0px; +} + +ul { + text-indent: 0px; + overflow: visible; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; + list-style-type: none; +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + position: relative; + min-height: 12px; + margin: 10px 0px; + padding: 10px 10px; + border: 1px solid var(--fragment-border-color); + border-radius: 4px; + background-color: var(--fragment-background-color); + color: var(--fragment-foreground-color); +} + +pre.fragment { + word-wrap: break-word; + font-size: 10pt; + line-height: 125%; + font-family: var(--font-family-monospace); +} + +.clipboard { + width: 24px; + height: 24px; + right: 5px; + top: 5px; + opacity: 0; + position: absolute; + display: inline; + overflow: auto; + fill: var(--fragment-foreground-color); + justify-content: center; + align-items: center; + cursor: pointer; +} + +.clipboard.success { + border: 1px solid var(--fragment-foreground-color); + border-radius: 4px; +} + +.fragment:hover .clipboard, .clipboard.success { + opacity: .28; +} + +.clipboard:hover, .clipboard.success { + opacity: 1 !important; +} + +.clipboard:active:not([class~=success]) svg { + transform: scale(.91); +} + +.clipboard.success svg { + fill: var(--fragment-copy-ok-color); +} + +.clipboard.success { + border-color: var(--fragment-copy-ok-color); +} + +div.line { + font-family: var(--font-family-monospace); + font-size: 13px; + min-height: 13px; + line-height: 1.2; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: var(--glow-color); + box-shadow: 0 0 10px var(--glow-color); +} + +span.fold { + margin-left: 5px; + margin-right: 1px; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; + display: inline-block; + width: 12px; + height: 12px; + background-repeat:no-repeat; + background-position:center; +} + +span.lineno { + padding-right: 4px; + margin-right: 9px; + text-align: right; + border-right: 2px solid var(--fragment-lineno-border-color); + color: var(--fragment-lineno-foreground-color); + background-color: var(--fragment-lineno-background-color); + white-space: pre; +} +span.lineno a, span.lineno a:visited { + color: var(--fragment-lineno-link-fg-color); + background-color: var(--fragment-lineno-link-bg-color); +} + +span.lineno a:hover { + color: var(--fragment-lineno-link-hover-fg-color); + background-color: var(--fragment-lineno-link-hover-bg-color); +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + color: var(--page-foreground-color); + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +p.formulaDsp { + text-align: center; +} + +img.dark-mode-visible { + display: none; +} +img.light-mode-visible { + display: none; +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; + width: var(--footer-logo-width); +} + +.compoundTemplParams { + color: var(--memdecl-template-color); + font-size: 80%; + line-height: 120%; +} + +/* @group Code Colorization */ + +span.keyword { + color: var(--code-keyword-color); +} + +span.keywordtype { + color: var(--code-type-keyword-color); +} + +span.keywordflow { + color: var(--code-flow-keyword-color); +} + +span.comment { + color: var(--code-comment-color); +} + +span.preprocessor { + color: var(--code-preprocessor-color); +} + +span.stringliteral { + color: var(--code-string-literal-color); +} + +span.charliteral { + color: var(--code-char-literal-color); +} + +span.xmlcdata { + color: var(--code-xml-cdata-color); +} + +span.vhdldigit { + color: var(--code-vhdl-digit-color); +} + +span.vhdlchar { + color: var(--code-vhdl-char-color); +} + +span.vhdlkeyword { + color: var(--code-vhdl-keyword-color); +} + +span.vhdllogic { + color: var(--code-vhdl-logic-color); +} + +blockquote { + background-color: var(--blockquote-background-color); + border-left: 2px solid var(--blockquote-border-color); + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid var(--table-cell-border-color); +} + +th.dirtab { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid var(--separator-color); +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--glow-color); + box-shadow: 0 0 15px var(--glow-color); +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: var(--memdecl-background-color); + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: var(--memdecl-foreground-color); +} + +.memSeparator { + border-bottom: 1px solid var(--memdecl-separator-color); + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: var(--memdecl-template-color); + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: var(--memdef-title-gradient-image); + background-repeat: repeat-x; + background-color: var(--memdef-title-background-color); + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: var(--memdef-template-color); + font-weight: normal; + margin-left: 9px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px var(--glow-color); +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 0px 6px 0px; + color: var(--memdef-proto-text-color); + font-weight: bold; + text-shadow: var(--memdef-proto-text-shadow); + background-color: var(--memdef-proto-background-color); + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; +} + +.overload { + font-family: var(--font-family-monospace); + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid var(--memdef-border-color); + border-left: 1px solid var(--memdef-border-color); + border-right: 1px solid var(--memdef-border-color); + padding: 6px 10px 2px 10px; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: var(--memdef-doc-background-color); + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; +} + +.paramname { + white-space: nowrap; + padding: 0px; + padding-bottom: 1px; + margin-left: 2px; +} + +.paramname em { + color: var(--memdef-param-name-color); + font-style: normal; + margin-right: 1px; +} + +.paramname .paramdefval { + font-family: var(--font-family-monospace); +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: var(--font-family-monospace); + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: var(--label-background-color); + border-top:1px solid var(--label-left-top-border-color); + border-left:1px solid var(--label-left-top-border-color); + border-right:1px solid var(--label-right-bottom-border-color); + border-bottom:1px solid var(--label-right-bottom-border-color); + text-shadow: none; + color: var(--label-foreground-color); + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid var(--directory-separator-color); + border-bottom: 1px solid var(--directory-separator-color); + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.odd { + padding-left: 6px; + background-color: var(--index-odd-item-bg-color); +} + +.directory tr.even { + padding-left: 6px; + background-color: var(--index-even-item-bg-color); +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: var(--page-link-color); +} + +.arrow { + color: var(--nav-arrow-color); + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: var(--font-family-icon); + line-height: normal; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: var(--icon-background-color); + color: var(--icon-foreground-color); + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-open-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-folder-closed-image); + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:var(--icon-doc-image); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: var(--footer-foreground-color); +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + margin-bottom: 10px; + border: 1px solid var(--memdef-border-color); + border-spacing: 0px; + border-radius: 4px; + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fieldinit { + white-space: nowrap; + border-right: 1px solid var(--memdef-border-color); + border-bottom: 1px solid var(--memdef-border-color); + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fieldinit { + padding-top: 3px; + text-align: right; +} + + +.fieldtable td.fielddoc { + border-bottom: 1px solid var(--memdef-border-color); +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image: var(--memdef-title-gradient-image); + background-repeat:repeat-x; + background-color: var(--memdef-title-background-color); + font-size: 90%; + color: var(--memdef-proto-text-color); + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid var(--memdef-border-color); +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: var(--nav-gradient-image); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image: var(--nav-gradient-image); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:var(--nav-text-normal-color); + border:solid 1px var(--nav-breadcrumb-border-color); + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:var(--nav-breadcrumb-image); + background-repeat:no-repeat; + background-position:right; + color: var(--nav-foreground-color); +} + +.navpath li.navelem a +{ + height:32px; + display:block; + outline: none; + color: var(--nav-text-normal-color); + font-family: var(--font-family-nav); + text-shadow: var(--nav-text-normal-shadow); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color: var(--nav-text-hover-color); + text-shadow: var(--nav-text-hover-shadow); +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color: var(--footer-foreground-color); + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image: var(--header-gradient-image); + background-repeat:repeat-x; + background-color: var(--header-background-color); + margin: 0px; + border-bottom: 1px solid var(--header-separator-color); +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* + +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention, dl.important { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +*/ + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.important, dl.note, dl.deprecated, dl.bug, +dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark { + padding: 10px; + margin: 10px 0px; + overflow: hidden; + margin-left: 0; + border-radius: 4px; +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention, dl.important { + background: var(--warning-color-bg); + border-left: 8px solid var(--warning-color-hl); + color: var(--warning-color-text); +} + +dl.warning dt, dl.attention dt, dl.important dt { + color: var(--warning-color-hl); +} + +dl.note, dl.remark { + background: var(--note-color-bg); + border-left: 8px solid var(--note-color-hl); + color: var(--note-color-text); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-hl); +} + +dl.todo { + background: var(--todo-color-bg); + border-left: 8px solid var(--todo-color-hl); + color: var(--todo-color-text); +} + +dl.todo dt { + color: var(--todo-color-hl); +} + +dl.test { + background: var(--test-color-bg); + border-left: 8px solid var(--test-color-hl); + color: var(--test-color-text); +} + +dl.test dt { + color: var(--test-color-hl); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.bug { + background: var(--bug-color-bg); + border-left: 8px solid var(--bug-color-hl); + color: var(--bug-color-text); +} + +dl.bug dt a { + color: var(--bug-color-hl) !important; +} + +dl.deprecated { + background: var(--deprecated-color-bg); + border-left: 8px solid var(--deprecated-color-hl); + color: var(--deprecated-color-text); +} + +dl.deprecated dt a { + color: var(--deprecated-color-hl) !important; +} + +dl.note dd, dl.warning dd, dl.pre dd, dl.post dd, +dl.remark dd, dl.attention dd, dl.important dd, dl.invariant dd, +dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color-bg); + border-left: 8px solid var(--invariant-color-hl); + color: var(--invariant-color-text); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-hl); +} + + +#projectrow +{ + height: 56px; +} + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; + padding-left: 0.5em; +} + +#projectname +{ + font-size: 200%; + font-family: var(--font-family-title); + margin: 0px; + padding: 2px 0px; +} + +#side-nav #projectname +{ + font-size: 130%; +} + +#projectbrief +{ + font-size: 90%; + font-family: var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font-size: 50%; + font-family: 50% var(--font-family-title); + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid var(--title-separator-color); + background-color: var(--title-background-color); +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:var(--citation-label-color); + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: var(--toc-background-color); + border: 1px solid var(--toc-border-color); + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent; + font: 10px/1.2 var(--font-family-toc); + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 var(--font-family-toc); + color: var(--toc-header-color); + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li[class^='level'] { + margin-left: 15px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.empty { + background-image: none; + margin-top: 0px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +span.obfuscator { + display: none; +} + +.inherit_header { + font-weight: bold; + color: var(--inherit-header-color); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + /*white-space: nowrap;*/ + color: var(--tooltip-foreground-color); + background-color: var(--tooltip-background-color); + border: 1px solid var(--tooltip-border-color); + border-radius: 4px 4px 4px 4px; + box-shadow: var(--tooltip-shadow); + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: var(--tooltip-doc-color); + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip a { + color: var(--tooltip-link-color); +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: var(--tooltip-declaration-color); +} + +#powerTip div { + margin: 0px; + padding: 0px; + font-size: 12px; + font-family: var(--font-family-tooltip); + line-height: 16px; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before { + border-top-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: var(--tooltip-background-color); + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: var(--tooltip-border-color); + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: var(--tooltip-border-color); + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: var(--tooltip-border-color); + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid var(--table-cell-border-color); + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: var(--table-header-background-color); + color: var(--table-header-foreground-color); + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +tt, code, kbd +{ + display: inline-block; +} +tt, code, kbd +{ + vertical-align: top; +} +/* @end */ + +u { + text-decoration: underline; +} + +details>summary { + list-style-type: none; +} + +details > summary::-webkit-details-marker { + display: none; +} + +details>summary::before { + content: "\25ba"; + padding-right:4px; + font-size: 80%; +} + +details[open]>summary::before { + content: "\25bc"; + padding-right:4px; + font-size: 80%; +} + +body { + scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color); +} + +::-webkit-scrollbar { + background-color: var(--scrollbar-background-color); + height: 12px; + width: 12px; +} +::-webkit-scrollbar-thumb { + border-radius: 6px; + box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color); + border: solid 2px transparent; +} +::-webkit-scrollbar-corner { + background-color: var(--scrollbar-background-color); +} + diff --git a/doc/v0.8.3/doxygen.svg b/doc/v0.8.3/doxygen.svg new file mode 100644 index 00000000..22e97f22 --- /dev/null +++ b/doc/v0.8.3/doxygen.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/v0.8.3/doxygen_crawl.html b/doc/v0.8.3/doxygen_crawl.html new file mode 100644 index 00000000..79ad557b --- /dev/null +++ b/doc/v0.8.3/doxygen_crawl.html @@ -0,0 +1,184 @@ + + + +Validator / crawler helper + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/v0.8.3/dynsections.js b/doc/v0.8.3/dynsections.js new file mode 100644 index 00000000..b05f4c8d --- /dev/null +++ b/doc/v0.8.3/dynsections.js @@ -0,0 +1,198 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function toggleVisibility(linkObj) { + return dynsection.toggleVisibility(linkObj); +} + +let dynsection = { + + // helper function + updateStripes : function() { + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); + $('table.directory tr'). + removeClass('odd').filter(':visible:odd').addClass('odd'); + }, + + toggleVisibility : function(linkObj) { + const base = $(linkObj).attr('id'); + const summary = $('#'+base+'-summary'); + const content = $('#'+base+'-content'); + const trigger = $('#'+base+'-trigger'); + const src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; + }, + + toggleLevel : function(level) { + $('table.directory tr').each(function() { + const l = this.id.split('_').length-1; + const i = $('#img'+this.id.substring(3)); + const a = $('#arr'+this.id.substring(3)); + if (l'); + // add vertical lines to other rows + $('span[class=lineno]').not(':eq(0)').append(''); + // add toggle controls to lines with fold divs + $('div[class=foldopen]').each(function() { + // extract specific id to use + const id = $(this).attr('id').replace('foldopen',''); + // extract start and end foldable fragment attributes + const start = $(this).attr('data-start'); + const end = $(this).attr('data-end'); + // replace normal fold span with controls for the first line of a foldable fragment + $(this).find('span[class=fold]:first').replaceWith(''); + // append div for folded (closed) representation + $(this).after(''); + // extract the first line from the "open" section to represent closed content + const line = $(this).children().first().clone(); + // remove any glow that might still be active on the original line + $(line).removeClass('glow'); + if (start) { + // if line already ends with a start marker (e.g. trailing {), remove it + $(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),'')); + } + // replace minus with plus symbol + $(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]); + // append ellipsis + $(line).append(' '+start+''+end); + // insert constructed line into closed div + $('#foldclosed'+id).html(line); + }); + }, +}; +/* @license-end */ diff --git a/doc/v0.8.3/files.html b/doc/v0.8.3/files.html new file mode 100644 index 00000000..343af216 --- /dev/null +++ b/doc/v0.8.3/files.html @@ -0,0 +1,124 @@ + + + + + + + +xxHash: File List + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
+
+ + + + diff --git a/doc/v0.8.3/files_dup.js b/doc/v0.8.3/files_dup.js new file mode 100644 index 00000000..649532b9 --- /dev/null +++ b/doc/v0.8.3/files_dup.js @@ -0,0 +1,5 @@ +var files_dup = +[ + [ "xxh_x86dispatch.c", "xxh__x86dispatch_8c.html", "xxh__x86dispatch_8c" ], + [ "xxhash.h", "xxhash_8h.html", "xxhash_8h" ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/folderclosed.svg b/doc/v0.8.3/folderclosed.svg new file mode 100644 index 00000000..5ee2f996 --- /dev/null +++ b/doc/v0.8.3/folderclosed.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/doc/v0.8.3/folderclosedd.svg b/doc/v0.8.3/folderclosedd.svg new file mode 100644 index 00000000..1661ed4f --- /dev/null +++ b/doc/v0.8.3/folderclosedd.svg @@ -0,0 +1,11 @@ + + + + + + + + + + diff --git a/doc/v0.8.3/folderopen.svg b/doc/v0.8.3/folderopen.svg new file mode 100644 index 00000000..80a6b923 --- /dev/null +++ b/doc/v0.8.3/folderopen.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/doc/v0.8.3/folderopend.svg b/doc/v0.8.3/folderopend.svg new file mode 100644 index 00000000..4b61d388 --- /dev/null +++ b/doc/v0.8.3/folderopend.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/doc/v0.8.3/functions.html b/doc/v0.8.3/functions.html new file mode 100644 index 00000000..98213c6f --- /dev/null +++ b/doc/v0.8.3/functions.html @@ -0,0 +1,137 @@ + + + + + + + +xxHash: Data Fields + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
+
+
+ + + + diff --git a/doc/v0.8.3/functions_vars.html b/doc/v0.8.3/functions_vars.html new file mode 100644 index 00000000..56c7b9cf --- /dev/null +++ b/doc/v0.8.3/functions_vars.html @@ -0,0 +1,137 @@ + + + + + + + +xxHash: Data Fields - Variables + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented variables with links to the struct/union documentation for each field:
+
+
+ + + + diff --git a/doc/v0.8.3/globals.html b/doc/v0.8.3/globals.html new file mode 100644 index 00000000..6f91b24f --- /dev/null +++ b/doc/v0.8.3/globals.html @@ -0,0 +1,228 @@ + + + + + + + +xxHash: Globals + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
+ +

- x -

+
+
+ + + + diff --git a/doc/v0.8.3/globals_defs.html b/doc/v0.8.3/globals_defs.html new file mode 100644 index 00000000..03522ed7 --- /dev/null +++ b/doc/v0.8.3/globals_defs.html @@ -0,0 +1,168 @@ + + + + + + + +xxHash: Globals + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented macros with links to the documentation:
+ +

- x -

+
+
+ + + + diff --git a/doc/v0.8.3/globals_enum.html b/doc/v0.8.3/globals_enum.html new file mode 100644 index 00000000..2c93082c --- /dev/null +++ b/doc/v0.8.3/globals_enum.html @@ -0,0 +1,119 @@ + + + + + + + +xxHash: Globals + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented enums with links to the documentation:
+
+
+ + + + diff --git a/doc/v0.8.3/globals_eval.html b/doc/v0.8.3/globals_eval.html new file mode 100644 index 00000000..18b84f17 --- /dev/null +++ b/doc/v0.8.3/globals_eval.html @@ -0,0 +1,121 @@ + + + + + + + +xxHash: Globals + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented enum values with links to the documentation:
+
+
+ + + + diff --git a/doc/v0.8.3/globals_func.html b/doc/v0.8.3/globals_func.html new file mode 100644 index 00000000..481cca28 --- /dev/null +++ b/doc/v0.8.3/globals_func.html @@ -0,0 +1,168 @@ + + + + + + + +xxHash: Globals + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented functions with links to the documentation:
+ +

- x -

+
+
+ + + + diff --git a/doc/v0.8.3/globals_type.html b/doc/v0.8.3/globals_type.html new file mode 100644 index 00000000..883969f6 --- /dev/null +++ b/doc/v0.8.3/globals_type.html @@ -0,0 +1,122 @@ + + + + + + + +xxHash: Globals + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented typedefs with links to the documentation:
+
+
+ + + + diff --git a/doc/v0.8.3/globals_vars.html b/doc/v0.8.3/globals_vars.html new file mode 100644 index 00000000..e1d9b8b9 --- /dev/null +++ b/doc/v0.8.3/globals_vars.html @@ -0,0 +1,88 @@ + + + + + + + +xxHash: Globals + + + + + + + + + +
+
+ + + + + + +
+
xxHash 0.8.2 +
+
Extremely fast non-cryptographic hash function
+
+
+ + + + + + + +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
Here is a list of all documented variables with links to the documentation:
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h32__family.html b/doc/v0.8.3/group___x_x_h32__family.html new file mode 100644 index 00000000..09c69441 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h32__family.html @@ -0,0 +1,483 @@ + + + + + + + +xxHash: XXH32 family + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
XXH32 family
+
+
+ + + + + +

+Data Structures

struct  XXH32_canonical_t
 Canonical (big endian) representation of XXH32_hash_t. More...
 
+ + + + +

+Typedefs

typedef struct XXH32_state_s XXH32_state_t
 The opaque state struct for the XXH32 streaming API.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

XXH32_hash_t XXH32 (const void *input, size_t length, XXH32_hash_t seed)
 Calculates the 32-bit hash of input using xxHash32.
 
XXH32_state_tXXH32_createState (void)
 Allocates an XXH32_state_t.
 
XXH_errorcode XXH32_freeState (XXH32_state_t *statePtr)
 Frees an XXH32_state_t.
 
void XXH32_copyState (XXH32_state_t *dst_state, const XXH32_state_t *src_state)
 Copies one XXH32_state_t to another.
 
XXH_errorcode XXH32_reset (XXH32_state_t *statePtr, XXH32_hash_t seed)
 Resets an XXH32_state_t to begin a new hash.
 
XXH_errorcode XXH32_update (XXH32_state_t *statePtr, const void *input, size_t length)
 Consumes a block of input to an XXH32_state_t.
 
XXH32_hash_t XXH32_digest (const XXH32_state_t *statePtr)
 Returns the calculated hash value from an XXH32_state_t.
 
void XXH32_canonicalFromHash (XXH32_canonical_t *dst, XXH32_hash_t hash)
 Converts an XXH32_hash_t to a big endian XXH32_canonical_t.
 
XXH32_hash_t XXH32_hashFromCanonical (const XXH32_canonical_t *src)
 Converts an XXH32_canonical_t to a native XXH32_hash_t.
 
+

Detailed Description

+

Contains functions used in the classic 32-bit xxHash algorithm.

+
Note
XXH32 is useful for older platforms, with no or poor 64-bit performance. Note that the XXH3 family provides competitive speed for both 32-bit and 64-bit systems, and offers true 64/128 bit hash results.
+
See also
XXH64 family, XXH3 family : Other xxHash families
+
+XXH32 implementation for implementation details
+

Typedef Documentation

+ +

◆ XXH32_state_t

+ +
+
+ + + + +
typedef struct XXH32_state_s XXH32_state_t
+
+ +

The opaque state struct for the XXH32 streaming API.

+
See also
XXH32_state_s for details.
+
+Streaming Example
+ +
+
+

Function Documentation

+ +

◆ XXH32()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH32_hash_t XXH32 (const void * input,
size_t length,
XXH32_hash_t seed )
+
+ +

Calculates the 32-bit hash of input using xxHash32.

+
Parameters
+ + + + +
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
seedThe 32-bit seed to alter the hash's output predictably.
+
+
+
Precondition
The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
The calculated 32-bit xxHash32 value.
+
See also
Single Shot Example for an example.
+ +
+
+ +

◆ XXH32_createState()

+ +
+
+ + + + + + + +
XXH32_state_t * XXH32_createState (void )
+
+ +

Allocates an XXH32_state_t.

+
Returns
An allocated pointer of XXH32_state_t on success.
+
+NULL on failure.
+
Note
Must be freed with XXH32_freeState().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH32_freeState()

+ +
+
+ + + + + + + +
XXH_errorcode XXH32_freeState (XXH32_state_t * statePtr)
+
+ +

Frees an XXH32_state_t.

+
Parameters
+ + +
statePtrA pointer to an XXH32_state_t allocated with XXH32_createState().
+
+
+
Returns
XXH_OK.
+
Note
statePtr must be allocated with XXH32_createState().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH32_copyState()

+ +
+
+ + + + + + + + + + + +
void XXH32_copyState (XXH32_state_t * dst_state,
const XXH32_state_t * src_state )
+
+ +

Copies one XXH32_state_t to another.

+
Parameters
+ + + +
dst_stateThe state to copy to.
src_stateThe state to copy from.
+
+
+
Precondition
dst_state and src_state must not be NULL and must not overlap.
+ +
+
+ +

◆ XXH32_reset()

+ +
+
+ + + + + + + + + + + +
XXH_errorcode XXH32_reset (XXH32_state_t * statePtr,
XXH32_hash_t seed )
+
+ +

Resets an XXH32_state_t to begin a new hash.

+
Parameters
+ + + +
statePtrThe state struct to reset.
seedThe 32-bit seed to alter the hash result predictably.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
This function resets and seeds a state. Call it before XXH32_update().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH32_update()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH_errorcode XXH32_update (XXH32_state_t * statePtr,
const void * input,
size_t length )
+
+ +

Consumes a block of input to an XXH32_state_t.

+
Parameters
+ + + + +
statePtrThe state struct to update.
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
+
+
+
Precondition
statePtr must not be NULL.
+
+The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
Call this to incrementally consume blocks of data.
+
See also
Streaming Example
+ +
+
+ +

◆ XXH32_digest()

+ +
+
+ + + + + + + +
XXH32_hash_t XXH32_digest (const XXH32_state_t * statePtr)
+
+ +

Returns the calculated hash value from an XXH32_state_t.

+
Parameters
+ + +
statePtrThe state struct to calculate the hash from.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
The calculated 32-bit xxHash32 value from that state.
+
Note
Calling XXH32_digest() will not affect statePtr, so you can update, digest, and update again.
+
See also
Streaming Example
+ +
+
+ +

◆ XXH32_canonicalFromHash()

+ +
+
+ + + + + + + + + + + +
void XXH32_canonicalFromHash (XXH32_canonical_t * dst,
XXH32_hash_t hash )
+
+ +

Converts an XXH32_hash_t to a big endian XXH32_canonical_t.

+
Parameters
+ + + +
dstThe XXH32_canonical_t pointer to be stored to.
hashThe XXH32_hash_t to be converted.
+
+
+
Precondition
dst must not be NULL.
+
See also
Canonical Representation Example
+ +
+
+ +

◆ XXH32_hashFromCanonical()

+ +
+
+ + + + + + + +
XXH32_hash_t XXH32_hashFromCanonical (const XXH32_canonical_t * src)
+
+ +

Converts an XXH32_canonical_t to a native XXH32_hash_t.

+
Parameters
+ + +
srcThe XXH32_canonical_t to convert.
+
+
+
Precondition
src must not be NULL.
+
Returns
The converted hash.
+
See also
Canonical Representation Example
+ +
+
+
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h32__family.js b/doc/v0.8.3/group___x_x_h32__family.js new file mode 100644 index 00000000..36af7566 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h32__family.js @@ -0,0 +1,16 @@ +var group___x_x_h32__family = +[ + [ "XXH32_canonical_t", "struct_x_x_h32__canonical__t.html", [ + [ "digest", "struct_x_x_h32__canonical__t.html#a85a83578344a5dd1c7a6cc0472230f30", null ] + ] ], + [ "XXH32_state_t", "group___x_x_h32__family.html#ga0048f07d4a3051c20598464f007aa6c5", null ], + [ "XXH32", "group___x_x_h32__family.html#ga310c01be2371883ad3bb37930626ec86", null ], + [ "XXH32_createState", "group___x_x_h32__family.html#ga7d53ff3de134f4e294de011cc3e6a498", null ], + [ "XXH32_freeState", "group___x_x_h32__family.html#ga87d9d298652e8d5560f482c963ddd6c8", null ], + [ "XXH32_copyState", "group___x_x_h32__family.html#gaed14b659149c1327acac124a07ee29d3", null ], + [ "XXH32_reset", "group___x_x_h32__family.html#ga00a68397351fe1d54fe23a831294b4ef", null ], + [ "XXH32_update", "group___x_x_h32__family.html#ga40aa0e1469b0db64a4694cd97c8563b4", null ], + [ "XXH32_digest", "group___x_x_h32__family.html#gae4d82d62718fd5e09c83ad3f639c892a", null ], + [ "XXH32_canonicalFromHash", "group___x_x_h32__family.html#gab033c1336e85ab51e02f1987254af9bd", null ], + [ "XXH32_hashFromCanonical", "group___x_x_h32__family.html#gac3cf699c65b7b63df08964c56b1bdaf5", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group___x_x_h32__impl.html b/doc/v0.8.3/group___x_x_h32__impl.html new file mode 100644 index 00000000..a6128209 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h32__impl.html @@ -0,0 +1,232 @@ + + + + + + + +xxHash: XXH32 implementation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
XXH32 implementation
+
+
+ + + + + + + + + + + + + + +

+Macros

#define XXH_PRIME32_1   0x9E3779B1U
 
#define XXH_PRIME32_2   0x85EBCA77U
 
#define XXH_PRIME32_3   0xC2B2AE3DU
 
#define XXH_PRIME32_4   0x27D4EB2FU
 
#define XXH_PRIME32_5   0x165667B1U
 
#define XXH_get32bits(p)
 
+

Detailed Description

+

Details on the XXH32 implementation.

+

Macro Definition Documentation

+ +

◆ XXH_PRIME32_1

+ +
+
+ + + + +
#define XXH_PRIME32_1   0x9E3779B1U
+
+

0b10011110001101110111100110110001

+ +
+
+ +

◆ XXH_PRIME32_2

+ +
+
+ + + + +
#define XXH_PRIME32_2   0x85EBCA77U
+
+

0b10000101111010111100101001110111

+ +
+
+ +

◆ XXH_PRIME32_3

+ +
+
+ + + + +
#define XXH_PRIME32_3   0xC2B2AE3DU
+
+

0b11000010101100101010111000111101

+ +
+
+ +

◆ XXH_PRIME32_4

+ +
+
+ + + + +
#define XXH_PRIME32_4   0x27D4EB2FU
+
+

0b00100111110101001110101100101111

+ +
+
+ +

◆ XXH_PRIME32_5

+ +
+
+ + + + +
#define XXH_PRIME32_5   0x165667B1U
+
+

0b00010110010101100110011110110001

+ +
+
+ +

◆ XXH_get32bits

+ +
+
+ + + + + + + +
#define XXH_get32bits( p)
+
+Value:
XXH_readLE32_align(p, align)
+
+
+
+
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h32__impl.js b/doc/v0.8.3/group___x_x_h32__impl.js new file mode 100644 index 00000000..ad12905f --- /dev/null +++ b/doc/v0.8.3/group___x_x_h32__impl.js @@ -0,0 +1,8 @@ +var group___x_x_h32__impl = +[ + [ "XXH_PRIME32_1", "group___x_x_h32__impl.html#ga29fede2b86ee758448c55edf6171e11f", null ], + [ "XXH_PRIME32_2", "group___x_x_h32__impl.html#ga23d49e684c0551afaed8e4ff40940c79", null ], + [ "XXH_PRIME32_3", "group___x_x_h32__impl.html#gacdda6ef95561d39cf2f9b7f2cd5c6693", null ], + [ "XXH_PRIME32_4", "group___x_x_h32__impl.html#ga9f43a7ed63cb15dfc49b1a42c250e511", null ], + [ "XXH_PRIME32_5", "group___x_x_h32__impl.html#gaa4ab6ba3eb0659356b8ed3b84c43e3e7", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group___x_x_h3__family.html b/doc/v0.8.3/group___x_x_h3__family.html new file mode 100644 index 00000000..42e4553f --- /dev/null +++ b/doc/v0.8.3/group___x_x_h3__family.html @@ -0,0 +1,1593 @@ + + + + + + + +xxHash: XXH3 family + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
XXH3 family
+
+
+ + + + + + + +

+Data Structures

struct  XXH128_hash_t
 The return value from 128-bit hashes. More...
 
struct  XXH128_canonical_t
 
+ + + + + + + + + + + + + + + + + + + +

+Macros

#define XXH_SSE2   1
 
#define XXH_AVX2   2
 
#define XXH_AVX512   3
 
#define XXH_NEON   4
 
#define XXH_VSX   5
 
#define XXH_SVE   6
 
#define XXH_LSX   7
 
#define XXH_LASX   8
 
#define XXH3_SECRET_SIZE_MIN   136
 
+ + + + +

+Typedefs

typedef struct XXH3_state_s XXH3_state_t
 The opaque state struct for the XXH3 streaming API.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

XXH64_hash_t XXH3_64bits (const void *input, size_t length)
 Calculates 64-bit unseeded variant of XXH3 hash of input.
 
XXH64_hash_t XXH3_64bits_withSeed (const void *input, size_t length, XXH64_hash_t seed)
 Calculates 64-bit seeded variant of XXH3 hash of input.
 
XXH64_hash_t XXH3_64bits_withSecret (const void *data, size_t len, const void *secret, size_t secretSize)
 Calculates 64-bit variant of XXH3 with a custom "secret".
 
XXH3_state_tXXH3_createState (void)
 Allocate an XXH3_state_t.
 
XXH_errorcode XXH3_freeState (XXH3_state_t *statePtr)
 Frees an XXH3_state_t.
 
void XXH3_copyState (XXH3_state_t *dst_state, const XXH3_state_t *src_state)
 Copies one XXH3_state_t to another.
 
XXH_errorcode XXH3_64bits_reset (XXH3_state_t *statePtr)
 Resets an XXH3_state_t to begin a new hash.
 
XXH_errorcode XXH3_64bits_reset_withSeed (XXH3_state_t *statePtr, XXH64_hash_t seed)
 Resets an XXH3_state_t with 64-bit seed to begin a new hash.
 
XXH_errorcode XXH3_64bits_reset_withSecret (XXH3_state_t *statePtr, const void *secret, size_t secretSize)
 Resets an XXH3_state_t with secret data to begin a new hash.
 
XXH_errorcode XXH3_64bits_update (XXH3_state_t *statePtr, const void *input, size_t length)
 Consumes a block of input to an XXH3_state_t.
 
XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t *statePtr)
 Returns the calculated XXH3 64-bit hash value from an XXH3_state_t.
 
XXH128_hash_t XXH3_128bits (const void *data, size_t len)
 Calculates 128-bit unseeded variant of XXH3 of data.
 
XXH128_hash_t XXH3_128bits_withSeed (const void *data, size_t len, XXH64_hash_t seed)
 Calculates 128-bit seeded variant of XXH3 hash of data.
 
XXH128_hash_t XXH3_128bits_withSecret (const void *data, size_t len, const void *secret, size_t secretSize)
 Calculates 128-bit variant of XXH3 with a custom "secret".
 
XXH_errorcode XXH3_128bits_reset (XXH3_state_t *statePtr)
 Resets an XXH3_state_t to begin a new hash.
 
XXH_errorcode XXH3_128bits_reset_withSeed (XXH3_state_t *statePtr, XXH64_hash_t seed)
 Resets an XXH3_state_t with 64-bit seed to begin a new hash.
 
XXH_errorcode XXH3_128bits_reset_withSecret (XXH3_state_t *statePtr, const void *secret, size_t secretSize)
 Resets an XXH3_state_t with secret data to begin a new hash.
 
XXH_errorcode XXH3_128bits_update (XXH3_state_t *statePtr, const void *input, size_t length)
 Consumes a block of input to an XXH3_state_t.
 
XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t *statePtr)
 Returns the calculated XXH3 128-bit hash value from an XXH3_state_t.
 
int XXH128_isEqual (XXH128_hash_t h1, XXH128_hash_t h2)
 Check equality of two XXH128_hash_t values.
 
int XXH128_cmp (const void *h128_1, const void *h128_2)
 Compares two XXH128_hash_t.
 
void XXH128_canonicalFromHash (XXH128_canonical_t *dst, XXH128_hash_t hash)
 Converts an XXH128_hash_t to a big endian XXH128_canonical_t.
 
XXH128_hash_t XXH128_hashFromCanonical (const XXH128_canonical_t *src)
 Converts an XXH128_canonical_t to a native XXH128_hash_t.
 
XXH_errorcode XXH3_64bits_reset_withSecretandSeed (XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64)
 Resets an XXH3_state_t with secret data to begin a new hash.
 
XXH128_hash_t XXH3_128bits_withSecretandSeed (const void *input, size_t length, const void *secret, size_t secretSize, XXH64_hash_t seed64)
 Calculates 128-bit seeded variant of XXH3 hash of data.
 
XXH128_hash_t XXH128 (const void *data, size_t len, XXH64_hash_t seed)
 Calculates the 128-bit hash of data using XXH3.
 
XXH_errorcode XXH3_128bits_reset_withSecretandSeed (XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64)
 Resets an XXH3_state_t with secret data to begin a new hash.
 
XXH_errorcode XXH3_generateSecret (void *secretBuffer, size_t secretSize, const void *customSeed, size_t customSeedSize)
 Derive a high-entropy secret from any user-defined content, named customSeed.
 
void XXH3_generateSecret_fromSeed (void *secretBuffer, XXH64_hash_t seed)
 Generate the same secret as the _withSeed() variants.
 
+

Detailed Description

+
+

XXH3 is a more recent hash algorithm featuring:

+

Speed analysis methodology is explained here:

+

https://fastcompression.blogspot.com/2019/03/presenting-xxh3.html

+

Compared to XXH64, expect XXH3 to run approximately ~2x faster on large inputs and >3x faster on small ones, exact differences vary depending on platform.

+

XXH3's speed benefits greatly from SIMD and 64-bit arithmetic, but does not require it. Most 32-bit and 64-bit targets that can run XXH32 smoothly can run XXH3 at competitive speeds, even without vector support. Further details are explained in the implementation.

+

XXH3 has a fast scalar implementation, but it also includes accelerated SIMD implementations for many common platforms:

+

XXH3 implementation is portable: it has a generic C90 formulation that can be compiled on any platform, all implementations generate exactly the same hash value on all platforms. Starting from v0.8.0, it's also labelled "stable", meaning that any future version will also generate the same hash value.

+

XXH3 offers 2 variants, _64bits and _128bits.

+

When only 64 bits are needed, prefer invoking the _64bits variant, as it reduces the amount of mixing, resulting in faster speed on small inputs. It's also generally simpler to manipulate a scalar return type than a struct.

+

The API supports one-shot hashing, streaming mode, and custom secrets.

+

Macro Definition Documentation

+ +

◆ XXH_SSE2

+ +
+
+ + + + +
#define XXH_SSE2   1
+
+

SSE2 for Pentium 4, Opteron, all x86_64.

+ +
+
+ +

◆ XXH_AVX2

+ +
+
+ + + + +
#define XXH_AVX2   2
+
+

AVX2 for Haswell and Bulldozer

+ +
+
+ +

◆ XXH_AVX512

+ +
+
+ + + + +
#define XXH_AVX512   3
+
+

AVX512 for Skylake and Icelake

+ +
+
+ +

◆ XXH_NEON

+ +
+
+ + + + +
#define XXH_NEON   4
+
+

NEON for most ARMv7-A, all AArch64, and WASM SIMD128

+ +
+
+ +

◆ XXH_VSX

+ +
+
+ + + + +
#define XXH_VSX   5
+
+

VSX and ZVector for POWER8/z13 (64-bit)

+ +
+
+ +

◆ XXH_SVE

+ +
+
+ + + + +
#define XXH_SVE   6
+
+

SVE for some ARMv8-A and ARMv9-A

+ +
+
+ +

◆ XXH_LSX

+ +
+
+ + + + +
#define XXH_LSX   7
+
+

LSX (128-bit SIMD) for LoongArch64

+ +
+
+ +

◆ XXH_LASX

+ +
+
+ + + + +
#define XXH_LASX   8
+
+

LASX (256-bit SIMD) for LoongArch64

+ +
+
+ +

◆ XXH3_SECRET_SIZE_MIN

+ +
+
+ + + + +
#define XXH3_SECRET_SIZE_MIN   136
+
+
+

Typedef Documentation

+ +

◆ XXH3_state_t

+ +
+
+ + + + +
typedef struct XXH3_state_s XXH3_state_t
+
+ +

The opaque state struct for the XXH3 streaming API.

+
See also
XXH3_state_s for details.
+
+Streaming Example
+ +
+
+

Function Documentation

+ +

◆ XXH3_64bits()

+ +
+
+ + + + + + + + + + + +
XXH64_hash_t XXH3_64bits (const void * input,
size_t length )
+
+ +

Calculates 64-bit unseeded variant of XXH3 hash of input.

+
Parameters
+ + + +
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
+
+
+
Precondition
The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
The calculated 64-bit XXH3 hash value.
+
Note
This is equivalent to XXH3_64bits_withSeed() with a seed of 0, however it may have slightly better performance due to constant propagation of the defaults.
+
See also
XXH3_64bits_withSeed(), XXH3_64bits_withSecret(): other seeding variants
+
+Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_64bits_withSeed()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH64_hash_t XXH3_64bits_withSeed (const void * input,
size_t length,
XXH64_hash_t seed )
+
+ +

Calculates 64-bit seeded variant of XXH3 hash of input.

+
Parameters
+ + + + +
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
seedThe 64-bit seed to alter the hash result predictably.
+
+
+
Precondition
The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
The calculated 64-bit XXH3 hash value.
+
Note
seed == 0 produces the same results as XXH3_64bits().
+

This variant generates a custom secret on the fly based on default secret altered using the seed value.

+

While this operation is decently fast, note that it's not completely free.

+
See also
Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_64bits_withSecret()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
XXH64_hash_t XXH3_64bits_withSecret (const void * data,
size_t len,
const void * secret,
size_t secretSize )
+
+ +

Calculates 64-bit variant of XXH3 with a custom "secret".

+
Parameters
+ + + + + +
dataThe block of data to be hashed, at least len bytes in size.
lenThe length of data, in bytes.
secretThe secret data.
secretSizeThe length of secret, in bytes.
+
+
+
Returns
The calculated 64-bit XXH3 hash value.
+
Precondition
The memory between data and data + len must be valid, readable, contiguous memory. However, if length is 0, data may be NULL. In C++, this also must be TriviallyCopyable.
+

It's possible to provide any blob of bytes as a "secret" to generate the hash. This makes it more difficult for an external actor to prepare an intentional collision. The main condition is that secretSize must be large enough (>= XXH3_SECRET_SIZE_MIN). However, the quality of the secret impacts the dispersion of the hash algorithm. Therefore, the secret must look like a bunch of random bytes. Avoid "trivial" or structured data such as repeated sequences or a text document. Whenever in doubt about the "randomness" of the blob of bytes, consider employing XXH3_generateSecret() instead (see below). It will generate a proper high entropy secret derived from the blob of bytes. Another advantage of using XXH3_generateSecret() is that it guarantees that all bits within the initial blob of bytes will impact every bit of the output. This is not necessarily the case when using the blob of bytes directly because, when hashing small inputs, only a portion of the secret is employed.

+
See also
Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_createState()

+ +
+
+ + + + + + + +
XXH3_state_t * XXH3_createState (void )
+
+ +

Allocate an XXH3_state_t.

+
Returns
An allocated pointer of XXH3_state_t on success.
+
+NULL on failure.
+
Note
Must be freed with XXH3_freeState().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_freeState()

+ +
+
+ + + + + + + +
XXH_errorcode XXH3_freeState (XXH3_state_t * statePtr)
+
+ +

Frees an XXH3_state_t.

+
Parameters
+ + +
statePtrA pointer to an XXH3_state_t allocated with XXH3_createState().
+
+
+
Returns
XXH_OK.
+
Note
Must be allocated with XXH3_createState().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_copyState()

+ +
+
+ + + + + + + + + + + +
void XXH3_copyState (XXH3_state_t * dst_state,
const XXH3_state_t * src_state )
+
+ +

Copies one XXH3_state_t to another.

+
Parameters
+ + + +
dst_stateThe state to copy to.
src_stateThe state to copy from.
+
+
+
Precondition
dst_state and src_state must not be NULL and must not overlap.
+ +
+
+ +

◆ XXH3_64bits_reset()

+ +
+
+ + + + + + + +
XXH_errorcode XXH3_64bits_reset (XXH3_state_t * statePtr)
+
+ +

Resets an XXH3_state_t to begin a new hash.

+
Parameters
+ + +
statePtrThe state struct to reset.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
    +
  • This function resets statePtr and generate a secret with default parameters.
  • +
  • Call this function before XXH3_64bits_update().
  • +
  • Digest will be equivalent to XXH3_64bits().
  • +
+
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_64bits_reset_withSeed()

+ +
+
+ + + + + + + + + + + +
XXH_errorcode XXH3_64bits_reset_withSeed (XXH3_state_t * statePtr,
XXH64_hash_t seed )
+
+ +

Resets an XXH3_state_t with 64-bit seed to begin a new hash.

+
Parameters
+ + + +
statePtrThe state struct to reset.
seedThe 64-bit seed to alter the hash result predictably.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
+
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_64bits_reset_withSecret()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_64bits_reset_withSecret (XXH3_state_t * statePtr,
const void * secret,
size_t secretSize )
+
+ +

Resets an XXH3_state_t with secret data to begin a new hash.

+
Parameters
+ + + + +
statePtrThe state struct to reset.
secretThe secret data.
secretSizeThe length of secret, in bytes.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
secret is referenced, it must outlive the hash streaming session.
+

Similar to one-shot API, secretSize must be >= XXH3_SECRET_SIZE_MIN, and the quality of produced hash values depends on secret's entropy (secret's content should look like a bunch of random bytes). When in doubt about the randomness of a candidate secret, consider employing XXH3_generateSecret() instead (see below).

+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_64bits_update()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_64bits_update (XXH3_state_t * statePtr,
const void * input,
size_t length )
+
+ +

Consumes a block of input to an XXH3_state_t.

+
Parameters
+ + + + +
statePtrThe state struct to update.
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
+
+
+
Precondition
statePtr must not be NULL.
+
+The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
Call this to incrementally consume blocks of data.
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_64bits_digest()

+ +
+
+ + + + + + + +
XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t * statePtr)
+
+ +

Returns the calculated XXH3 64-bit hash value from an XXH3_state_t.

+
Parameters
+ + +
statePtrThe state struct to calculate the hash from.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
The calculated XXH3 64-bit hash value from that state.
+
Note
Calling XXH3_64bits_digest() will not affect statePtr, so you can update, digest, and update again.
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_128bits()

+ +
+
+ + + + + + + + + + + +
XXH128_hash_t XXH3_128bits (const void * data,
size_t len )
+
+ +

Calculates 128-bit unseeded variant of XXH3 of data.

+
Parameters
+ + + +
dataThe block of data to be hashed, at least length bytes in size.
lenThe length of data, in bytes.
+
+
+
Returns
The calculated 128-bit variant of XXH3 value.
+

The 128-bit variant of XXH3 has more strength, but it has a bit of overhead for shorter inputs.

+

This is equivalent to XXH3_128bits_withSeed() with a seed of 0, however it may have slightly better performance due to constant propagation of the defaults.

+
See also
XXH3_128bits_withSeed(), XXH3_128bits_withSecret(): other seeding variants
+
+Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_128bits_withSeed()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH128_hash_t XXH3_128bits_withSeed (const void * data,
size_t len,
XXH64_hash_t seed )
+
+ +

Calculates 128-bit seeded variant of XXH3 hash of data.

+
Parameters
+ + + + +
dataThe block of data to be hashed, at least length bytes in size.
lenThe length of data, in bytes.
seedThe 64-bit seed to alter the hash result predictably.
+
+
+
Returns
The calculated 128-bit variant of XXH3 value.
+
Note
seed == 0 produces the same results as XXH3_64bits().
+

This variant generates a custom secret on the fly based on default secret altered using the seed value.

+

While this operation is decently fast, note that it's not completely free.

+
See also
XXH3_128bits(), XXH3_128bits_withSecret(): other seeding variants
+
+Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_128bits_withSecret()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
XXH128_hash_t XXH3_128bits_withSecret (const void * data,
size_t len,
const void * secret,
size_t secretSize )
+
+ +

Calculates 128-bit variant of XXH3 with a custom "secret".

+
Parameters
+ + + + + +
dataThe block of data to be hashed, at least len bytes in size.
lenThe length of data, in bytes.
secretThe secret data.
secretSizeThe length of secret, in bytes.
+
+
+
Returns
The calculated 128-bit variant of XXH3 value.
+

It's possible to provide any blob of bytes as a "secret" to generate the hash. This makes it more difficult for an external actor to prepare an intentional collision. The main condition is that secretSize must be large enough (>= XXH3_SECRET_SIZE_MIN). However, the quality of the secret impacts the dispersion of the hash algorithm. Therefore, the secret must look like a bunch of random bytes. Avoid "trivial" or structured data such as repeated sequences or a text document. Whenever in doubt about the "randomness" of the blob of bytes, consider employing XXH3_generateSecret() instead (see below). It will generate a proper high entropy secret derived from the blob of bytes. Another advantage of using XXH3_generateSecret() is that it guarantees that all bits within the initial blob of bytes will impact every bit of the output. This is not necessarily the case when using the blob of bytes directly because, when hashing small inputs, only a portion of the secret is employed.

+
See also
Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_128bits_reset()

+ +
+
+ + + + + + + +
XXH_errorcode XXH3_128bits_reset (XXH3_state_t * statePtr)
+
+ +

Resets an XXH3_state_t to begin a new hash.

+
Parameters
+ + +
statePtrThe state struct to reset.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
+
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_128bits_reset_withSeed()

+ +
+
+ + + + + + + + + + + +
XXH_errorcode XXH3_128bits_reset_withSeed (XXH3_state_t * statePtr,
XXH64_hash_t seed )
+
+ +

Resets an XXH3_state_t with 64-bit seed to begin a new hash.

+
Parameters
+ + + +
statePtrThe state struct to reset.
seedThe 64-bit seed to alter the hash result predictably.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
+
+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_128bits_reset_withSecret()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_128bits_reset_withSecret (XXH3_state_t * statePtr,
const void * secret,
size_t secretSize )
+
+ +

Resets an XXH3_state_t with secret data to begin a new hash.

+
Parameters
+ + + + +
statePtrThe state struct to reset.
secretThe secret data.
secretSizeThe length of secret, in bytes.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+

secret is referenced, it must outlive the hash streaming session. Similar to one-shot API, secretSize must be >= XXH3_SECRET_SIZE_MIN, and the quality of produced hash values depends on secret's entropy (secret's content should look like a bunch of random bytes). When in doubt about the randomness of a candidate secret, consider employing XXH3_generateSecret() instead (see below).

+
See also
Streaming Example
+ +
+
+ +

◆ XXH3_128bits_update()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_128bits_update (XXH3_state_t * statePtr,
const void * input,
size_t length )
+
+ +

Consumes a block of input to an XXH3_state_t.

+

Call this to incrementally consume blocks of data.

+
Parameters
+ + + + +
statePtrThe state struct to update.
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+ +
+
+ +

◆ XXH3_128bits_digest()

+ +
+
+ + + + + + + +
XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t * statePtr)
+
+ +

Returns the calculated XXH3 128-bit hash value from an XXH3_state_t.

+
Parameters
+ + +
statePtrThe state struct to calculate the hash from.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
The calculated XXH3 128-bit hash value from that state.
+
Note
Calling XXH3_128bits_digest() will not affect statePtr, so you can update, digest, and update again.
+ +
+
+ +

◆ XXH128_isEqual()

+ +
+
+ + + + + + + + + + + +
int XXH128_isEqual (XXH128_hash_t h1,
XXH128_hash_t h2 )
+
+ +

Check equality of two XXH128_hash_t values.

+
Parameters
+ + + +
h1The 128-bit hash value.
h2Another 128-bit hash value.
+
+
+
Returns
1 if h1 and h2 are equal.
+
+0 if they are not.
+ +
+
+ +

◆ XXH128_cmp()

+ +
+
+ + + + + + + + + + + +
int XXH128_cmp (const void * h128_1,
const void * h128_2 )
+
+ +

Compares two XXH128_hash_t.

+

This comparator is compatible with stdlib's qsort()/bsearch().

+
Parameters
+ + + +
h128_1Left-hand side value
h128_2Right-hand side value
+
+
+
Returns
>0 if h128_1 > h128_2
+
+=0 if h128_1 == h128_2
+
+<0 if h128_1 < h128_2
+ +
+
+ +

◆ XXH128_canonicalFromHash()

+ +
+
+ + + + + + + + + + + +
void XXH128_canonicalFromHash (XXH128_canonical_t * dst,
XXH128_hash_t hash )
+
+ +

Converts an XXH128_hash_t to a big endian XXH128_canonical_t.

+
Parameters
+ + + +
dstThe XXH128_canonical_t pointer to be stored to.
hashThe XXH128_hash_t to be converted.
+
+
+
Precondition
dst must not be NULL.
+
See also
Canonical Representation Example
+ +
+
+ +

◆ XXH128_hashFromCanonical()

+ +
+
+ + + + + + + +
XXH128_hash_t XXH128_hashFromCanonical (const XXH128_canonical_t * src)
+
+ +

Converts an XXH128_canonical_t to a native XXH128_hash_t.

+
Parameters
+ + +
srcThe XXH128_canonical_t to convert.
+
+
+
Precondition
src must not be NULL.
+
Returns
The converted hash.
+
See also
Canonical Representation Example
+ +
+
+ +

◆ XXH3_64bits_reset_withSecretandSeed()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_64bits_reset_withSecretandSeed (XXH3_state_t * statePtr,
const void * secret,
size_t secretSize,
XXH64_hash_t seed64 )
+
+ +

Resets an XXH3_state_t with secret data to begin a new hash.

+
Parameters
+ + + + + +
statePtrA pointer to an XXH3_state_t allocated with XXH3_createState().
secretThe secret data.
secretSizeThe length of secret, in bytes.
seed64The 64-bit seed to alter the hash result predictably.
+
+
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
See also
XXH3_64bits_withSecretandSeed(). Contract is identical.
+ +
+
+ +

◆ XXH3_128bits_withSecretandSeed()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
XXH128_hash_t XXH3_128bits_withSecretandSeed (const void * input,
size_t length,
const void * secret,
size_t secretSize,
XXH64_hash_t seed64 )
+
+ +

Calculates 128-bit seeded variant of XXH3 hash of data.

+
Parameters
+ + + + + + +
inputThe memory segment to be hashed, at least len bytes in size.
lengthThe length of data, in bytes.
secretThe secret used to alter hash result predictably.
secretSizeThe length of secret, in bytes (must be >= XXH3_SECRET_SIZE_MIN)
seed64The 64-bit seed to alter the hash result predictably.
+
+
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
See also
XXH3_64bits_withSecretandSeed(): contract is the same.
+ +
+
+ +

◆ XXH128()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH128_hash_t XXH128 (const void * data,
size_t len,
XXH64_hash_t seed )
+
+ +

Calculates the 128-bit hash of data using XXH3.

+
Parameters
+ + + + +
dataThe block of data to be hashed, at least len bytes in size.
lenThe length of data, in bytes.
seedThe 64-bit seed to alter the hash's output predictably.
+
+
+
Precondition
The memory between data and data + len must be valid, readable, contiguous memory. However, if len is 0, data may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
The calculated 128-bit XXH3 value.
+
See also
Single Shot Example for an example.
+ +
+
+ +

◆ XXH3_128bits_reset_withSecretandSeed()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_128bits_reset_withSecretandSeed (XXH3_state_t * statePtr,
const void * secret,
size_t secretSize,
XXH64_hash_t seed64 )
+
+ +

Resets an XXH3_state_t with secret data to begin a new hash.

+
Parameters
+ + + + + +
statePtrA pointer to an XXH3_state_t allocated with XXH3_createState().
secretThe secret data.
secretSizeThe length of secret, in bytes.
seed64The 64-bit seed to alter the hash result predictably.
+
+
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
See also
XXH3_64bits_withSecretandSeed(). Contract is identical.
+

Note: there was a bug in an earlier version of this function (<= v0.8.2) that would make it generate an incorrect hash value when seed == 0 and length < XXH3_MIDSIZE_MAX and secret is different from XXH3_generateSecret_fromSeed(). As stated in the contract, the correct hash result must be the same as XXH3_128bits_withSeed() when length <= XXH3_MIDSIZE_MAX. Results generated by this older version are wrong, hence not comparable.

+ +
+
+ +

◆ XXH3_generateSecret()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
XXH_errorcode XXH3_generateSecret (void * secretBuffer,
size_t secretSize,
const void * customSeed,
size_t customSeedSize )
+
+ +

Derive a high-entropy secret from any user-defined content, named customSeed.

+
Parameters
+ + + + + +
secretBufferA writable buffer for derived high-entropy secret data.
secretSizeSize of secretBuffer, in bytes. Must be >= XXH3_SECRET_SIZE_MIN.
customSeedA user-defined content.
customSeedSizeSize of customSeed, in bytes.
+
+
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+

The generated secret can be used in combination with *_withSecret() functions. The _withSecret() variants are useful to provide a higher level of protection than 64-bit seed, as it becomes much more difficult for an external actor to guess how to impact the calculation logic.

+

The function accepts as input a custom seed of any length and any content, and derives from it a high-entropy secret of length secretSize into an already allocated buffer secretBuffer.

+

The generated secret can then be used with any *_withSecret() variant. The functions XXH3_128bits_withSecret(), XXH3_64bits_withSecret(), XXH3_128bits_reset_withSecret() and XXH3_64bits_reset_withSecret() are part of this list. They all accept a secret parameter which must be large enough for implementation reasons (>= XXH3_SECRET_SIZE_MIN) and feature very high entropy (consist of random-looking bytes). These conditions can be a high bar to meet, so XXH3_generateSecret() can be employed to ensure proper quality.

+

customSeed can be anything. It can have any size, even small ones, and its content can be anything, even "poor entropy" sources such as a bunch of zeroes. The resulting secret will nonetheless provide all required qualities.

+
Precondition
    +
  • secretSize must be >= XXH3_SECRET_SIZE_MIN
  • +
  • When customSeedSize > 0, supplying NULL as customSeed is undefined behavior.
  • +
+
+

Example code:

#include <stdio.h>
+
#include <stdlib.h>
+
#include <string.h>
+
#define XXH_STATIC_LINKING_ONLY // expose unstable API
+
#include "xxhash.h"
+
// Hashes argv[2] using the entropy from argv[1].
+
int main(int argc, char* argv[])
+
{
+
char secret[XXH3_SECRET_SIZE_MIN];
+
if (argv != 3) { return 1; }
+
XXH3_generateSecret(secret, sizeof(secret), argv[1], strlen(argv[1]));
+ +
argv[2], strlen(argv[2]),
+
secret, sizeof(secret)
+
);
+
printf("%016llx\n", (unsigned long long) h);
+
}
+
XXH_errorcode XXH3_generateSecret(void *secretBuffer, size_t secretSize, const void *customSeed, size_t customSeedSize)
Derive a high-entropy secret from any user-defined content, named customSeed.
Definition xxhash.h:7242
+
XXH64_hash_t XXH3_64bits_withSecret(const void *data, size_t len, const void *secret, size_t secretSize)
Calculates 64-bit variant of XXH3 with a custom "secret".
Definition xxhash.h:6270
+
#define XXH3_SECRET_SIZE_MIN
Definition xxhash.h:1192
+
uint64_t XXH64_hash_t
An unsigned 64-bit integer.
Definition xxhash.h:866
+ +
+
+
+ +

◆ XXH3_generateSecret_fromSeed()

+ +
+
+ + + + + + + + + + + +
void XXH3_generateSecret_fromSeed (void * secretBuffer,
XXH64_hash_t seed )
+
+ +

Generate the same secret as the _withSeed() variants.

+
Parameters
+ + + +
secretBufferA writable buffer of XXH3_SECRET_DEFAULT_SIZE bytes
seedThe 64-bit seed to alter the hash result predictably.
+
+
+

The generated secret can be used in combination with *_withSecret() and _withSecretandSeed() variants.

+

Example C++ std::string hash class:

#include <string>
+
#define XXH_STATIC_LINKING_ONLY // expose unstable API
+
#include "xxhash.h"
+
// Slow, seeds each time
+
class HashSlow {
+ +
public:
+
HashSlow(XXH64_hash_t s) : seed{s} {}
+
size_t operator()(const std::string& x) const {
+
return size_t{XXH3_64bits_withSeed(x.c_str(), x.length(), seed)};
+
}
+
};
+
// Fast, caches the seeded secret for future uses.
+
class HashFast {
+
unsigned char secret[XXH3_SECRET_DEFAULT_SIZE];
+
public:
+
HashFast(XXH64_hash_t s) {
+ +
}
+
size_t operator()(const std::string& x) const {
+
return size_t{
+
XXH3_64bits_withSecret(x.c_str(), x.length(), secret, sizeof(secret))
+
};
+
}
+
};
+
void XXH3_generateSecret_fromSeed(void *secretBuffer, XXH64_hash_t seed)
Generate the same secret as the _withSeed() variants.
Definition xxhash.h:7287
+
XXH64_hash_t XXH3_64bits_withSeed(const void *input, size_t length, XXH64_hash_t seed)
Calculates 64-bit seeded variant of XXH3 hash of input.
Definition xxhash.h:6277
+
#define XXH3_SECRET_DEFAULT_SIZE
Default Secret's size.
Definition xxhash.h:1749
+
+
+
+
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h3__family.js b/doc/v0.8.3/group___x_x_h3__family.js new file mode 100644 index 00000000..9189b134 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h3__family.js @@ -0,0 +1,47 @@ +var group___x_x_h3__family = +[ + [ "XXH128_hash_t", "struct_x_x_h128__hash__t.html", [ + [ "low64", "struct_x_x_h128__hash__t.html#a706323c9b3e76414ec77f8f93e8644ef", null ], + [ "high64", "struct_x_x_h128__hash__t.html#ad4e0c851eb11bd3f8042ceebc15fe0a8", null ] + ] ], + [ "XXH128_canonical_t", "struct_x_x_h128__canonical__t.html", null ], + [ "XXH_SSE2", "group___x_x_h3__family.html#ga70e0a18d7c95a038b39d2e649e99d4ee", null ], + [ "XXH_AVX2", "group___x_x_h3__family.html#gaf47a10685143573ae686cb24a6b12180", null ], + [ "XXH_AVX512", "group___x_x_h3__family.html#gac99b74047afbf5d887014e8bd8a4311e", null ], + [ "XXH_NEON", "group___x_x_h3__family.html#ga1590a8c029aa95462b4d2f21d9e87222", null ], + [ "XXH_VSX", "group___x_x_h3__family.html#gaaf36dc5eae1c42626ae2fa18b752eac8", null ], + [ "XXH_SVE", "group___x_x_h3__family.html#ga76cb3b8fe2820051f6ded37fc0f78632", null ], + [ "XXH_LSX", "group___x_x_h3__family.html#ga0cf336b90e67afd4a6028a168d2036fc", null ], + [ "XXH_LASX", "group___x_x_h3__family.html#gae59e018cc7b8e2e7216c2ad95b682672", null ], + [ "XXH3_SECRET_SIZE_MIN", "group___x_x_h3__family.html#gaeb79a9111c58af32599f8e5cd71d67d2", null ], + [ "XXH3_state_t", "group___x_x_h3__family.html#ga8e454084a62efb09fad8ba3cc1c1b1d0", null ], + [ "XXH3_64bits", "group___x_x_h3__family.html#gacc4473b9d9953adcbfcc51b32cb887ef", null ], + [ "XXH3_64bits_withSeed", "group___x_x_h3__family.html#ga22b06ba82074a88f9c08c2dfa3808f80", null ], + [ "XXH3_64bits_withSecret", "group___x_x_h3__family.html#gac3b0a46f4a38befb3c8fa122f5d74dbb", null ], + [ "XXH3_createState", "group___x_x_h3__family.html#ga95592969a08becc37428dd547c36b8fd", null ], + [ "XXH3_freeState", "group___x_x_h3__family.html#gaee640ba2104fe3107b7d679f40d17277", null ], + [ "XXH3_copyState", "group___x_x_h3__family.html#gac35f35d7339f399121067c0f64f01c19", null ], + [ "XXH3_64bits_reset", "group___x_x_h3__family.html#gae178ffc944bf355c8f3ba8c283ce3120", null ], + [ "XXH3_64bits_reset_withSeed", "group___x_x_h3__family.html#ga8d1f6de09ac556d4564ede1e748583a6", null ], + [ "XXH3_64bits_reset_withSecret", "group___x_x_h3__family.html#ga952ac3a3662c76f749b9eaced7b9746a", null ], + [ "XXH3_64bits_update", "group___x_x_h3__family.html#gad4b1454f1650856029d09f75a919740f", null ], + [ "XXH3_64bits_digest", "group___x_x_h3__family.html#ga03116acd8c5308bee9cce4d111ad92bf", null ], + [ "XXH3_128bits", "group___x_x_h3__family.html#gaa519b24488e33bb208840d2ecfe8d8de", null ], + [ "XXH3_128bits_withSeed", "group___x_x_h3__family.html#ga2f4c55956ea9cc542340720549cbbcda", null ], + [ "XXH3_128bits_withSecret", "group___x_x_h3__family.html#gaa7f6e73421e0be9abd7181991ba8030f", null ], + [ "XXH3_128bits_reset", "group___x_x_h3__family.html#gab2560d6ad650073db0242473e7471ba5", null ], + [ "XXH3_128bits_reset_withSeed", "group___x_x_h3__family.html#ga98de207b208f2778a71795993501dc9c", null ], + [ "XXH3_128bits_reset_withSecret", "group___x_x_h3__family.html#gafc1994ce5b08edba1c742958bbe31d89", null ], + [ "XXH3_128bits_update", "group___x_x_h3__family.html#ga03531ff6ecf1292888de3290bb7d8ebe", null ], + [ "XXH3_128bits_digest", "group___x_x_h3__family.html#ga9437c17a93a8b34c8e2fdfc992d260e9", null ], + [ "XXH128_isEqual", "group___x_x_h3__family.html#gae48a69e41062619715826660580d42ab", null ], + [ "XXH128_cmp", "group___x_x_h3__family.html#ga2965cb06dc0d14752d72c30b9f9b56cf", null ], + [ "XXH128_canonicalFromHash", "group___x_x_h3__family.html#ga0eb1c6f5085bc5f354f2aac4971ffcb2", null ], + [ "XXH128_hashFromCanonical", "group___x_x_h3__family.html#gabac9bd8cff275f3b862cd5a7e9045818", null ], + [ "XXH3_64bits_reset_withSecretandSeed", "group___x_x_h3__family.html#ga6eac2cf5c3615c358acf210890bdb621", null ], + [ "XXH3_128bits_withSecretandSeed", "group___x_x_h3__family.html#gadd6e3be42f33f56f199777141b94604d", null ], + [ "XXH128", "group___x_x_h3__family.html#ga334e014be8252d34f39e6496d0379e13", null ], + [ "XXH3_128bits_reset_withSecretandSeed", "group___x_x_h3__family.html#gaad850da62eb1bcf23f8a09f7c95d11c0", null ], + [ "XXH3_generateSecret", "group___x_x_h3__family.html#ga4be9a95a2e7b7252d6f4a6e4f651ac42", null ], + [ "XXH3_generateSecret_fromSeed", "group___x_x_h3__family.html#ga0888d6959efe3982fcafe516c22ef5a8", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group___x_x_h3__impl.html b/doc/v0.8.3/group___x_x_h3__impl.html new file mode 100644 index 00000000..b74bfae9 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h3__impl.html @@ -0,0 +1,642 @@ + + + + + + + +xxHash: XXH3 implementation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
XXH3 implementation
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define XXH_likely(x)
 
#define XXH_unlikely(x)
 
#define XXH_HAS_INCLUDE(x)
 
+#define XXH_SEC_ALIGN   XXH_ACC_ALIGN
 
+#define XXH_ALIASING   /* nothing */
 
+#define XXH_VSX_BE   0
 
#define ACCRND(acc, offset)
 
#define XXH_PREFETCH(ptr)
 
+#define XXH_SECRET_DEFAULT_SIZE   192 /* minimum XXH3_SECRET_SIZE_MIN */
 
+#define XXH_STRIPE_LEN   64
 
+#define XXH_SECRET_CONSUME_RATE   8 /* nb of secret bytes consumed at each accumulation */
 
+#define XXH_ACC_NB   (XXH_STRIPE_LEN / sizeof(xxh_u64))
 
+#define XXH_PREFETCH_DIST   512
 
#define XXH3_ACCUMULATE_TEMPLATE(name)
 
#define _LSX_SHUFFLE(z, y, x, w)
 
#define _LASX_SHUFFLE(z, y, x, w)
 
+#define XXH3_accumulate_512   XXH3_accumulate_512_avx512
 
+#define XXH3_accumulate   XXH3_accumulate_avx512
 
+#define XXH3_scrambleAcc   XXH3_scrambleAcc_avx512
 
+#define XXH3_initCustomSecret   XXH3_initCustomSecret_avx512
 
+#define XXH_SECRET_MERGEACCS_START   11
 
#define XXH3_INIT_ACC
 
+#define XXH3_STREAM_USE_STACK   1
 
#define XXH_MIN(x, y)
 
+ + + + + + + + + + + + + + + + + + + + + +

+Typedefs

+typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING
 
+typedef __vector unsigned long long xxh_u64x2
 
+typedef __vector unsigned char xxh_u8x16
 
+typedef __vector unsigned xxh_u32x4
 
+typedef long long xxh_i64
 
+typedef void(* XXH3_f_accumulate) (xxh_u64 *restrict, const xxh_u8 *restrict, const xxh_u8 *restrict, size_t)
 
+typedef void(* XXH3_f_scrambleAcc) (void *restrict, const void *)
 
+typedef void(* XXH3_f_initCustomSecret) (void *restrict, xxh_u64)
 
+typedef XXH64_hash_t(* XXH3_hashLong64_f) (const void *restrict, size_t, XXH64_hash_t, const xxh_u8 *restrict, size_t)
 
+typedef XXH128_hash_t(* XXH3_hashLong128_f) (const void *restrict, size_t, XXH64_hash_t, const void *restrict, size_t)
 
+ + + + + + + + + + + + + + + + +

+Functions

XXH_STATIC_ASSERT (XXH_STRIPE_LEN==sizeof(__m512i))
 
for (i=0;i< XXH_STRIPE_LEN/sizeof(__m256i);i++)
 
XXH_ASSERT ((((size_t) acc) &(XXH_ACC_ALIGN-1))==0)
 
XXH_ASSERT (lane< XXH_ACC_NB)
 
+XXH3_WITH_SECRET_INLINE XXH64_hash_t XXH3_hashLong_64b_withSecret (const void *restrict input, size_t len, XXH64_hash_t seed64, const xxh_u8 *restrict secret, size_t secretLen)
 
XXH64_hash_t XXH3_64bits_withSecretandSeed (const void *data, size_t len, const void *secret, size_t secretSize, XXH64_hash_t seed)
 Calculates 64/128-bit seeded variant of XXH3 hash of data.
 
+XXH3_WITH_SECRET_INLINE XXH128_hash_t XXH3_hashLong_128b_withSecret (const void *restrict input, size_t len, XXH64_hash_t seed64, const void *restrict secret, size_t secretLen)
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

static XXH_TARGET_AVX512 const void *restrict secret
 
+const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1)
 
+__m512i const acc_vec = *xacc
 
+__m512i const shifted = _mm512_srli_epi64 (acc_vec, 47)
 
+__m512i const key_vec = _mm512_loadu_si512 (secret)
 
+__m512i const data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 )
 
+__m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32)
 
+__m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32)
 
+__m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32)
 
+* xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32))
 
+const __m256i *const xsecret = (const __m256i *) secret
 
+size_t i
 
+uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1)
 
+uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32))
 
+xxh_u64x2 const v32 = { 32, 32 }
 
+xxh_u64x2 const v47 = { 47, 47 }
 
+xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 }
 
static void const *restrict size_t lane
 
+xxh_u64 acc64 = xacc[lane]
 
+

Detailed Description

+

Macro Definition Documentation

+ +

◆ XXH_likely

+ +
+
+ + + + + + + +
#define XXH_likely( x)
+
+Value:
(x)
+
+
+
+ +

◆ XXH_unlikely

+ +
+
+ + + + + + + +
#define XXH_unlikely( x)
+
+Value:
(x)
+
+
+
+ +

◆ XXH_HAS_INCLUDE

+ +
+
+ + + + + + + +
#define XXH_HAS_INCLUDE( x)
+
+Value:
0
+
+
+
+ +

◆ ACCRND

+ +
+
+ + + + + + + + + + + +
#define ACCRND( acc,
offset )
+
+Value:
do { \
+
svuint64_t input_vec = svld1_u64(mask, xinput + offset); \
+
svuint64_t secret_vec = svld1_u64(mask, xsecret + offset); \
+
svuint64_t mixed = sveor_u64_x(mask, secret_vec, input_vec); \
+
svuint64_t swapped = svtbl_u64(input_vec, kSwap); \
+
svuint64_t mixed_lo = svextw_u64_x(mask, mixed); \
+
svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32); \
+
svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \
+
acc = svadd_u64_x(mask, acc, mul); \
+
} while (0)
+
+
+
+ +

◆ XXH_PREFETCH

+ +
+
+ + + + + + + +
#define XXH_PREFETCH( ptr)
+
+Value:
(void)(ptr) /* disabled */
+
+
+
+ +

◆ XXH3_ACCUMULATE_TEMPLATE

+ +
+
+ + + + + + + +
#define XXH3_ACCUMULATE_TEMPLATE( name)
+
+Value:
void \
+
XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \
+
const xxh_u8* XXH_RESTRICT input, \
+
const xxh_u8* XXH_RESTRICT secret, \
+
size_t nbStripes) \
+
{ \
+
size_t n; \
+
for (n = 0; n < nbStripes; n++ ) { \
+
const xxh_u8* const in = input + n*XXH_STRIPE_LEN; \
+
XXH_PREFETCH(in + XXH_PREFETCH_DIST); \
+
XXH3_accumulate_512_##name( \
+
acc, \
+
in, \
+
secret + n*XXH_SECRET_CONSUME_RATE); \
+
} \
+
}
+
+
+
+ +

◆ _LSX_SHUFFLE

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
#define _LSX_SHUFFLE( z,
y,
x,
w )
+
+Value:
(((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
+
+
+
+ +

◆ _LASX_SHUFFLE

+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
#define _LASX_SHUFFLE( z,
y,
x,
w )
+
+Value:
(((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
+
+
+
+ +

◆ XXH3_INIT_ACC

+ +
+
+ + + + +
#define XXH3_INIT_ACC
+
+Value:
+ +
#define XXH_PRIME32_2
Definition xxhash.h:2907
+
#define XXH_PRIME32_1
Definition xxhash.h:2906
+
#define XXH_PRIME32_3
Definition xxhash.h:2908
+
#define XXH_PRIME64_1
Definition xxhash.h:3457
+
#define XXH_PRIME64_2
Definition xxhash.h:3458
+
#define XXH_PRIME64_4
Definition xxhash.h:3460
+
#define XXH_PRIME64_3
Definition xxhash.h:3459
+
#define XXH_PRIME64_5
Definition xxhash.h:3461
+
+
+
+ +

◆ XXH_MIN

+ +
+
+ + + + + + + + + + + +
#define XXH_MIN( x,
y )
+
+Value:
(((x) > (y)) ? (y) : (x))
+
+
+
+

Function Documentation

+ +

◆ XXH3_64bits_withSecretandSeed()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
XXH64_hash_t XXH3_64bits_withSecretandSeed (const void * data,
size_t len,
const void * secret,
size_t secretSize,
XXH64_hash_t seed )
+
+ +

Calculates 64/128-bit seeded variant of XXH3 hash of data.

+
Parameters
+ + + + + + +
dataThe block of data to be hashed, at least len bytes in size.
lenThe length of data, in bytes.
secretThe secret data.
secretSizeThe length of secret, in bytes.
seedThe 64-bit seed to alter the hash result predictably.
+
+
+

These variants generate hash values using either:

+

This generally benefits speed, compared to _withSeed() or _withSecret(). _withSeed() has to generate the secret on the fly for "large" keys. It's fast, but can be perceptible for "not so large" keys (< 1 KB). _withSecret() has to generate the masks on the fly for "small" keys, which requires more instructions than _withSeed() variants. Therefore, _withSecretandSeed variant combines the best of both worlds.

+

When secret has been generated by XXH3_generateSecret_fromSeed(), this variant produces exactly the same results as _withSeed() variant, hence offering only a pure speed benefit on "large" input, by skipping the need to regenerate the secret for every large input.

+

Another usage scenario is to hash the secret to a 64-bit hash value, for example with XXH3_64bits(), which then becomes the seed, and then employ both the seed and the secret in _withSecretandSeed(). On top of speed, an added benefit is that each bit in the secret has a 50% chance to swap each bit in the output, via its impact to the seed.

+

This is not guaranteed when using the secret directly in "small data" scenarios, because only portions of the secret are employed for small data.

+ +
+
+

Variable Documentation

+ +

◆ secret

+ +
+
+ + + + +
static void const *restrict secret
+
+Initial value:
{
+
XXH_ASSERT((((size_t)acc) & 63) == 0)
+
+
+
+ +

◆ lane

+ +
+
+ + + + +
void const* restrict size_t lane
+
+Initial value:
{
+
xxh_u64* const xacc = (xxh_u64*) acc
+
+
+
+
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h3__impl.js b/doc/v0.8.3/group___x_x_h3__impl.js new file mode 100644 index 00000000..532eadc1 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h3__impl.js @@ -0,0 +1,4 @@ +var group___x_x_h3__impl = +[ + [ "XXH3_64bits_withSecretandSeed", "group___x_x_h3__impl.html#ga7c61723080fb6c64f186c419832d5521", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group___x_x_h64__family.html b/doc/v0.8.3/group___x_x_h64__family.html new file mode 100644 index 00000000..c7d03b4d --- /dev/null +++ b/doc/v0.8.3/group___x_x_h64__family.html @@ -0,0 +1,480 @@ + + + + + + + +xxHash: XXH64 family + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
XXH64 family
+
+
+ + + + + +

+Data Structures

struct  XXH64_canonical_t
 Canonical (big endian) representation of XXH64_hash_t. More...
 
+ + + + +

+Typedefs

typedef struct XXH64_state_s XXH64_state_t
 The opaque state struct for the XXH64 streaming API.
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

XXH64_hash_t XXH64 (const void *input, size_t length, XXH64_hash_t seed)
 Calculates the 64-bit hash of input using xxHash64.
 
XXH64_state_tXXH64_createState (void)
 Allocates an XXH64_state_t.
 
XXH_errorcode XXH64_freeState (XXH64_state_t *statePtr)
 Frees an XXH64_state_t.
 
void XXH64_copyState (XXH64_state_t *dst_state, const XXH64_state_t *src_state)
 Copies one XXH64_state_t to another.
 
XXH_errorcode XXH64_reset (XXH64_state_t *statePtr, XXH64_hash_t seed)
 Resets an XXH64_state_t to begin a new hash.
 
XXH_errorcode XXH64_update (XXH64_state_t *statePtr, const void *input, size_t length)
 Consumes a block of input to an XXH64_state_t.
 
XXH64_hash_t XXH64_digest (const XXH64_state_t *statePtr)
 Returns the calculated hash value from an XXH64_state_t.
 
void XXH64_canonicalFromHash (XXH64_canonical_t *dst, XXH64_hash_t hash)
 Converts an XXH64_hash_t to a big endian XXH64_canonical_t.
 
XXH64_hash_t XXH64_hashFromCanonical (const XXH64_canonical_t *src)
 Converts an XXH64_canonical_t to a native XXH64_hash_t.
 
+

Detailed Description

+

Contains functions used in the classic 64-bit xxHash algorithm.

+
Note
XXH3 provides competitive speed for both 32-bit and 64-bit systems, and offers true 64/128 bit hash results. It provides better speed for systems with vector processing capabilities.
+

Typedef Documentation

+ +

◆ XXH64_state_t

+ +
+
+ + + + +
typedef struct XXH64_state_s XXH64_state_t
+
+ +

The opaque state struct for the XXH64 streaming API.

+
See also
XXH64_state_s for details.
+
+Streaming Example
+ +
+
+

Function Documentation

+ +

◆ XXH64()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH64_hash_t XXH64 (const void * input,
size_t length,
XXH64_hash_t seed )
+
+ +

Calculates the 64-bit hash of input using xxHash64.

+
Parameters
+ + + + +
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
seedThe 64-bit seed to alter the hash's output predictably.
+
+
+
Precondition
The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
The calculated 64-bit xxHash64 value.
+
See also
Single Shot Example for an example.
+ +
+
+ +

◆ XXH64_createState()

+ +
+
+ + + + + + + +
XXH64_state_t * XXH64_createState (void )
+
+ +

Allocates an XXH64_state_t.

+
Returns
An allocated pointer of XXH64_state_t on success.
+
+NULL on failure.
+
Note
Must be freed with XXH64_freeState().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH64_freeState()

+ +
+
+ + + + + + + +
XXH_errorcode XXH64_freeState (XXH64_state_t * statePtr)
+
+ +

Frees an XXH64_state_t.

+
Parameters
+ + +
statePtrA pointer to an XXH64_state_t allocated with XXH64_createState().
+
+
+
Returns
XXH_OK.
+
Note
statePtr must be allocated with XXH64_createState().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH64_copyState()

+ +
+
+ + + + + + + + + + + +
void XXH64_copyState (XXH64_state_t * dst_state,
const XXH64_state_t * src_state )
+
+ +

Copies one XXH64_state_t to another.

+
Parameters
+ + + +
dst_stateThe state to copy to.
src_stateThe state to copy from.
+
+
+
Precondition
dst_state and src_state must not be NULL and must not overlap.
+ +
+
+ +

◆ XXH64_reset()

+ +
+
+ + + + + + + + + + + +
XXH_errorcode XXH64_reset (XXH64_state_t * statePtr,
XXH64_hash_t seed )
+
+ +

Resets an XXH64_state_t to begin a new hash.

+
Parameters
+ + + +
statePtrThe state struct to reset.
seedThe 64-bit seed to alter the hash result predictably.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
This function resets and seeds a state. Call it before XXH64_update().
+
See also
Streaming Example
+ +
+
+ +

◆ XXH64_update()

+ +
+
+ + + + + + + + + + + + + + + + +
XXH_errorcode XXH64_update (XXH64_state_t * statePtr,
const void * input,
size_t length )
+
+ +

Consumes a block of input to an XXH64_state_t.

+
Parameters
+ + + + +
statePtrThe state struct to update.
inputThe block of data to be hashed, at least length bytes in size.
lengthThe length of input, in bytes.
+
+
+
Precondition
statePtr must not be NULL.
+
+The memory between input and input + length must be valid, readable, contiguous memory. However, if length is 0, input may be NULL. In C++, this also must be TriviallyCopyable.
+
Returns
XXH_OK on success.
+
+XXH_ERROR on failure.
+
Note
Call this to incrementally consume blocks of data.
+
See also
Streaming Example
+ +
+
+ +

◆ XXH64_digest()

+ +
+
+ + + + + + + +
XXH64_hash_t XXH64_digest (const XXH64_state_t * statePtr)
+
+ +

Returns the calculated hash value from an XXH64_state_t.

+
Parameters
+ + +
statePtrThe state struct to calculate the hash from.
+
+
+
Precondition
statePtr must not be NULL.
+
Returns
The calculated 64-bit xxHash64 value from that state.
+
Note
Calling XXH64_digest() will not affect statePtr, so you can update, digest, and update again.
+
See also
Streaming Example
+ +
+
+ +

◆ XXH64_canonicalFromHash()

+ +
+
+ + + + + + + + + + + +
void XXH64_canonicalFromHash (XXH64_canonical_t * dst,
XXH64_hash_t hash )
+
+ +

Converts an XXH64_hash_t to a big endian XXH64_canonical_t.

+
Parameters
+ + + +
dstThe XXH64_canonical_t pointer to be stored to.
hashThe XXH64_hash_t to be converted.
+
+
+
Precondition
dst must not be NULL.
+
See also
Canonical Representation Example
+ +
+
+ +

◆ XXH64_hashFromCanonical()

+ +
+
+ + + + + + + +
XXH64_hash_t XXH64_hashFromCanonical (const XXH64_canonical_t * src)
+
+ +

Converts an XXH64_canonical_t to a native XXH64_hash_t.

+
Parameters
+ + +
srcThe XXH64_canonical_t to convert.
+
+
+
Precondition
src must not be NULL.
+
Returns
The converted hash.
+
See also
Canonical Representation Example
+ +
+
+
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h64__family.js b/doc/v0.8.3/group___x_x_h64__family.js new file mode 100644 index 00000000..bf89e5d9 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h64__family.js @@ -0,0 +1,14 @@ +var group___x_x_h64__family = +[ + [ "XXH64_canonical_t", "struct_x_x_h64__canonical__t.html", null ], + [ "XXH64_state_t", "group___x_x_h64__family.html#ga0702bdbc80b0cf9e94f2379f7d839b8c", null ], + [ "XXH64", "group___x_x_h64__family.html#ga9651d864dea7e0755ae3935bf6bf7082", null ], + [ "XXH64_createState", "group___x_x_h64__family.html#gadcfc7fb0e3382dc0b13afb125a0fea5c", null ], + [ "XXH64_freeState", "group___x_x_h64__family.html#gac03f9ec46a29db6f6a999c832cf759de", null ], + [ "XXH64_copyState", "group___x_x_h64__family.html#ga3088b416eee8dcdb09804f722535761e", null ], + [ "XXH64_reset", "group___x_x_h64__family.html#gafa0153665b1194c656dce7c29c0193c5", null ], + [ "XXH64_update", "group___x_x_h64__family.html#gaeffe8da4eab0d74a741548bb7c895619", null ], + [ "XXH64_digest", "group___x_x_h64__family.html#gaf5c7d2afed088ede4ff37fa6b6a02412", null ], + [ "XXH64_canonicalFromHash", "group___x_x_h64__family.html#ga1b88114ccd49685ab9acf02aabbbdd7b", null ], + [ "XXH64_hashFromCanonical", "group___x_x_h64__family.html#ga8f1b5423301ea5ebbd9e4e01681446e9", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group___x_x_h64__impl.html b/doc/v0.8.3/group___x_x_h64__impl.html new file mode 100644 index 00000000..7df138bf --- /dev/null +++ b/doc/v0.8.3/group___x_x_h64__impl.html @@ -0,0 +1,239 @@ + + + + + + + +xxHash: XXH64 implementation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
XXH64 implementation
+
+
+ + + + + + + + + + + + + + +

+Macros

#define XXH_PRIME64_1   0x9E3779B185EBCA87ULL
 
#define XXH_PRIME64_2   0xC2B2AE3D27D4EB4FULL
 
#define XXH_PRIME64_3   0x165667B19E3779F9ULL
 
#define XXH_PRIME64_4   0x85EBCA77C2B2AE63ULL
 
#define XXH_PRIME64_5   0x27D4EB2F165667C5ULL
 
#define XXH_get64bits(p)
 
+ + + +

+Functions

+XXH_STATIC xxh_u64 XXH64_finalize (xxh_u64 hash, const xxh_u8 *ptr, size_t len, XXH_alignment align)
 
+

Detailed Description

+

Details on the XXH64 implementation.

+

Macro Definition Documentation

+ +

◆ XXH_PRIME64_1

+ +
+
+ + + + +
#define XXH_PRIME64_1   0x9E3779B185EBCA87ULL
+
+

0b1001111000110111011110011011000110000101111010111100101010000111

+ +
+
+ +

◆ XXH_PRIME64_2

+ +
+
+ + + + +
#define XXH_PRIME64_2   0xC2B2AE3D27D4EB4FULL
+
+

0b1100001010110010101011100011110100100111110101001110101101001111

+ +
+
+ +

◆ XXH_PRIME64_3

+ +
+
+ + + + +
#define XXH_PRIME64_3   0x165667B19E3779F9ULL
+
+

0b0001011001010110011001111011000110011110001101110111100111111001

+ +
+
+ +

◆ XXH_PRIME64_4

+ +
+
+ + + + +
#define XXH_PRIME64_4   0x85EBCA77C2B2AE63ULL
+
+

0b1000010111101011110010100111011111000010101100101010111001100011

+ +
+
+ +

◆ XXH_PRIME64_5

+ +
+
+ + + + +
#define XXH_PRIME64_5   0x27D4EB2F165667C5ULL
+
+

0b0010011111010100111010110010111100010110010101100110011111000101

+ +
+
+ +

◆ XXH_get64bits

+ +
+
+ + + + + + + +
#define XXH_get64bits( p)
+
+Value:
XXH_readLE64_align(p, align)
+
+
+
+
+
+ + + + diff --git a/doc/v0.8.3/group___x_x_h64__impl.js b/doc/v0.8.3/group___x_x_h64__impl.js new file mode 100644 index 00000000..5de05609 --- /dev/null +++ b/doc/v0.8.3/group___x_x_h64__impl.js @@ -0,0 +1,8 @@ +var group___x_x_h64__impl = +[ + [ "XXH_PRIME64_1", "group___x_x_h64__impl.html#ga20651a9ad53cae6f0a4feb1393d5a716", null ], + [ "XXH_PRIME64_2", "group___x_x_h64__impl.html#ga33a01ca165b68cef76da009a54e3ba54", null ], + [ "XXH_PRIME64_3", "group___x_x_h64__impl.html#gad18b925ab3b4ad25ae26eb4fb00ebcb8", null ], + [ "XXH_PRIME64_4", "group___x_x_h64__impl.html#ga6326d9c3883242a3b5602fae1507afc5", null ], + [ "XXH_PRIME64_5", "group___x_x_h64__impl.html#gae44b2a496b0a4184699e7d11ec2d70c6", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group__dispatch.html b/doc/v0.8.3/group__dispatch.html new file mode 100644 index 00000000..5d49ca69 --- /dev/null +++ b/doc/v0.8.3/group__dispatch.html @@ -0,0 +1,230 @@ + + + + + + + +xxHash: x86 Dispatcher + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
x86 Dispatcher
+
+
+ + + + + + + + + + + + + + + + + + + + +

+Macros

#define XXH_DISPATCH_SCALAR   1
 Enables/dispatching the scalar code path.
 
#define XXH_DISPATCH_AVX2   0
 Enables/disables dispatching for AVX2.
 
#define XXH_DISPATCH_AVX512   0
 Enables/disables dispatching for AVX512.
 
#define XXH_TARGET_SSE2   /* disable attribute target */
 Allows a function to be compiled with SSE2 intrinsics.
 
+#define XXH_TARGET_AVX2   /* disable attribute target */
 Like XXH_TARGET_SSE2, but for AVX2.
 
+#define XXH_TARGET_AVX512   /* disable attribute target */
 Like XXH_TARGET_SSE2, but for AVX512.
 
+

Detailed Description

+

Macro Definition Documentation

+ +

◆ XXH_DISPATCH_SCALAR

+ +
+
+ + + + +
#define XXH_DISPATCH_SCALAR   1
+
+ +

Enables/dispatching the scalar code path.

+

If this is defined to 0, SSE2 support is assumed. This reduces code size when the scalar path is not needed.

+

This is automatically defined to 0 when...

    +
  • SSE2 support is enabled in the compiler
  • +
  • Targeting x86_64
  • +
  • Targeting Android x86
  • +
  • Targeting macOS
  • +
+ +
+
+ +

◆ XXH_DISPATCH_AVX2

+ +
+
+ + + + +
#define XXH_DISPATCH_AVX2   0
+
+ +

Enables/disables dispatching for AVX2.

+

This is automatically detected if it is not defined.

    +
  • GCC 4.7 and later are known to support AVX2, but >4.9 is required for to get the AVX2 intrinsics and typedefs without -mavx -mavx2.
  • +
  • Visual Studio 2013 Update 2 and later are known to support AVX2.
  • +
  • The GCC/Clang internal header <avx2intrin.h> is detected. While this is not allowed to be included directly, it still appears in the builtin include path and is detectable with __has_include.
  • +
+
See also
XXH_AVX2
+ +
+
+ +

◆ XXH_DISPATCH_AVX512

+ +
+
+ + + + +
#define XXH_DISPATCH_AVX512   0
+
+ +

Enables/disables dispatching for AVX512.

+

Automatically detected if one of the following conditions is met:

    +
  • GCC 4.9 and later are known to support AVX512.
  • +
  • Visual Studio 2017 and later are known to support AVX2.
  • +
  • The GCC/Clang internal header <avx512fintrin.h> is detected. While this is not allowed to be included directly, it still appears in the builtin include path and is detectable with __has_include.
  • +
+
See also
XXH_AVX512
+ +
+
+ +

◆ XXH_TARGET_SSE2

+ +
+
+ + + + +
#define XXH_TARGET_SSE2   /* disable attribute target */
+
+ +

Allows a function to be compiled with SSE2 intrinsics.

+

Uses __attribute__((__target__("sse2"))) on GCC to allow SSE2 to be used even with -mno-sse2.

+ +
+
+
+
+ + + + diff --git a/doc/v0.8.3/group__dispatch.js b/doc/v0.8.3/group__dispatch.js new file mode 100644 index 00000000..e58a9eb5 --- /dev/null +++ b/doc/v0.8.3/group__dispatch.js @@ -0,0 +1,9 @@ +var group__dispatch = +[ + [ "XXH_DISPATCH_SCALAR", "group__dispatch.html#gab81e416548f2b86412f670dc435a979b", null ], + [ "XXH_DISPATCH_AVX2", "group__dispatch.html#ga3f9ae9edb0b15907592a18f74996f523", null ], + [ "XXH_DISPATCH_AVX512", "group__dispatch.html#gae0ba94e5d5bf66251a96f86b3cd7e08a", null ], + [ "XXH_TARGET_SSE2", "group__dispatch.html#ga13e5de884479e06fa52a7cf484158e2e", null ], + [ "XXH_TARGET_AVX2", "group__dispatch.html#gad2a40b306e49c6e6240acd43484ed5e0", null ], + [ "XXH_TARGET_AVX512", "group__dispatch.html#ga94d06a353acaa62bbd9fbf65e865a282", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group__impl.html b/doc/v0.8.3/group__impl.html new file mode 100644 index 00000000..9201b599 --- /dev/null +++ b/doc/v0.8.3/group__impl.html @@ -0,0 +1,391 @@ + + + + + + + +xxHash: Implementation + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
Implementation
+
+
+ + + + + + + + +

+Topics

 XXH32 implementation
 
 XXH64 implementation
 
 XXH3 implementation
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define XXH_FORCE_INLINE   static
 
+#define XXH_NO_INLINE   static
 
+#define XXH_STATIC   static
 
+#define XXH3_WITH_SECRET_INLINE   XXH_NO_INLINE
 
+#define XXH_RESTRICT   /* disable */
 
#define XXH_ASSERT(c)
 
#define XXH_STATIC_ASSERT_WITH_MESSAGE(c, m)
 
#define XXH_STATIC_ASSERT(c)
 
#define XXH_COMPILER_GUARD(var)
 
#define XXH_COMPILER_GUARD_CLANG_NEON(var)
 
+#define XXH_GCC_VERSION   (__GNUC__ * 100 + __GNUC_MINOR__)
 
#define XXH_HAS_BUILTIN(x)
 
+#define XXH_UNREACHABLE()
 
#define XXH_ASSUME(c)
 
#define XXH_rotl32(x, r)
 
#define XXH_rotl64(x, r)
 
+ + + + + +

+Typedefs

+typedef unsigned char xxh_u8
 
+typedef XXH32_hash_t xxh_u32
 
+ + + + + +

+Enumerations

enum  XXH_alignment { XXH_aligned +, XXH_unaligned + }
 
+typedef XXH64_hash_t xxh_u64
 
+

Detailed Description

+

Macro Definition Documentation

+ +

◆ XXH_ASSERT

+ +
+
+ + + + + + + +
#define XXH_ASSERT( c)
+
+Value:
XXH_ASSUME(c)
+
+
+
+ +

◆ XXH_STATIC_ASSERT_WITH_MESSAGE

+ +
+
+ + + + + + + + + + + +
#define XXH_STATIC_ASSERT_WITH_MESSAGE( c,
m )
+
+Value:
do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0)
+
+
+
+ +

◆ XXH_STATIC_ASSERT

+ +
+
+ + + + + + + +
#define XXH_STATIC_ASSERT( c)
+
+Value:
XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)
+
+
+
+ +

◆ XXH_COMPILER_GUARD

+ +
+
+ + + + + + + +
#define XXH_COMPILER_GUARD( var)
+
+Value:
((void)0)
+
+
+
+ +

◆ XXH_COMPILER_GUARD_CLANG_NEON

+ +
+
+ + + + + + + +
#define XXH_COMPILER_GUARD_CLANG_NEON( var)
+
+Value:
((void)0)
+
+
+
+ +

◆ XXH_HAS_BUILTIN

+ +
+
+ + + + + + + +
#define XXH_HAS_BUILTIN( x)
+
+Value:
0
+
+
+
+ +

◆ XXH_ASSUME

+ +
+
+ + + + + + + +
#define XXH_ASSUME( c)
+
+Value:
if (!(c)) { XXH_UNREACHABLE(); }
+
+
+
+ +

◆ XXH_rotl32

+ +
+
+ + + + + + + + + + + +
#define XXH_rotl32( x,
r )
+
+Value:
(((x) << (r)) | ((x) >> (32 - (r))))
+
+
+
+ +

◆ XXH_rotl64

+ +
+
+ + + + + + + + + + + +
#define XXH_rotl64( x,
r )
+
+Value:
(((x) << (r)) | ((x) >> (64 - (r))))
+
+
+
+

Enumeration Type Documentation

+ +

◆ XXH_alignment

+ +
+
+ + + + +
enum XXH_alignment
+
+ + + +
Enumerator
XXH_aligned 

Aligned

+
XXH_unaligned 

Possibly unaligned

+
+ +
+
+
+
+ + + + diff --git a/doc/v0.8.3/group__impl.js b/doc/v0.8.3/group__impl.js new file mode 100644 index 00000000..329dd5a6 --- /dev/null +++ b/doc/v0.8.3/group__impl.js @@ -0,0 +1,10 @@ +var group__impl = +[ + [ "XXH32 implementation", "group___x_x_h32__impl.html", "group___x_x_h32__impl" ], + [ "XXH64 implementation", "group___x_x_h64__impl.html", "group___x_x_h64__impl" ], + [ "XXH3 implementation", "group___x_x_h3__impl.html", "group___x_x_h3__impl" ], + [ "XXH_alignment", "group__impl.html#gadec56fccd4f83e34902b6b09ecccfff5", [ + [ "XXH_aligned", "group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5a41340c9f33fe739cef7a1c56dc617194", null ], + [ "XXH_unaligned", "group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5ab082c14fd7eef12bcb1dfda2e813586f", null ] + ] ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group__public.html b/doc/v0.8.3/group__public.html new file mode 100644 index 00000000..66047d3c --- /dev/null +++ b/doc/v0.8.3/group__public.html @@ -0,0 +1,371 @@ + + + + + + + +xxHash: Public API + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
Public API
+
+
+ + + + + + + + +

+Topics

 XXH32 family
 
 XXH64 family
 
 XXH3 family
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define XXH_STATIC_LINKING_ONLY
 Gives access to internal state declaration, required for static allocation.
 
#define XXH_IMPLEMENTATION
 Gives access to internal definitions.
 
#define XXH_INLINE_ALL
 Exposes the implementation and marks all functions as inline.
 
+#define XXH_PRIVATE_API
 Exposes the implementation without marking functions as inline.
 
#define XXH_NAMESPACE   /* YOUR NAME HERE */
 Emulate a namespace by transparently prefixing all symbols.
 
+#define XXHASH_H_5627135585666179   1
 
+#define XXH_PUBLIC_API   /* do nothing */
 Marks a global symbol.
 
+#define XXH_PUBLIC_API   /* do nothing */
 Marks a global symbol.
 
+#define XXH_CONSTF   /* disable */
 
+#define XXH_PUREF
 
+#define XXH_MALLOCF
 
+#define XXH_VERSION_MAJOR   0
 
+#define XXH_VERSION_MINOR   8
 
+#define XXH_VERSION_RELEASE   3
 
+#define XXH_VERSION_NUMBER   (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)
 Version number, encoded as two digits each.
 
+ + + + +

+Typedefs

typedef uint32_t XXH32_hash_t
 An unsigned 32-bit integer.
 
+ + + + +

+Enumerations

enum  XXH_errorcode { XXH_OK = 0 +, XXH_ERROR + }
 Exit code for the streaming API. More...
 
+ + + + + + + +

+Functions

unsigned XXH_versionNumber (void)
 Obtains the xxHash version.
 
typedef uint64_t XXH64_hash_t
 An unsigned 64-bit integer.
 
+

Detailed Description

+

Contains details on the public xxHash functions.

+

Macro Definition Documentation

+ +

◆ XXH_STATIC_LINKING_ONLY

+ +
+
+ + + + +
#define XXH_STATIC_LINKING_ONLY
+
+ +

Gives access to internal state declaration, required for static allocation.

+

Incompatible with dynamic linking, due to risks of ABI changes.

+

Usage:

#define XXH_STATIC_LINKING_ONLY
+
#include "xxhash.h"
+ +
+
+
+ +

◆ XXH_IMPLEMENTATION

+ +
+
+ + + + +
#define XXH_IMPLEMENTATION
+
+ +

Gives access to internal definitions.

+

Usage:

#define XXH_STATIC_LINKING_ONLY
+
#define XXH_IMPLEMENTATION
+
#include "xxhash.h"
+
+
+
+ +

◆ XXH_INLINE_ALL

+ +
+
+ + + + +
#define XXH_INLINE_ALL
+
+ +

Exposes the implementation and marks all functions as inline.

+

Use these build macros to inline xxhash into the target unit. Inlining improves performance on small inputs, especially when the length is expressed as a compile-time constant:

+

https://fastcompression.blogspot.com/2018/03/xxhash-for-small-keys-impressive-power.html

+

It also keeps xxHash symbols private to the unit, so they are not exported.

+

Usage:

#define XXH_INLINE_ALL
+
#include "xxhash.h"
+

Do not compile and link xxhash.o as a separate object, as it is not useful.

+ +
+
+ +

◆ XXH_NAMESPACE

+ +
+
+ + + + +
#define XXH_NAMESPACE   /* YOUR NAME HERE */
+
+ +

Emulate a namespace by transparently prefixing all symbols.

+

If you want to include and expose xxHash functions from within your own library, but also want to avoid symbol collisions with other libraries which may also include xxHash, you can use XXH_NAMESPACE to automatically prefix any public symbol from xxhash library with the value of XXH_NAMESPACE (therefore, avoid empty or numeric values).

+

Note that no change is required within the calling program as long as it includes xxhash.h: Regular symbol names will be automatically translated by this header.

+ +
+
+

Typedef Documentation

+ +

◆ XXH32_hash_t

+ +
+
+ + + + +
typedef uint32_t XXH32_hash_t
+
+ +

An unsigned 32-bit integer.

+

Not necessarily defined to uint32_t but functionally equivalent.

+ +
+
+ +

◆ XXH64_hash_t

+ +
+
+ + + + +
typedef uint64_t XXH64_hash_t
+
+ +

An unsigned 64-bit integer.

+

Not necessarily defined to uint64_t but functionally equivalent.

+ +
+
+

Enumeration Type Documentation

+ +

◆ XXH_errorcode

+ +
+
+ + + + +
enum XXH_errorcode
+
+ +

Exit code for the streaming API.

+ + + +
Enumerator
XXH_OK 

OK

+
XXH_ERROR 

Error

+
+ +
+
+

Function Documentation

+ +

◆ XXH_versionNumber()

+ +
+
+ + + + + + + +
unsigned XXH_versionNumber (void )
+
+ +

Obtains the xxHash version.

+

This is mostly useful when xxHash is compiled as a shared library, since the returned value comes from the library, as opposed to header file.

+
Returns
XXH_VERSION_NUMBER of the invoked library.
+ +
+
+
+
+ + + + diff --git a/doc/v0.8.3/group__public.js b/doc/v0.8.3/group__public.js new file mode 100644 index 00000000..89c1ff6f --- /dev/null +++ b/doc/v0.8.3/group__public.js @@ -0,0 +1,21 @@ +var group__public = +[ + [ "XXH32 family", "group___x_x_h32__family.html", "group___x_x_h32__family" ], + [ "XXH64 family", "group___x_x_h64__family.html", "group___x_x_h64__family" ], + [ "XXH3 family", "group___x_x_h3__family.html", "group___x_x_h3__family" ], + [ "XXH_STATIC_LINKING_ONLY", "group__public.html#ga546f2633ae1036f49bdc5582971d7f1e", null ], + [ "XXH_IMPLEMENTATION", "group__public.html#gaa40be3a031b9a5bd9afc800b0959a0c9", null ], + [ "XXH_INLINE_ALL", "group__public.html#ga5a61b869708b770ad75e3e063a2f9273", null ], + [ "XXH_PRIVATE_API", "group__public.html#ga6589b6ea961ec073de006a47282c9a41", null ], + [ "XXH_NAMESPACE", "group__public.html#gacde9dad44d3e0e432474bef93e12f9e7", null ], + [ "XXH_PUBLIC_API", "group__public.html#ga5832897ed49938aefa629a76034b36b1", null ], + [ "XXH_PUBLIC_API", "group__public.html#ga5832897ed49938aefa629a76034b36b1", null ], + [ "XXH_VERSION_NUMBER", "group__public.html#gacc66393fff091acefc0e2a00ec5462c4", null ], + [ "XXH32_hash_t", "group__public.html#ga469df6c7273f15924de58143ef1afe14", null ], + [ "XXH64_hash_t", "group__public.html#ga5406b285b18dfcefa93efed489e3b603", null ], + [ "XXH_errorcode", "group__public.html#ga5020905455674b8c83c1dbc73f0d3534", [ + [ "XXH_OK", "group__public.html#gga5020905455674b8c83c1dbc73f0d3534abd20b092d624344e301b0cadd29d5bd6", null ], + [ "XXH_ERROR", "group__public.html#gga5020905455674b8c83c1dbc73f0d3534a462a18276729783125c7116cf102667f", null ] + ] ], + [ "XXH_versionNumber", "group__public.html#gabc57fd428d4d33906b3830c746bc4ac9", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/group__tuning.html b/doc/v0.8.3/group__tuning.html new file mode 100644 index 00000000..d9facd4f --- /dev/null +++ b/doc/v0.8.3/group__tuning.html @@ -0,0 +1,493 @@ + + + + + + + +xxHash: Tuning parameters + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
Tuning parameters
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

#define XXH_SCALAR   0
 Possible values for XXH_VECTOR.
 
#define XXH_NO_LONG_LONG
 Define this to disable 64-bit code.
 
#define XXH_FORCE_MEMORY_ACCESS   0
 Controls how unaligned memory is accessed.
 
#define XXH_SIZE_OPT   0
 Controls how much xxHash optimizes for size.
 
#define XXH_FORCE_ALIGN_CHECK   0
 If defined to non-zero, adds a special path for aligned inputs (XXH32() and XXH64() only).
 
#define XXH_NO_INLINE_HINTS   0
 When non-zero, sets all functions to static.
 
#define XXH3_INLINE_SECRET   0
 Determines whether to inline the XXH3 withSecret code.
 
#define XXH32_ENDJMP   0
 Whether to use a jump for XXH32_finalize.
 
+#define XXH_OLD_NAMES
 
#define XXH_NO_STREAM
 Disables the streaming API.
 
#define XXH_DEBUGLEVEL   0
 Sets the debugging level.
 
#define XXH_CPU_LITTLE_ENDIAN   XXH_isLittleEndian()
 Whether the target is little endian.
 
#define XXH_VECTOR   XXH_SCALAR
 Overrides the vectorization implementation chosen for XXH3.
 
#define XXH_VECTOR   XXH_SCALAR
 Overrides the vectorization implementation chosen for XXH3.
 
#define XXH_ACC_ALIGN   8
 Selects the minimum alignment for XXH3's accumulators.
 
#define XXH3_NEON_LANES   XXH_ACC_NB
 Controls the NEON to scalar ratio for XXH3.
 
+

Detailed Description

+

Various macros to control xxHash's behavior.

+

Macro Definition Documentation

+ +

◆ XXH_SCALAR

+ +
+
+ + + + +
#define XXH_SCALAR   0
+
+ +

Possible values for XXH_VECTOR.

+

Unless set explicitly, determined automatically. Portable scalar version

+ +
+
+ +

◆ XXH_NO_LONG_LONG

+ +
+
+ + + + +
#define XXH_NO_LONG_LONG
+
+ +

Define this to disable 64-bit code.

+

Useful if only using the XXH32 family and you have a strict C90 compiler.

+ +
+
+ +

◆ XXH_FORCE_MEMORY_ACCESS

+ +
+
+ + + + +
#define XXH_FORCE_MEMORY_ACCESS   0
+
+ +

Controls how unaligned memory is accessed.

+

By default, access to unaligned memory is controlled by memcpy(), which is safe and portable.

+

Unfortunately, on some target/compiler combinations, the generated assembly is sub-optimal.

+

The below switch allow selection of a different access method in the search for improved performance.

+
Possible options:
+
    +
  • XXH_FORCE_MEMORY_ACCESS=0 (default): memcpy
    Use memcpy(). Safe and portable. Note that most modern compilers will eliminate the function call and treat it as an unaligned access.
    +
  • +
  • XXH_FORCE_MEMORY_ACCESS=1: __attribute__((aligned(1)))
    Depends on compiler extensions and is therefore not portable. This method is safe if your compiler supports it, and generally as fast or faster than memcpy.
    +
  • +
  • XXH_FORCE_MEMORY_ACCESS=2: Direct cast
    Casts directly and dereferences. This method doesn't depend on the compiler, but it violates the C standard as it directly dereferences an unaligned pointer. It can generate buggy code on targets which do not support unaligned memory accesses, but in some circumstances, it's the only known way to get the most performance.
    +
  • +
  • XXH_FORCE_MEMORY_ACCESS=3: Byteshift
    Also portable. This can generate the best code on old compilers which don't inline small memcpy() calls, and it might also be faster on big-endian systems which lack a native byteswap instruction. However, some compilers will emit literal byteshifts even if the target supports unaligned access.
    +
    Warning
    Methods 1 and 2 rely on implementation-defined behavior. Use these with care, as what works on one compiler/platform/optimization level may cause another to read garbage data or even crash.
    +See https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html for details.
  • +
+

Prefer these methods in priority order (0 > 3 > 1 > 2)

+ +
+
+ +

◆ XXH_SIZE_OPT

+ +
+
+ + + + +
#define XXH_SIZE_OPT   0
+
+ +

Controls how much xxHash optimizes for size.

+

xxHash, when compiled, tends to result in a rather large binary size. This is mostly due to heavy usage to forced inlining and constant folding of the XXH3 family to increase performance.

+

However, some developers prefer size over speed. This option can significantly reduce the size of the generated code. When using the -Os or -Oz options on GCC or Clang, this is defined to 1 by default, otherwise it is defined to 0.

+

Most of these size optimizations can be controlled manually.

+

This is a number from 0-2.

    +
  • XXH_SIZE_OPT == 0: Default. xxHash makes no size optimizations. Speed comes first.
  • +
  • XXH_SIZE_OPT == 1: Default for -Os and -Oz. xxHash is more conservative and disables hacks that increase code size. It implies the options XXH_NO_INLINE_HINTS == 1, XXH_FORCE_ALIGN_CHECK == 0, and XXH3_NEON_LANES == 8 if they are not already defined.
  • +
  • XXH_SIZE_OPT == 2: xxHash tries to make itself as small as possible. Performance may cry. For example, the single shot functions just use the streaming API.
  • +
+ +
+
+ +

◆ XXH_FORCE_ALIGN_CHECK

+ +
+
+ + + + +
#define XXH_FORCE_ALIGN_CHECK   0
+
+ +

If defined to non-zero, adds a special path for aligned inputs (XXH32() and XXH64() only).

+

This is an important performance trick for architectures without decent unaligned memory access performance.

+

It checks for input alignment, and when conditions are met, uses a "fast +path" employing direct 32-bit/64-bit reads, resulting in dramatically faster read speed.

+

The check costs one initial branch per hash, which is generally negligible, but not zero.

+

Moreover, it's not useful to generate an additional code path if memory access uses the same instruction for both aligned and unaligned addresses (e.g. x86 and aarch64).

+

In these cases, the alignment check can be removed by setting this macro to 0. Then the code will always use unaligned memory access. Align check is automatically disabled on x86, x64, ARM64, and some ARM chips which are platforms known to offer good unaligned memory accesses performance.

+

It is also disabled by default when XXH_SIZE_OPT >= 1.

+

This option does not affect XXH3 (only XXH32 and XXH64).

+ +
+
+ +

◆ XXH_NO_INLINE_HINTS

+ +
+
+ + + + +
#define XXH_NO_INLINE_HINTS   0
+
+ +

When non-zero, sets all functions to static.

+

By default, xxHash tries to force the compiler to inline almost all internal functions.

+

This can usually improve performance due to reduced jumping and improved constant folding, but significantly increases the size of the binary which might not be favorable.

+

Additionally, sometimes the forced inlining can be detrimental to performance, depending on the architecture.

+

XXH_NO_INLINE_HINTS marks all internal functions as static, giving the compiler full control on whether to inline or not.

+

When not optimizing (-O0), using -fno-inline with GCC or Clang, or if XXH_SIZE_OPT >= 1, this will automatically be defined.

+ +
+
+ +

◆ XXH3_INLINE_SECRET

+ +
+
+ + + + +
#define XXH3_INLINE_SECRET   0
+
+ +

Determines whether to inline the XXH3 withSecret code.

+

When the secret size is known, the compiler can improve the performance of XXH3_64bits_withSecret() and XXH3_128bits_withSecret().

+

However, if the secret size is not known, it doesn't have any benefit. This happens when xxHash is compiled into a global symbol. Therefore, if XXH_INLINE_ALL is not defined, this will be defined to 0.

+

Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers that are sometimes force inline on -Og, and it is impossible to automatically detect this optimization level.

+ +
+
+ +

◆ XXH32_ENDJMP

+ +
+
+ + + + +
#define XXH32_ENDJMP   0
+
+ +

Whether to use a jump for XXH32_finalize.

+

For performance, XXH32_finalize uses multiple branches in the finalizer. This is generally preferable for performance, but depending on exact architecture, a jmp may be preferable.

+

This setting is only possibly making a difference for very small inputs.

+ +
+
+ +

◆ XXH_NO_STREAM

+ +
+
+ + + + +
#define XXH_NO_STREAM
+
+ +

Disables the streaming API.

+

When xxHash is not inlined and the streaming functions are not used, disabling the streaming functions can improve code size significantly, especially with the XXH3 family which tends to make constant folded copies of itself.

+ +
+
+ +

◆ XXH_DEBUGLEVEL

+ +
+
+ + + + +
#define XXH_DEBUGLEVEL   0
+
+ +

Sets the debugging level.

+

XXH_DEBUGLEVEL is expected to be defined externally, typically via the compiler's command line options. The value must be a number.

+ +
+
+ +

◆ XXH_CPU_LITTLE_ENDIAN

+ +
+
+ + + + +
#define XXH_CPU_LITTLE_ENDIAN   XXH_isLittleEndian()
+
+ +

Whether the target is little endian.

+

Defined to 1 if the target is little endian, or 0 if it is big endian. It can be defined externally, for example on the compiler command line.

+

If it is not defined, a runtime check (which is usually constant folded) is used instead.

+
Note
This is not necessarily defined to an integer constant.
+
See also
XXH_isLittleEndian() for the runtime check.
+ +
+
+ +

◆ XXH_VECTOR [1/2]

+ +
+
+ + + + +
#define XXH_VECTOR   XXH_SCALAR
+
+ +

Overrides the vectorization implementation chosen for XXH3.

+

Can be defined to 0 to disable SIMD, or any other authorized value of XXH_VECTOR.

+

If this is not defined, it uses predefined macros to determine the best implementation.

+ +
+
+ +

◆ XXH_VECTOR [2/2]

+ +
+
+ + + + +
#define XXH_VECTOR   XXH_SCALAR
+
+ +

Overrides the vectorization implementation chosen for XXH3.

+

Can be defined to 0 to disable SIMD, or any other authorized value of XXH_VECTOR.

+

If this is not defined, it uses predefined macros to determine the best implementation.

+ +
+
+ +

◆ XXH_ACC_ALIGN

+ +
+
+ + + + +
#define XXH_ACC_ALIGN   8
+
+ +

Selects the minimum alignment for XXH3's accumulators.

+

When using SIMD, this should match the alignment required for said vector type, so, for example, 32 for AVX2.

+

Default: Auto detected.

+ +
+
+ +

◆ XXH3_NEON_LANES

+ +
+
+ + + + +
#define XXH3_NEON_LANES   XXH_ACC_NB
+
+ +

Controls the NEON to scalar ratio for XXH3.

+

This can be set to 2, 4, 6, or 8.

+

ARM Cortex CPUs are very sensitive to how their pipelines are used.

+

For example, the Cortex-A73 can dispatch 3 micro-ops per cycle, but only 2 of those can be NEON. If you are only using NEON instructions, you are only using 2/3 of the CPU bandwidth.

+

This is even more noticeable on the more advanced cores like the Cortex-A76 which can dispatch 8 micro-ops per cycle, but still only 2 NEON micro-ops at once.

+

Therefore, to make the most out of the pipeline, it is beneficial to run 6 NEON lanes and 2 scalar lanes, which is chosen by default.

+

This does not apply to Apple processors or 32-bit processors, which run better with full NEON. These will default to 8. Additionally, size-optimized builds run 8 lanes.

+

This change benefits CPUs with large micro-op buffers without negatively affecting most other CPUs:

+ + + + + + + + + + + +
Chipset Dispatch type NEON only 6:2 hybrid Diff.
Snapdragon 730 (A76) 2 NEON/8 micro-ops 8.8 GB/s 10.1 GB/s ~16%
Snapdragon 835 (A73) 2 NEON/3 micro-ops 5.1 GB/s 5.3 GB/s ~5%
Marvell PXA1928 (A53) In-order dual-issue 1.9 GB/s 1.9 GB/s 0%
Apple M1 4 NEON/8 micro-ops 37.3 GB/s 36.1 GB/s ~-3%
+

It also seems to fix some bad codegen on GCC, making it almost as fast as clang.

+

When using WASM SIMD128, if this is 2 or 6, SIMDe will scalarize 2 of the lanes meaning it effectively becomes worse 4.

+
See also
XXH3_accumulate_512_neon()
+ +
+
+
+
+ + + + diff --git a/doc/v0.8.3/group__tuning.js b/doc/v0.8.3/group__tuning.js new file mode 100644 index 00000000..68267977 --- /dev/null +++ b/doc/v0.8.3/group__tuning.js @@ -0,0 +1,18 @@ +var group__tuning = +[ + [ "XXH_SCALAR", "group__tuning.html#ga9cc731558db44d378e6dde975236d4ab", null ], + [ "XXH_NO_LONG_LONG", "group__tuning.html#ga7e738bf7fb8249e8a834a8c8a8581d80", null ], + [ "XXH_FORCE_MEMORY_ACCESS", "group__tuning.html#ga04b48241beb7c34e5929d328cf5cc71a", null ], + [ "XXH_SIZE_OPT", "group__tuning.html#ga1e9850064fc149181cce7431f40a990a", null ], + [ "XXH_FORCE_ALIGN_CHECK", "group__tuning.html#gaee35763869a969d5576e70dac1c08b8d", null ], + [ "XXH_NO_INLINE_HINTS", "group__tuning.html#gae980c41901d840d8909aa74d603ad4f1", null ], + [ "XXH3_INLINE_SECRET", "group__tuning.html#gaa6d5f6ddf0a7d14b90a63cb6a9d34c26", null ], + [ "XXH32_ENDJMP", "group__tuning.html#gad5824529c4ad74d2d5cc05bf4868613a", null ], + [ "XXH_NO_STREAM", "group__tuning.html#ga96f0b839b3187287c904d37c993f6d1f", null ], + [ "XXH_DEBUGLEVEL", "group__tuning.html#ga574ceb8ab088243cb0dc833b28320eb5", null ], + [ "XXH_CPU_LITTLE_ENDIAN", "group__tuning.html#ga408fac02658eb4a81f7a1877f1ca3b3f", null ], + [ "XXH_VECTOR", "group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86", null ], + [ "XXH_VECTOR", "group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86", null ], + [ "XXH_ACC_ALIGN", "group__tuning.html#ga15f2f40c9206c691f66cf260841f8ad1", null ], + [ "XXH3_NEON_LANES", "group__tuning.html#gac799ce966f18e4837f7fdc3d51917e9c", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/index.html b/doc/v0.8.3/index.html new file mode 100644 index 00000000..e628673f --- /dev/null +++ b/doc/v0.8.3/index.html @@ -0,0 +1,304 @@ + + + + + + + +xxHash: xxHash + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
xxHash 0.8.3 +
+
Extremely fast non-cryptographic hash function
+
+ +   + + + + +
+
+
+ + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
xxHash
+
+
+

xxHash is an extremely fast non-cryptographic hash algorithm, working at RAM speed limits.

+

It is proposed in four flavors, in three families:

    +
  1. XXH32 family
      +
    • Classic 32-bit hash function. Simple, compact, and runs on almost all 32-bit and 64-bit systems.
    • +
    +
  2. +
  3. XXH64 family
      +
    • Classic 64-bit adaptation of XXH32. Just as simple, and runs well on most 64-bit systems (but not 32-bit systems).
    • +
    +
  4. +
  5. XXH3 family
      +
    • Modern 64-bit and 128-bit hash function family which features improved strength and performance across the board, especially on smaller data. It benefits greatly from SIMD and 64-bit without requiring it.
    • +
    +
  6. +
+

+Benchmarks

+

The reference system uses an Intel i7-9700K CPU, and runs Ubuntu x64 20.04. The open source benchmark program is compiled with clang v10.0 using -O3 flag.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Hash Name ISA ext Width Large Data Speed Small Data Velocity
XXH3_64bits() AVX2 64 59.4 GB/s 133.1
MeowHash AES-NI 128 58.2 GB/s 52.5
XXH3_128bits() AVX2 128 57.9 GB/s 118.1
CLHash PCLMUL 64 37.1 GB/s 58.1
XXH3_64bits() SSE2 64 31.5 GB/s 133.1
XXH3_128bits() SSE2 128 29.6 GB/s 118.1
RAM sequential read N/A 28.0 GB/s N/A
ahash AES-NI 64 22.5 GB/s 107.2
City64 64 22.0 GB/s 76.6
T1ha2 64 22.0 GB/s 99.0
City128 128 21.7 GB/s 57.7
FarmHash AES-NI 64 21.3 GB/s 71.9
XXH64() 64 19.4 GB/s 71.0
SpookyHash 64 19.3 GB/s 53.2
Mum 64 18.0 GB/s 67.0
CRC32C SSE4.2 32 13.0 GB/s 57.9
XXH32() 32 9.7 GB/s 71.9
City32 32 9.1 GB/s 66.0
Blake3* AVX2 256 4.4 GB/s 8.1
Murmur3 32 3.9 GB/s 56.1
SipHash* 64 3.0 GB/s 43.2
Blake3* SSE2 256 2.4 GB/s 8.1
HighwayHash 64 1.4 GB/s 6.0
FNV64 64 1.2 GB/s 62.7
Blake2* 256 1.1 GB/s 5.1
SHA1* 160 0.8 GB/s 5.6
MD5* 128 0.6 GB/s 7.8
+
Note
    +
  • Hashes which require a specific ISA extension are noted. SSE2 is also noted, even though it is mandatory on x64.
  • +
  • Hashes with an asterisk are cryptographic. Note that MD5 is non-cryptographic by modern standards.
  • +
  • Small data velocity is a rough average of algorithm's efficiency for small data. For more accurate information, see the wiki.
  • +
  • More benchmarks and strength tests are found on the wiki: https://github.com/Cyan4973/xxHash/wiki
  • +
+
+

+Usage

+

All xxHash variants use a similar API. Changing the algorithm is a trivial substitution.

+
Precondition
For functions which take an input and length parameter, the following requirements are assumed:
    +
  • The range from [input, input + length) is valid, readable memory.
      +
    • The only exception is if the length is 0, input may be NULL.
    • +
    +
  • +
  • For C++, the objects must have the TriviallyCopyable property, as the functions access bytes directly as if it was an array of unsigned char.
  • +
+
+

Single Shot

+

These functions are stateless functions which hash a contiguous block of memory, immediately returning the result. They are the easiest and usually the fastest option.

+

XXH32(), XXH64(), XXH3_64bits(), XXH3_128bits()

+
#include <string.h>
+
#include "xxhash.h"
+
+
// Example for a function which hashes a null terminated string with XXH32().
+
XXH32_hash_t hash_string(const char* string, XXH32_hash_t seed)
+
{
+
// NULL pointers are only valid if the length is zero
+
size_t length = (string == NULL) ? 0 : strlen(string);
+
return XXH32(string, length, seed);
+
}
+
XXH32_hash_t XXH32(const void *input, size_t length, XXH32_hash_t seed)
Calculates the 32-bit hash of input using xxHash32.
Definition xxhash.h:3183
+
uint32_t XXH32_hash_t
An unsigned 32-bit integer.
Definition xxhash.h:587
+ +

Streaming

+

These groups of functions allow incremental hashing of unknown size, even more than what would fit in a size_t.

+

XXH32_reset(), XXH64_reset(), XXH3_64bits_reset(), XXH3_128bits_reset()

+
#include <stdio.h>
+
#include <assert.h>
+
#include "xxhash.h"
+
// Example for a function which hashes a FILE incrementally with XXH3_64bits().
+
XXH64_hash_t hashFile(FILE* f)
+
{
+
// Allocate a state struct. Do not just use malloc() or new.
+ +
assert(state != NULL && "Out of memory!");
+
// Reset the state to start a new hashing session.
+ +
char buffer[4096];
+
size_t count;
+
// Read the file in chunks
+
while ((count = fread(buffer, 1, sizeof(buffer), f)) != 0) {
+
// Run update() as many times as necessary to process the data
+
XXH3_64bits_update(state, buffer, count);
+
}
+
// Retrieve the finalized hash. This will not change the state.
+ +
// Free the state. Do not use free().
+ +
return result;
+
}
+
XXH64_hash_t XXH3_64bits_digest(const XXH3_state_t *statePtr)
Returns the calculated XXH3 64-bit hash value from an XXH3_state_t.
Definition xxhash.h:6660
+
struct XXH3_state_s XXH3_state_t
The opaque state struct for the XXH3 streaming API.
Definition xxhash.h:1244
+
XXH3_state_t * XXH3_createState(void)
Allocate an XXH3_state_t.
Definition xxhash.h:6369
+
XXH_errorcode XXH3_64bits_update(XXH3_state_t *statePtr, const void *input, size_t length)
Consumes a block of input to an XXH3_state_t.
Definition xxhash.h:6615
+
XXH_errorcode XXH3_64bits_reset(XXH3_state_t *statePtr)
Resets an XXH3_state_t to begin a new hash.
Definition xxhash.h:6431
+
XXH_errorcode XXH3_freeState(XXH3_state_t *statePtr)
Frees an XXH3_state_t.
Definition xxhash.h:6389
+
uint64_t XXH64_hash_t
An unsigned 64-bit integer.
Definition xxhash.h:866
+

Streaming functions generate the xxHash value from an incremental input. This method is slower than single-call functions, due to state management. For small inputs, prefer XXH32() and XXH64(), which are better optimized.

+

An XXH state must first be allocated using XXH*_createState().

+

Start a new hash by initializing the state with a seed using XXH*_reset().

+

Then, feed the hash state by calling XXH*_update() as many times as necessary.

+

The function returns an error code, with 0 meaning OK, and any other value meaning there is an error.

+

Finally, a hash value can be produced anytime, by using XXH*_digest(). This function returns the nn-bits hash as an int or long long.

+

It's still possible to continue inserting input into the hash state after a digest, and generate new hash values later on by invoking XXH*_digest().

+

When done, release the state using XXH*_freeState().

+

Canonical Representation

+

The default return values from XXH functions are unsigned 32, 64 and 128 bit integers. This the simplest and fastest format for further post-processing.

+

However, this leaves open the question of what is the order on the byte level, since little and big endian conventions will store the same number differently.

+

The canonical representation settles this issue by mandating big-endian convention, the same convention as human-readable numbers (large digits first).

+

When writing hash values to storage, sending them over a network, or printing them, it's highly recommended to use the canonical representation to ensure portability across a wider range of systems, present and future.

+

The following functions allow transformation of hash values to and from canonical format.

+

XXH32_canonicalFromHash(), XXH32_hashFromCanonical(), XXH64_canonicalFromHash(), XXH64_hashFromCanonical(), XXH128_canonicalFromHash(), XXH128_hashFromCanonical(),

+
#include <stdio.h>
+
#include "xxhash.h"
+
+
// Example for a function which prints XXH32_hash_t in human readable format
+
void printXxh32(XXH32_hash_t hash)
+
{
+ + +
size_t i;
+
for(i = 0; i < sizeof(cano.digest); ++i) {
+
printf("%02x", cano.digest[i]);
+
}
+
printf("\n");
+
}
+
+
// Example for a function which converts XXH32_canonical_t to XXH32_hash_t
+
XXH32_hash_t convertCanonicalToXxh32(XXH32_canonical_t cano)
+
{
+ +
return hash;
+
}
+
void XXH32_canonicalFromHash(XXH32_canonical_t *dst, XXH32_hash_t hash)
Converts an XXH32_hash_t to a big endian XXH32_canonical_t.
Definition xxhash.h:3300
+
XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t *src)
Converts an XXH32_canonical_t to a native XXH32_hash_t.
Definition xxhash.h:3307
+
Canonical (big endian) representation of XXH32_hash_t.
Definition xxhash.h:754
+
unsigned char digest[4]
Definition xxhash.h:755
+
+ +
+
+ + + + diff --git a/doc/v0.8.3/jquery.js b/doc/v0.8.3/jquery.js new file mode 100644 index 00000000..875ada73 --- /dev/null +++ b/doc/v0.8.3/jquery.js @@ -0,0 +1,204 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e} +var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp( +"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType +}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c +)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){ +return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll( +":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id") +)&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push( +"\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test( +a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null, +null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne +).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for( +var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n; +return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0, +r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r] +,C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each( +function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r, +"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})} +),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each( +"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=y(e||this.defaultElement||this)[0],this.element=y(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=y(),this.hoverable=y(),this.focusable=y(),this.classesElementLookup={},e!==this&&(y.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t +){t.target===e&&this.destroy()}}),this.document=y(e.style?e.ownerDocument:e.document||e),this.window=y(this.document[0].defaultView||this.document[0].parentWindow)),this.options=y.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:y.noop,_create:y.noop,_init:y.noop,destroy:function(){var i=this;this._destroy(),y.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:y.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return y.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t +]=y.widget.extend({},this.options[t]),n=0;n
"),i=e.children()[0];return y("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),s=t-i}, +getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.widthx(D(s),D(n))?o.important="horizontal":o.important="vertical",p.using.call(this,t,o)}),h.offset(y.extend(l,{using:t}))})},y.ui.position={fit:{left:function(t,e){var i=e.within, +s=i.isWindow?i.scrollLeft:i.offset.left,n=i.width,o=t.left-e.collisionPosition.marginLeft,h=s-o,a=o+e.collisionWidth-n-s;e.collisionWidth>n?0n?0=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),y.ui.plugin={add:function(t,e,i){var s,n=y.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})), +this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(t),this._proportionallyResize()),this._setupHandles(),e.autoHide&&y(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();function t(t){y(t +).removeData("resizable").removeData("ui-resizable").off(".resizable")}var e;return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,h=this;if(this.handles=o.handles||(y(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=y(),this._addedHandles=y(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split( +","),this.handles={},e=0;e"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=y(this.handles[e]),this._on(this.handles[e],{mousedown:h._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=y(this.handles[e],this.element),s=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),i=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(i,s),this._proportionallyResize()),this._handles=this._handles.add( +this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){h.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),h.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)(i=y(this.handles[e])[0])!==t.target&&!y.contains(i,t.target)||(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s=this.options,n=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),s.containment&&(e+=y(s.containment).scrollLeft()||0,i+=y(s.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{ +width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-n.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof s.aspectRatio?s.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=y(".ui-resizable-"+this.axis).css("cursor"),y("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e=this.originalMousePosition,i=this.axis,s=t.pageX-e.left||0,e=t.pageY-e.top||0,i=this._change[i];return this._updatePrevProperties(),i&&(e=i.apply(this,[t,s,e]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),e=this._applyChanges(), +!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),y.isEmptyObject(e)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n=this.options,o=this;return this._helper&&(s=(e=(i=this._proportionallyResizeElements).length&&/textarea/i.test(i[0].nodeName))&&this._hasScroll(i[0],"left")?0:o.sizeDiff.height,i=e?0:o.sizeDiff.width,e={width:o.helper.width()-i,height:o.helper.height()-s},i=parseFloat(o.element.css("left"))+(o.position.left-o.originalPosition.left)||null,s=parseFloat(o.element.css("top"))+(o.position.top-o.originalPosition.top)||null,n.animate||this.element.css(y.extend(e,{top:s,left:i})),o.helper.height(o.size.height),o.helper.width(o.size.width),this._helper&&!n.animate&&this._proportionallyResize()),y("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){ +this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s=this.options,n={minWidth:this._isNumber(s.minWidth)?s.minWidth:0,maxWidth:this._isNumber(s.maxWidth)?s.maxWidth:1/0,minHeight:this._isNumber(s.minHeight)?s.minHeight:0,maxHeight:this._isNumber(s.maxHeight)?s.maxHeight:1/0};(this._aspectRatio||t)&&(e=n.minHeight*this.aspectRatio,i=n.minWidth/this.aspectRatio,s=n.maxHeight*this.aspectRatio,t=n.maxWidth/this.aspectRatio,e>n.minWidth&&(n.minWidth=e),i>n.minHeight&&(n.minHeight=i),st.width,h=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,a=this.originalPosition.left+this.originalSize.width,r=this.originalPosition.top+this.originalSize.height +,l=/sw|nw|w/.test(i),i=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),h&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=a-e.minWidth),s&&l&&(t.left=a-e.maxWidth),h&&i&&(t.top=r-e.minHeight),n&&i&&(t.top=r-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return y.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e, +i){return y.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return y.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){y.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),y.ui.plugin.add("resizable","animate",{stop:function(e){var i=y(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,h=n?0:i.sizeDiff.width,n={width:i.size.width-h,height:i.size.height-o},h=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left +)||null,o=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(y.extend(n,o&&h?{top:o,left:h}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&y(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),y.ui.plugin.add("resizable","containment",{start:function(){var i,s,n=y(this).resizable("instance"),t=n.options,e=n.element,o=t.containment,h=o instanceof y?o.get(0):/parent/.test(o)?e.parent().get(0):o;h&&(n.containerElement=y(h),/document/.test(o)||o===document?(n.containerOffset={left:0,top:0},n.containerPosition={left:0,top:0},n.parentData={element:y(document),left:0,top:0,width:y(document).width(),height:y(document).height()||document.body.parentNode.scrollHeight}):(i=y(h),s=[],y(["Top","Right","Left","Bottom"]).each(function(t,e +){s[t]=n._num(i.css("padding"+e))}),n.containerOffset=i.offset(),n.containerPosition=i.position(),n.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=n.containerOffset,e=n.containerSize.height,o=n.containerSize.width,o=n._hasScroll(h,"left")?h.scrollWidth:o,e=n._hasScroll(h)?h.scrollHeight:e,n.parentData={element:h,left:t.left,top:t.top,width:o,height:e}))},resize:function(t){var e=y(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.position,o=e._aspectRatio||t.shiftKey,h={top:0,left:0},a=e.containerElement,t=!0;a[0]!==document&&/static/.test(a.css("position"))&&(h=s),n.left<(e._helper?s.left:0)&&(e.size.width=e.size.width+(e._helper?e.position.left-s.left:e.position.left-h.left),o&&(e.size.height=e.size.width/e.aspectRatio,t=!1),e.position.left=i.helper?s.left:0),n.top<(e._helper?s.top:0)&&(e.size.height=e.size.height+(e._helper?e.position.top-s.top:e.position.top),o&&(e.size.width=e.size.height*e.aspectRatio,t=!1),e.position.top=e._helper?s.top:0), +i=e.containerElement.get(0)===e.element.parent().get(0),n=/relative|absolute/.test(e.containerElement.css("position")),i&&n?(e.offset.left=e.parentData.left+e.position.left,e.offset.top=e.parentData.top+e.position.top):(e.offset.left=e.element.offset().left,e.offset.top=e.element.offset().top),n=Math.abs(e.sizeDiff.width+(e._helper?e.offset.left-h.left:e.offset.left-s.left)),s=Math.abs(e.sizeDiff.height+(e._helper?e.offset.top-h.top:e.offset.top-s.top)),n+e.size.width>=e.parentData.width&&(e.size.width=e.parentData.width-n,o&&(e.size.height=e.size.width/e.aspectRatio,t=!1)),s+e.size.height>=e.parentData.height&&(e.size.height=e.parentData.height-s,o&&(e.size.width=e.size.height*e.aspectRatio,t=!1)),t||(e.position.left=e.prevPosition.left,e.position.top=e.prevPosition.top,e.size.width=e.prevSize.width,e.size.height=e.prevSize.height)},stop:function(){var t=y(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=y(t.helper),h=o.offset(),a=o.outerWidth( +)-t.sizeDiff.width,o=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&y(this).css({left:h.left-s.left-i.left,width:a,height:o})}}),y.ui.plugin.add("resizable","alsoResize",{start:function(){var t=y(this).resizable("instance").options;y(t.alsoResize).each(function(){var t=y(this);t.data("ui-resizable-alsoresize",{width:parseFloat(t.width()),height:parseFloat(t.height()),left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=y(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,h={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};y(s.alsoResize).each(function(){var t=y(this),s=y(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];y.each(e, +function(t,e){var i=(s[e]||0)+(h[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){y(this).removeData("ui-resizable-alsoresize")}}),y.ui.plugin.add("resizable","ghost",{start:function(){var t=y(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!1!==y.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=y(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=y(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),y.ui.plugin.add("resizable","grid",{resize:function(){var t,e=y(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,h=e.axis,a="number"==typeof i.grid?[i.grid,i.grid]:i.grid,r=a[0 +]||1,l=a[1]||1,u=Math.round((s.width-n.width)/r)*r,p=Math.round((s.height-n.height)/l)*l,d=n.width+u,c=n.height+p,f=i.maxWidth&&i.maxWidthd,s=i.minHeight&&i.minHeight>c;i.grid=a,m&&(d+=r),s&&(c+=l),f&&(d-=r),g&&(c-=l),/^(se|s|e)$/.test(h)?(e.size.width=d,e.size.height=c):/^(ne)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.top=o.top-p):/^(sw)$/.test(h)?(e.size.width=d,e.size.height=c,e.position.left=o.left-u):((c-l<=0||d-r<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0=f[g]?0:Math.min(f[g],n));!a&&1-1){ +targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se", +"n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if( +session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)} +closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if( +session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE, +function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset); +tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList, +finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight())); +return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")} +function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(), +elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight, +viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b, +"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); +/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)), +mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend( +$.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy( +this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData( +"smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id" +).indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?( +this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for( +var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){ +return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if(( +!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&( +this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0 +]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass( +"highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){ +t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]" +)||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){ +t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"), +a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i, +downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2) +)&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t +)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0), +canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}}, +rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})} +return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1, +bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); diff --git a/doc/v0.8.3/menu.js b/doc/v0.8.3/menu.js new file mode 100644 index 00000000..b0b26936 --- /dev/null +++ b/doc/v0.8.3/menu.js @@ -0,0 +1,136 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+='
    '; + for (var i in data.children) { + var url; + var link; + link = data.children[i].url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + } else { + url = relPath+link; + } + result+='
  • '+ + data.children[i].text+''+ + makeTree(data.children[i],relPath)+'
  • '; + } + result+='
'; + } + return result; + } + var searchBoxHtml; + if (searchEnabled) { + if (serverSide) { + searchBoxHtml='
'+ + '
'+ + '
 '+ + ''+ + '
'+ + '
'+ + '
'+ + '
'; + } else { + searchBoxHtml='
'+ + ''+ + ' '+ + ''+ + ''+ + ''+ + ''+ + ''+ + '
'; + } + } + + $('#main-nav').before('
'+ + ''+ + ''+ + '
'); + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchBoxHtml) { + $('#main-menu').append('
  • '); + } + var $mainMenuState = $('#main-menu-state'); + var prevWidth = 0; + if ($mainMenuState.length) { + function initResizableIfExists() { + if (typeof initResizable==='function') initResizable(); + } + // animate mobile menu + $mainMenuState.change(function(e) { + var $menu = $('#main-menu'); + var options = { duration: 250, step: initResizableIfExists }; + if (this.checked) { + options['complete'] = function() { $menu.css('display', 'block') }; + $menu.hide().slideDown(options); + } else { + options['complete'] = function() { $menu.css('display', 'none') }; + $menu.show().slideUp(options); + } + }); + // set default menu visibility + function resetState() { + var $menu = $('#main-menu'); + var $mainMenuState = $('#main-menu-state'); + var newWidth = $(window).outerWidth(); + if (newWidth!=prevWidth) { + if ($(window).outerWidth()<768) { + $mainMenuState.prop('checked',false); $menu.hide(); + $('#searchBoxPos1').html(searchBoxHtml); + $('#searchBoxPos2').hide(); + } else { + $menu.show(); + $('#searchBoxPos1').empty(); + $('#searchBoxPos2').html(searchBoxHtml); + $('#searchBoxPos2').show(); + } + if (typeof searchBox!=='undefined') { + searchBox.CloseResultsWindow(); + } + prevWidth = newWidth; + } + } + $(window).ready(function() { resetState(); initResizableIfExists(); }); + $(window).resize(resetState); + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/doc/v0.8.3/menudata.js b/doc/v0.8.3/menudata.js new file mode 100644 index 00000000..58fbfb10 --- /dev/null +++ b/doc/v0.8.3/menudata.js @@ -0,0 +1,45 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Modules",url:"modules.html"}, +{text:"Data Structures",url:"annotated.html",children:[ +{text:"Data Structures",url:"annotated.html"}, +{text:"Data Structure Index",url:"classes.html"}, +{text:"Data Fields",url:"functions.html",children:[ +{text:"All",url:"functions.html"}, +{text:"Variables",url:"functions_vars.html"}]}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}, +{text:"Globals",url:"globals.html",children:[ +{text:"All",url:"globals.html",children:[ +{text:"x",url:"globals.html#index_x"}]}, +{text:"Functions",url:"globals_func.html",children:[ +{text:"x",url:"globals_func.html#index_x"}]}, +{text:"Typedefs",url:"globals_type.html"}, +{text:"Enumerations",url:"globals_enum.html"}, +{text:"Enumerator",url:"globals_eval.html"}, +{text:"Macros",url:"globals_defs.html",children:[ +{text:"x",url:"globals_defs.html#index_x"}]}]}]}]} diff --git a/doc/v0.8.3/minus.svg b/doc/v0.8.3/minus.svg new file mode 100644 index 00000000..f70d0c1a --- /dev/null +++ b/doc/v0.8.3/minus.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/doc/v0.8.3/minusd.svg b/doc/v0.8.3/minusd.svg new file mode 100644 index 00000000..5f8e8796 --- /dev/null +++ b/doc/v0.8.3/minusd.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/doc/v0.8.3/modules.html b/doc/v0.8.3/modules.html new file mode 100644 index 00000000..2d07b7a2 --- /dev/null +++ b/doc/v0.8.3/modules.html @@ -0,0 +1,96 @@ + + + + + + + +xxHash: Modules + + + + + + + + + +
    +
    + + + + + + +
    +
    xxHash 0.8.2 +
    +
    Extremely fast non-cryptographic hash function
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Modules
    +
    +
    +
    Here is a list of all modules:
    +
    + + + + diff --git a/doc/v0.8.3/nav_f.png b/doc/v0.8.3/nav_f.png new file mode 100644 index 00000000..41355090 Binary files /dev/null and b/doc/v0.8.3/nav_f.png differ diff --git a/doc/v0.8.3/nav_fd.png b/doc/v0.8.3/nav_fd.png new file mode 100644 index 00000000..aecd0f1d Binary files /dev/null and b/doc/v0.8.3/nav_fd.png differ diff --git a/doc/v0.8.3/nav_g.png b/doc/v0.8.3/nav_g.png new file mode 100644 index 00000000..2093a237 Binary files /dev/null and b/doc/v0.8.3/nav_g.png differ diff --git a/doc/v0.8.3/nav_h.png b/doc/v0.8.3/nav_h.png new file mode 100644 index 00000000..170909c6 Binary files /dev/null and b/doc/v0.8.3/nav_h.png differ diff --git a/doc/v0.8.3/nav_hd.png b/doc/v0.8.3/nav_hd.png new file mode 100644 index 00000000..4de27e5e Binary files /dev/null and b/doc/v0.8.3/nav_hd.png differ diff --git a/doc/v0.8.3/navtree.css b/doc/v0.8.3/navtree.css new file mode 100644 index 00000000..69211d4a --- /dev/null +++ b/doc/v0.8.3/navtree.css @@ -0,0 +1,149 @@ +#nav-tree .children_ul { + margin:0; + padding:4px; +} + +#nav-tree ul { + list-style:none outside none; + margin:0px; + padding:0px; +} + +#nav-tree li { + white-space:nowrap; + margin:0px; + padding:0px; +} + +#nav-tree .plus { + margin:0px; +} + +#nav-tree .selected { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: var(--nav-text-active-color); + text-shadow: var(--nav-text-active-shadow); +} + +#nav-tree .selected .arrow { + color: var(--nav-arrow-selected-color); + text-shadow: none; +} + +#nav-tree img { + margin:0px; + padding:0px; + border:0px; + vertical-align: middle; +} + +#nav-tree a { + text-decoration:none; + padding:0px; + margin:0px; +} + +#nav-tree .label { + margin:0px; + padding:0px; + font: 12px var(--font-family-nav); +} + +#nav-tree .label a { + padding:2px; +} + +#nav-tree .selected a { + text-decoration:none; + color:var(--nav-text-active-color); +} + +#nav-tree .children_ul { + margin:0px; + padding:0px; +} + +#nav-tree .item { + margin:0px; + padding:0px; +} + +#nav-tree { + padding: 0px 0px; + font-size:14px; + overflow:auto; +} + +#doc-content { + overflow:auto; + display:block; + padding:0px; + margin:0px; + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#side-nav { + padding:0 6px 0 0; + margin: 0px; + display:block; + position: absolute; + left: 0px; + width: $width; + overflow : hidden; +} + +.ui-resizable .ui-resizable-handle { + display:block; +} + +.ui-resizable-e { + background-image:var(--nav-splitbar-image); + background-size:100%; + background-repeat:repeat-y; + background-attachment: scroll; + cursor:ew-resize; + height:100%; + right:0; + top:0; + width:6px; +} + +.ui-resizable-handle { + display:none; + font-size:0.1px; + position:absolute; + z-index:1; +} + +#nav-tree-contents { + margin: 6px 0px 0px 0px; +} + +#nav-tree { + background-repeat:repeat-x; + background-color: var(--nav-background-color); + -webkit-overflow-scrolling : touch; /* iOS 5+ */ +} + +#nav-sync { + position:absolute; + top:5px; + right:24px; + z-index:0; +} + +#nav-sync img { + opacity:0.3; +} + +#nav-sync img:hover { + opacity:0.9; +} + +@media print +{ + #nav-tree { display: none; } + div.ui-resizable-handle { display: none; position: relative; } +} + diff --git a/doc/v0.8.3/navtree.js b/doc/v0.8.3/navtree.js new file mode 100644 index 00000000..2d4fa84a --- /dev/null +++ b/doc/v0.8.3/navtree.js @@ -0,0 +1,483 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function initNavTree(toroot,relpath) { + let navTreeSubIndices = []; + const ARROW_DOWN = '▼'; + const ARROW_RIGHT = '►'; + const NAVPATH_COOKIE_NAME = ''+'navpath'; + + const getData = function(varName) { + const i = varName.lastIndexOf('/'); + const n = i>=0 ? varName.substring(i+1) : varName; + return eval(n.replace(/-/g,'_')); + } + + const stripPath = function(uri) { + return uri.substring(uri.lastIndexOf('/')+1); + } + + const stripPath2 = function(uri) { + const i = uri.lastIndexOf('/'); + const s = uri.substring(i+1); + const m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); + return m ? uri.substring(i-6) : s; + } + + const hashValue = function() { + return $(location).attr('hash').substring(1).replace(/[^\w-]/g,''); + } + + const hashUrl = function() { + return '#'+hashValue(); + } + + const pathName = function() { + return $(location).attr('pathname').replace(/[^-A-Za-z0-9+&@#/%?=~_|!:,.;()]/g, ''); + } + + const storeLink = function(link) { + if (!$("#nav-sync").hasClass('sync')) { + Cookie.writeSetting(NAVPATH_COOKIE_NAME,link,0); + } + } + + const deleteLink = function() { + Cookie.eraseSetting(NAVPATH_COOKIE_NAME); + } + + const cachedLink = function() { + return Cookie.readSetting(NAVPATH_COOKIE_NAME,''); + } + + const getScript = function(scriptName,func) { + const head = document.getElementsByTagName("head")[0]; + const script = document.createElement('script'); + script.id = scriptName; + script.type = 'text/javascript'; + script.onload = func; + script.src = scriptName+'.js'; + head.appendChild(script); + } + + const createIndent = function(o,domNode,node) { + let level=-1; + let n = node; + while (n.parentNode) { level++; n=n.parentNode; } + if (node.childrenData) { + const imgNode = document.createElement("span"); + imgNode.className = 'arrow'; + imgNode.style.paddingLeft=(16*level).toString()+'px'; + imgNode.innerHTML=ARROW_RIGHT; + node.plus_img = imgNode; + node.expandToggle = document.createElement("a"); + node.expandToggle.href = "javascript:void(0)"; + node.expandToggle.onclick = function() { + if (node.expanded) { + $(node.getChildrenUL()).slideUp("fast"); + node.plus_img.innerHTML=ARROW_RIGHT; + node.expanded = false; + } else { + expandNode(o, node, false, true); + } + } + node.expandToggle.appendChild(imgNode); + domNode.appendChild(node.expandToggle); + } else { + let span = document.createElement("span"); + span.className = 'arrow'; + span.style.width = 16*(level+1)+'px'; + span.innerHTML = ' '; + domNode.appendChild(span); + } + } + + let animationInProgress = false; + + const gotoAnchor = function(anchor,aname) { + let pos, docContent = $('#doc-content'); + let ancParent = $(anchor.parent()); + if (ancParent.hasClass('memItemLeft') || ancParent.hasClass('memtitle') || + ancParent.hasClass('fieldname') || ancParent.hasClass('fieldtype') || + ancParent.is(':header')) { + pos = ancParent.offset().top; + } else if (anchor.position()) { + pos = anchor.offset().top; + } + if (pos) { + const dcOffset = docContent.offset().top; + const dcHeight = docContent.height(); + const dcScrHeight = docContent[0].scrollHeight + const dcScrTop = docContent.scrollTop(); + let dist = Math.abs(Math.min(pos-dcOffset,dcScrHeight-dcHeight-dcScrTop)); + animationInProgress = true; + docContent.animate({ + scrollTop: pos + dcScrTop - dcOffset + },Math.max(50,Math.min(500,dist)),function() { + animationInProgress=false; + if (anchor.parent().attr('class')=='memItemLeft') { + let rows = $('.memberdecls tr[class$="'+hashValue()+'"]'); + glowEffect(rows.children(),300); // member without details + } else if (anchor.parent().attr('class')=='fieldname') { + glowEffect(anchor.parent().parent(),1000); // enum value + } else if (anchor.parent().attr('class')=='fieldtype') { + glowEffect(anchor.parent().parent(),1000); // struct field + } else if (anchor.parent().is(":header")) { + glowEffect(anchor.parent(),1000); // section header + } else { + glowEffect(anchor.next(),1000); // normal member + } + }); + } + } + + const newNode = function(o, po, text, link, childrenData, lastNode) { + const node = { + children : [], + childrenData : childrenData, + depth : po.depth + 1, + relpath : po.relpath, + isLast : lastNode, + li : document.createElement("li"), + parentNode : po, + itemDiv : document.createElement("div"), + labelSpan : document.createElement("span"), + label : document.createTextNode(text), + expanded : false, + childrenUL : null, + getChildrenUL : function() { + if (!this.childrenUL) { + this.childrenUL = document.createElement("ul"); + this.childrenUL.className = "children_ul"; + this.childrenUL.style.display = "none"; + this.li.appendChild(node.childrenUL); + } + return node.childrenUL; + }, + }; + + node.itemDiv.className = "item"; + node.labelSpan.className = "label"; + createIndent(o,node.itemDiv,node); + node.itemDiv.appendChild(node.labelSpan); + node.li.appendChild(node.itemDiv); + + const a = document.createElement("a"); + node.labelSpan.appendChild(a); + po.getChildrenUL().appendChild(node.li); + a.appendChild(node.label); + if (link) { + let url; + if (link.substring(0,1)=='^') { + url = link.substring(1); + link = url; + } else { + url = node.relpath+link; + } + a.className = stripPath(link.replace('#',':')); + if (link.indexOf('#')!=-1) { + const aname = '#'+link.split('#')[1]; + const srcPage = stripPath(pathName()); + const targetPage = stripPath(link.split('#')[0]); + a.href = srcPage!=targetPage ? url : aname; + a.onclick = function() { + storeLink(link); + aPPar = $(a).parent().parent(); + if (!aPPar.hasClass('selected')) { + $('.item').removeClass('selected'); + $('.item').removeAttr('id'); + aPPar.addClass('selected'); + aPPar.attr('id','selected'); + } + const anchor = $(aname); + gotoAnchor(anchor,aname); + }; + } else { + a.href = url; + a.onclick = () => storeLink(link); + } + } else if (childrenData != null) { + a.className = "nolink"; + a.href = "javascript:void(0)"; + a.onclick = node.expandToggle.onclick; + } + return node; + } + + const showRoot = function() { + const headerHeight = $("#top").height(); + const footerHeight = $("#nav-path").height(); + const windowHeight = $(window).height() - headerHeight - footerHeight; + (function() { // retry until we can scroll to the selected item + try { + const navtree=$('#nav-tree'); + navtree.scrollTo('#selected',100,{offset:-windowHeight/2}); + } catch (err) { + setTimeout(arguments.callee, 0); + } + })(); + } + + const expandNode = function(o, node, imm, setFocus) { + if (node.childrenData && !node.expanded) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + expandNode(o, node, imm, setFocus); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).slideDown("fast"); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + if (setFocus) { + $(node.expandToggle).focus(); + } + } + } + } + + const glowEffect = function(n,duration) { + n.addClass('glow').delay(duration).queue(function(next) { + $(this).removeClass('glow');next(); + }); + } + + const highlightAnchor = function() { + const aname = hashUrl(); + const anchor = $(aname); + gotoAnchor(anchor,aname); + } + + const selectAndHighlight = function(hash,n) { + let a; + if (hash) { + const link=stripPath(pathName())+':'+hash.substring(1); + a=$('.item a[class$="'+link+'"]'); + } + if (a && a.length) { + a.parent().parent().addClass('selected'); + a.parent().parent().attr('id','selected'); + highlightAnchor(); + } else if (n) { + $(n.itemDiv).addClass('selected'); + $(n.itemDiv).attr('id','selected'); + } + let topOffset=5; + if ($('#nav-tree-contents .item:first').hasClass('selected')) { + topOffset+=25; + } + $('#nav-sync').css('top',topOffset+'px'); + showRoot(); + } + + const showNode = function(o, node, index, hash) { + if (node && node.childrenData) { + if (typeof(node.childrenData)==='string') { + const varName = node.childrenData; + getScript(node.relpath+varName,function() { + node.childrenData = getData(varName); + showNode(o,node,index,hash); + }); + } else { + if (!node.childrenVisited) { + getNode(o, node); + } + $(node.getChildrenUL()).css({'display':'block'}); + node.plus_img.innerHTML = ARROW_DOWN; + node.expanded = true; + const n = node.children[o.breadcrumbs[index]]; + if (index+11 ? '#'+parts[1].replace(/[^\w-]/g,'') : ''; + } + if (hash.match(/^#l\d+$/)) { + const anchor=$('a[name='+hash.substring(1)+']'); + glowEffect(anchor.parent(),1000); // line number + hash=''; // strip line number anchors + } + const url=root+hash; + let i=-1; + while (NAVTREEINDEX[i+1]<=url) i++; + if (i==-1) { i=0; root=NAVTREE[0][1]; } // fallback: show index + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath) + } else { + getScript(relpath+'navtreeindex'+i,function() { + navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); + if (navTreeSubIndices[i]) { + gotoNode(o,i,root,hash,relpath); + } + }); + } + } + + const showSyncOff = function(n,relpath) { + n.html(''); + } + + const showSyncOn = function(n,relpath) { + n.html(''); + } + + const o = { + toroot : toroot, + node : { + childrenData : NAVTREE, + children : [], + childrenUL : document.createElement("ul"), + getChildrenUL : function() { return this.childrenUL }, + li : document.getElementById("nav-tree-contents"), + depth : 0, + relpath : relpath, + expanded : false, + isLast : true, + plus_img : document.createElement("span"), + }, + }; + o.node.li.appendChild(o.node.childrenUL); + o.node.plus_img.className = 'arrow'; + o.node.plus_img.innerHTML = ARROW_RIGHT; + + const navSync = $('#nav-sync'); + if (cachedLink()) { + showSyncOff(navSync,relpath); + navSync.removeClass('sync'); + } else { + showSyncOn(navSync,relpath); + } + + navSync.click(() => { + const navSync = $('#nav-sync'); + if (navSync.hasClass('sync')) { + navSync.removeClass('sync'); + showSyncOff(navSync,relpath); + storeLink(stripPath2(pathName())+hashUrl()); + } else { + navSync.addClass('sync'); + showSyncOn(navSync,relpath); + deleteLink(); + } + }); + + navTo(o,toroot,hashUrl(),relpath); + showRoot(); + + $(window).bind('hashchange', () => { + if (!animationInProgress) { + if (window.location.hash && window.location.hash.length>1) { + let a; + if ($(location).attr('hash')) { + const clslink=stripPath(pathName())+':'+hashValue(); + a=$('.item a[class$="'+clslink.replace(/ + + + + + + + + diff --git a/doc/v0.8.3/plusd.svg b/doc/v0.8.3/plusd.svg new file mode 100644 index 00000000..0c65bfe9 --- /dev/null +++ b/doc/v0.8.3/plusd.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/doc/v0.8.3/resize.js b/doc/v0.8.3/resize.js new file mode 100644 index 00000000..178d03bc --- /dev/null +++ b/doc/v0.8.3/resize.js @@ -0,0 +1,147 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ + +function initResizable(treeview) { + let sidenav,navtree,content,header,footer,barWidth=6; + const RESIZE_COOKIE_NAME = ''+'width'; + + function resizeWidth() { + const sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(sidenavWidth)+"px"}); + } + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); + } + + function restoreWidth(navWidth) { + content.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + if (typeof page_layout!=='undefined' && page_layout==1) { + footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"}); + } + sidenav.css({width:navWidth + "px"}); + } + + function resizeHeight(treeview) { + const headerHeight = header.outerHeight(); + const windowHeight = $(window).height(); + let contentHeight; + if (treeview) + { + const footerHeight = footer.outerHeight(); + let navtreeHeight,sideNavHeight; + if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */ + contentHeight = windowHeight - headerHeight - footerHeight; + navtreeHeight = contentHeight; + sideNavHeight = contentHeight; + } else if (page_layout==1) { /* DISABLE_INDEX=YES */ + contentHeight = windowHeight - footerHeight; + navtreeHeight = windowHeight - headerHeight; + sideNavHeight = windowHeight; + } + navtree.css({height:navtreeHeight + "px"}); + sidenav.css({height:sideNavHeight + "px"}); + } + else + { + contentHeight = windowHeight - headerHeight; + } + content.css({height:contentHeight + "px"}); + if (location.hash.slice(1)) { + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); + } + } + + function collapseExpand() { + let newWidth; + if (sidenav.width()>0) { + newWidth=0; + } else { + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + newWidth = (width>250 && width<$(window).width()) ? width : 250; + } + restoreWidth(newWidth); + const sidenavWidth = $(sidenav).outerWidth(); + Cookie.writeSetting(RESIZE_COOKIE_NAME,sidenavWidth-barWidth); + } + + header = $("#top"); + content = $("#doc-content"); + footer = $("#nav-path"); + sidenav = $("#side-nav"); + if (!treeview) { +// title = $("#titlearea"); +// titleH = $(title).height(); +// let animating = false; +// content.on("scroll", function() { +// slideOpts = { duration: 200, +// step: function() { +// contentHeight = $(window).height() - header.outerHeight(); +// content.css({ height : contentHeight + "px" }); +// }, +// done: function() { animating=false; } +// }; +// if (content.scrollTop()>titleH && title.css('display')!='none' && !animating) { +// title.slideUp(slideOpts); +// animating=true; +// } else if (content.scrollTop()<=titleH && title.css('display')=='none' && !animating) { +// title.slideDown(slideOpts); +// animating=true; +// } +// }); + } else { + navtree = $("#nav-tree"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(sidenav).resizable({ minWidth: 0 }); + } + $(window).resize(function() { resizeHeight(treeview); }); + if (treeview) + { + const device = navigator.userAgent.toLowerCase(); + const touch_device = device.match(/(iphone|ipod|ipad|android)/); + if (touch_device) { /* wider split bar for touch only devices */ + $(sidenav).css({ paddingRight:'20px' }); + $('.ui-resizable-e').css({ width:'20px' }); + $('#nav-sync').css({ right:'34px' }); + barWidth=20; + } + const width = Cookie.readSetting(RESIZE_COOKIE_NAME,250); + if (width) { restoreWidth(width); } else { resizeWidth(); } + } + resizeHeight(treeview); + const url = location.href; + const i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + const _preventDefault = function(evt) { evt.preventDefault(); }; + if (treeview) + { + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(".ui-resizable-handle").dblclick(collapseExpand); + // workaround for firefox + $("body").css({overflow: "hidden"}); + } + $(window).on('load',function() { resizeHeight(treeview); }); +} +/* @license-end */ diff --git a/doc/v0.8.3/search/all_0.js b/doc/v0.8.3/search/all_0.js new file mode 100644 index 00000000..a05838b3 --- /dev/null +++ b/doc/v0.8.3/search/all_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['acc_0',['acc',['../struct_x_x_h32__state__s.html#aec9b2929a5731e45e70bb477b7038fae',1,'XXH32_state_s::acc'],['../struct_x_x_h64__state__s.html#a6b0b9f4f81a229112db01253ee52fa8f',1,'XXH64_state_s::acc'],['../struct_x_x_h3__state__s.html#ad46e292aaa3931ffcceb961ee129ccd5',1,'XXH3_state_s::acc']]], + ['api_1',['Public API',['../group__public.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/all_1.js b/doc/v0.8.3/search/all_1.js new file mode 100644 index 00000000..96fb38cb --- /dev/null +++ b/doc/v0.8.3/search/all_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['benchmarks_0',['Benchmarks',['../index.html#autotoc_md0',1,'']]], + ['buffer_1',['buffer',['../struct_x_x_h32__state__s.html#afd19b6ddfd672c1c0bc3a4e9554b2d97',1,'XXH32_state_s::buffer'],['../struct_x_x_h64__state__s.html#a02b6fc84cac440849886df2828c4be79',1,'XXH64_state_s::buffer'],['../struct_x_x_h3__state__s.html#ab2a8c0eba9804ece6442a6ab3ff49f7e',1,'XXH3_state_s::buffer']]], + ['bufferedsize_2',['bufferedSize',['../struct_x_x_h32__state__s.html#a379b06dfccb48d2e08ac722ecd2357cc',1,'XXH32_state_s::bufferedSize'],['../struct_x_x_h64__state__s.html#a9f6135565b33d7398cbe6867c273f970',1,'XXH64_state_s::bufferedSize'],['../struct_x_x_h3__state__s.html#a19ba097c74cfa101eaabfd66b3801464',1,'XXH3_state_s::bufferedSize']]] +]; diff --git a/doc/v0.8.3/search/all_10.js b/doc/v0.8.3/search/all_10.js new file mode 100644 index 00000000..9f55a15c --- /dev/null +++ b/doc/v0.8.3/search/all_10.js @@ -0,0 +1,128 @@ +var searchData= +[ + ['x86_20dispatcher_0',['x86 Dispatcher',['../group__dispatch.html',1,'']]], + ['xxh128_1',['XXH128',['../group___x_x_h3__family.html#ga7090a47ff2c03b7da2082d776610aa95',1,'xxhash.h']]], + ['xxh128_5fcanonical_5ft_2',['XXH128_canonical_t',['../struct_x_x_h128__canonical__t.html',1,'']]], + ['xxh128_5fcanonicalfromhash_3',['XXH128_canonicalFromHash',['../group___x_x_h3__family.html#ga04a6b47e068251634e4984117eae520a',1,'xxhash.h']]], + ['xxh128_5fcmp_4',['XXH128_cmp',['../group___x_x_h3__family.html#ga6f31fe3cef649f8b78fca6e5040f9b74',1,'xxhash.h']]], + ['xxh128_5fhash_5ft_5',['XXH128_hash_t',['../struct_x_x_h128__hash__t.html',1,'']]], + ['xxh128_5fhashfromcanonical_6',['XXH128_hashFromCanonical',['../group___x_x_h3__family.html#ga9fe959cfcddb1dad57a532eb57d22661',1,'xxhash.h']]], + ['xxh128_5fisequal_7',['XXH128_isEqual',['../group___x_x_h3__family.html#gae48a69e41062619715826660580d42ab',1,'xxhash.h']]], + ['xxh3_20family_8',['XXH3 family',['../group___x_x_h3__family.html',1,'']]], + ['xxh3_20implementation_9',['XXH3 implementation',['../group___x_x_h3__impl.html',1,'']]], + ['xxh32_10',['XXH32',['../group___x_x_h32__family.html#ga310c01be2371883ad3bb37930626ec86',1,'xxhash.h']]], + ['xxh32_20family_11',['XXH32 family',['../group___x_x_h32__family.html',1,'']]], + ['xxh32_20implementation_12',['XXH32 implementation',['../group___x_x_h32__impl.html',1,'']]], + ['xxh32_5fcanonical_5ft_13',['XXH32_canonical_t',['../struct_x_x_h32__canonical__t.html',1,'']]], + ['xxh32_5fcanonicalfromhash_14',['XXH32_canonicalFromHash',['../group___x_x_h32__family.html#gab033c1336e85ab51e02f1987254af9bd',1,'xxhash.h']]], + ['xxh32_5fcopystate_15',['XXH32_copyState',['../group___x_x_h32__family.html#gaed14b659149c1327acac124a07ee29d3',1,'xxhash.h']]], + ['xxh32_5fcreatestate_16',['XXH32_createState',['../group___x_x_h32__family.html#ga7d53ff3de134f4e294de011cc3e6a498',1,'xxhash.h']]], + ['xxh32_5fdigest_17',['XXH32_digest',['../group___x_x_h32__family.html#gae4d82d62718fd5e09c83ad3f639c892a',1,'xxhash.h']]], + ['xxh32_5fendjmp_18',['XXH32_ENDJMP',['../group__tuning.html#gad5824529c4ad74d2d5cc05bf4868613a',1,'xxhash.h']]], + ['xxh32_5ffreestate_19',['XXH32_freeState',['../group___x_x_h32__family.html#ga87d9d298652e8d5560f482c963ddd6c8',1,'xxhash.h']]], + ['xxh32_5fhash_5ft_20',['XXH32_hash_t',['../group__public.html#ga469df6c7273f15924de58143ef1afe14',1,'xxhash.h']]], + ['xxh32_5fhashfromcanonical_21',['XXH32_hashFromCanonical',['../group___x_x_h32__family.html#gac3cf699c65b7b63df08964c56b1bdaf5',1,'xxhash.h']]], + ['xxh32_5freset_22',['XXH32_reset',['../group___x_x_h32__family.html#ga00a68397351fe1d54fe23a831294b4ef',1,'xxhash.h']]], + ['xxh32_5fstate_5fs_23',['XXH32_state_s',['../struct_x_x_h32__state__s.html',1,'']]], + ['xxh32_5fstate_5ft_24',['XXH32_state_t',['../group___x_x_h32__family.html#ga0c18948935999c41f3f3cb74db83e51e',1,'xxhash.h']]], + ['xxh32_5fupdate_25',['XXH32_update',['../group___x_x_h32__family.html#ga40aa0e1469b0db64a4694cd97c8563b4',1,'xxhash.h']]], + ['xxh3_5f128bits_26',['XXH3_128bits',['../group___x_x_h3__family.html#ga8051df2b6621c36b542ae1b5df2dd2f9',1,'xxhash.h']]], + ['xxh3_5f128bits_5fdigest_27',['XXH3_128bits_digest',['../group___x_x_h3__family.html#ga1239aeb6d2b2604f8d227ff5546473f8',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_28',['XXH3_128bits_reset',['../group___x_x_h3__family.html#gaf4fef3307630a356a65eaf1589db53c0',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithsecret_29',['XXH3_128bits_reset_withSecret',['../group___x_x_h3__family.html#ga16f78f1d03c546e274ee18fe32ed2f6b',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithsecretandseed_30',['XXH3_128bits_reset_withSecretandSeed',['../group___x_x_h3__family.html#ga57580a70118de171d0236b415d488b3e',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithseed_31',['XXH3_128bits_reset_withSeed',['../group___x_x_h3__family.html#ga7e225fe11a64c6a3a4a95668d8389794',1,'xxhash.h']]], + ['xxh3_5f128bits_5fupdate_32',['XXH3_128bits_update',['../group___x_x_h3__family.html#ga08cea3acdfdc9bc7102c4ae133ef702a',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithsecret_33',['XXH3_128bits_withSecret',['../group___x_x_h3__family.html#ga192ce854fdff8d491ec5201268007401',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithsecretandseed_34',['XXH3_128bits_withSecretandSeed',['../group___x_x_h3__family.html#ga7c198e9d131046515c7d6a2d65d099b7',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithseed_35',['XXH3_128bits_withSeed',['../group___x_x_h3__family.html#ga2c66790514ddccf7ac33e4ed1b1ad5e7',1,'xxhash.h']]], + ['xxh3_5f64bits_36',['XXH3_64bits',['../group___x_x_h3__family.html#ga0c06e71549705effd58cb7bd0969307e',1,'xxhash.h']]], + ['xxh3_5f64bits_5fdigest_37',['XXH3_64bits_digest',['../group___x_x_h3__family.html#ga8fd6a50b808c5fc47f91ed3f5b85fcfc',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_38',['XXH3_64bits_reset',['../group___x_x_h3__family.html#gab540c4db302e1845b6061d1572bcd76e',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithsecret_39',['XXH3_64bits_reset_withSecret',['../group___x_x_h3__family.html#ga0ebc78d44e7767aa2779571bd118a126',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithsecretandseed_40',['XXH3_64bits_reset_withSecretandSeed',['../group___x_x_h3__family.html#ga2680c1ef72d4deab6fe8e00b7eb83ee5',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithseed_41',['XXH3_64bits_reset_withSeed',['../group___x_x_h3__family.html#gaa7e751b1131fccff2be34624ff770591',1,'xxhash.h']]], + ['xxh3_5f64bits_5fupdate_42',['XXH3_64bits_update',['../group___x_x_h3__family.html#gacca0e39d67b023700ade8b0eca4e0a13',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithsecret_43',['XXH3_64bits_withSecret',['../group___x_x_h3__family.html#ga870ba5470efb3befb1a70cb35dae12cd',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithsecretandseed_44',['XXH3_64bits_withSecretandSeed',['../group___x_x_h3__impl.html#ga459abaf918a0abac51dcbfe58a0e2dc9',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithseed_45',['XXH3_64bits_withSeed',['../group___x_x_h3__family.html#ga4b51002ff2a438e38c1ee45abcd09659',1,'xxhash.h']]], + ['xxh3_5fcopystate_46',['XXH3_copyState',['../group___x_x_h3__family.html#ga77f6f3b90b0b88415927dfe3e045b35e',1,'xxhash.h']]], + ['xxh3_5fcreatestate_47',['XXH3_createState',['../group___x_x_h3__family.html#ga95592969a08becc37428dd547c36b8fd',1,'xxhash.h']]], + ['xxh3_5ffreestate_48',['XXH3_freeState',['../group___x_x_h3__family.html#gaee640ba2104fe3107b7d679f40d17277',1,'xxhash.h']]], + ['xxh3_5fgeneratesecret_49',['XXH3_generateSecret',['../group___x_x_h3__family.html#ga88a3a4fbe45ae0863652178fa00465b3',1,'xxhash.h']]], + ['xxh3_5fgeneratesecret_5ffromseed_50',['XXH3_generateSecret_fromSeed',['../group___x_x_h3__family.html#gaa895f02acfc127b1d34d0d558a6773b0',1,'xxhash.h']]], + ['xxh3_5finitstate_51',['XXH3_INITSTATE',['../xxhash_8h.html#afc79de39f0cf7e8d395f131c0d9d568e',1,'xxhash.h']]], + ['xxh3_5finline_5fsecret_52',['XXH3_INLINE_SECRET',['../group__tuning.html#gaa6d5f6ddf0a7d14b90a63cb6a9d34c26',1,'xxhash.h']]], + ['xxh3_5finternalbuffer_5fsize_53',['XXH3_INTERNALBUFFER_SIZE',['../xxhash_8h.html#a2124b1e53c873d18b16e23200c9b49a0',1,'xxhash.h']]], + ['xxh3_5fneon_5flanes_54',['XXH3_NEON_LANES',['../group__tuning.html#gac799ce966f18e4837f7fdc3d51917e9c',1,'xxhash.h']]], + ['xxh3_5fsecret_5fsize_5fmin_55',['XXH3_SECRET_SIZE_MIN',['../group___x_x_h3__family.html#gaeb79a9111c58af32599f8e5cd71d67d2',1,'xxhash.h']]], + ['xxh3_5fstate_5fs_56',['XXH3_state_s',['../struct_x_x_h3__state__s.html',1,'']]], + ['xxh3_5fstate_5ft_57',['XXH3_state_t',['../group___x_x_h3__family.html#ga8e454084a62efb09fad8ba3cc1c1b1d0',1,'xxhash.h']]], + ['xxh64_58',['XXH64',['../group___x_x_h64__family.html#ga089c4003cb11acb60d3d1b439c69e336',1,'xxhash.h']]], + ['xxh64_20family_59',['XXH64 family',['../group___x_x_h64__family.html',1,'']]], + ['xxh64_20implementation_60',['XXH64 implementation',['../group___x_x_h64__impl.html',1,'']]], + ['xxh64_5fcanonical_5ft_61',['XXH64_canonical_t',['../struct_x_x_h64__canonical__t.html',1,'']]], + ['xxh64_5fcanonicalfromhash_62',['XXH64_canonicalFromHash',['../group___x_x_h64__family.html#ga8617f3a6dee3b079321a72567b217cf3',1,'xxhash.h']]], + ['xxh64_5fcopystate_63',['XXH64_copyState',['../group___x_x_h64__family.html#ga52f4064b367f8b1749901ebc2aaede33',1,'xxhash.h']]], + ['xxh64_5fcreatestate_64',['XXH64_createState',['../group___x_x_h64__family.html#gadcfc7fb0e3382dc0b13afb125a0fea5c',1,'xxhash.h']]], + ['xxh64_5fdigest_65',['XXH64_digest',['../group___x_x_h64__family.html#gaec9b8c90dc352b9a4ea3af8a43c89d15',1,'xxhash.h']]], + ['xxh64_5ffreestate_66',['XXH64_freeState',['../group___x_x_h64__family.html#gac03f9ec46a29db6f6a999c832cf759de',1,'xxhash.h']]], + ['xxh64_5fhash_5ft_67',['XXH64_hash_t',['../group__public.html#ga5406b285b18dfcefa93efed489e3b603',1,'xxhash.h']]], + ['xxh64_5fhashfromcanonical_68',['XXH64_hashFromCanonical',['../group___x_x_h64__family.html#ga9ae48e3db5aa55ffb3b33a996bc92f75',1,'xxhash.h']]], + ['xxh64_5freset_69',['XXH64_reset',['../group___x_x_h64__family.html#ga190e92402228236a9da2bcc72840af48',1,'xxhash.h']]], + ['xxh64_5fstate_5fs_70',['XXH64_state_s',['../struct_x_x_h64__state__s.html',1,'']]], + ['xxh64_5fstate_5ft_71',['XXH64_state_t',['../group___x_x_h64__family.html#ga0702bdbc80b0cf9e94f2379f7d839b8c',1,'xxhash.h']]], + ['xxh64_5fupdate_72',['XXH64_update',['../group___x_x_h64__family.html#gaed5cf31d2a0b528d4f05abfd447b1b1e',1,'xxhash.h']]], + ['xxh_5facc_5falign_73',['XXH_ACC_ALIGN',['../group__tuning.html#ga15f2f40c9206c691f66cf260841f8ad1',1,'xxhash.h']]], + ['xxh_5faligned_74',['XXH_aligned',['../group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5a41340c9f33fe739cef7a1c56dc617194',1,'xxhash.h']]], + ['xxh_5falignment_75',['XXH_alignment',['../group__impl.html#gadec56fccd4f83e34902b6b09ecccfff5',1,'xxhash.h']]], + ['xxh_5favx2_76',['XXH_AVX2',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151a96572760b51d70b97f5db1ebf0a95995',1,'xxhash.h']]], + ['xxh_5favx512_77',['XXH_AVX512',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151a38698e7f6fc187288a40dcf362006c29',1,'xxhash.h']]], + ['xxh_5fcpu_5flittle_5fendian_78',['XXH_CPU_LITTLE_ENDIAN',['../group__tuning.html#ga408fac02658eb4a81f7a1877f1ca3b3f',1,'xxhash.h']]], + ['xxh_5fdebuglevel_79',['XXH_DEBUGLEVEL',['../group__tuning.html#ga574ceb8ab088243cb0dc833b28320eb5',1,'xxhash.h']]], + ['xxh_5fdispatch_5favx2_80',['XXH_DISPATCH_AVX2',['../group__dispatch.html#ga3f9ae9edb0b15907592a18f74996f523',1,'xxh_x86dispatch.c']]], + ['xxh_5fdispatch_5favx512_81',['XXH_DISPATCH_AVX512',['../group__dispatch.html#gae0ba94e5d5bf66251a96f86b3cd7e08a',1,'xxh_x86dispatch.c']]], + ['xxh_5fdispatch_5fscalar_82',['XXH_DISPATCH_SCALAR',['../group__dispatch.html#gab81e416548f2b86412f670dc435a979b',1,'xxh_x86dispatch.c']]], + ['xxh_5ferror_83',['XXH_ERROR',['../group__public.html#gga5020905455674b8c83c1dbc73f0d3534a462a18276729783125c7116cf102667f',1,'xxhash.h']]], + ['xxh_5ferrorcode_84',['XXH_errorcode',['../group__public.html#ga5020905455674b8c83c1dbc73f0d3534',1,'xxhash.h']]], + ['xxh_5fforce_5falign_5fcheck_85',['XXH_FORCE_ALIGN_CHECK',['../group__tuning.html#gaee35763869a969d5576e70dac1c08b8d',1,'xxhash.h']]], + ['xxh_5fforce_5fmemory_5faccess_86',['XXH_FORCE_MEMORY_ACCESS',['../group__tuning.html#ga04b48241beb7c34e5929d328cf5cc71a',1,'xxhash.h']]], + ['xxh_5fimplementation_87',['XXH_IMPLEMENTATION',['../group__public.html#gaa40be3a031b9a5bd9afc800b0959a0c9',1,'xxhash.h']]], + ['xxh_5finline_5fall_88',['XXH_INLINE_ALL',['../group__public.html#ga5a61b869708b770ad75e3e063a2f9273',1,'xxhash.h']]], + ['xxh_5fnamespace_89',['XXH_NAMESPACE',['../group__public.html#gacde9dad44d3e0e432474bef93e12f9e7',1,'xxhash.h']]], + ['xxh_5fneon_90',['XXH_NEON',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151a2b9cfb9a77ed183f8551243bb2f490cb',1,'xxhash.h']]], + ['xxh_5fno_5finline_5fhints_91',['XXH_NO_INLINE_HINTS',['../group__tuning.html#gae980c41901d840d8909aa74d603ad4f1',1,'xxhash.h']]], + ['xxh_5fno_5flong_5flong_92',['XXH_NO_LONG_LONG',['../group__tuning.html#ga7e738bf7fb8249e8a834a8c8a8581d80',1,'xxhash.h']]], + ['xxh_5fno_5fstream_93',['XXH_NO_STREAM',['../group__tuning.html#ga96f0b839b3187287c904d37c993f6d1f',1,'xxhash.h']]], + ['xxh_5fok_94',['XXH_OK',['../group__public.html#gga5020905455674b8c83c1dbc73f0d3534abd20b092d624344e301b0cadd29d5bd6',1,'xxhash.h']]], + ['xxh_5fprime32_5f1_95',['XXH_PRIME32_1',['../group___x_x_h32__impl.html#ga29fede2b86ee758448c55edf6171e11f',1,'xxhash.h']]], + ['xxh_5fprime32_5f2_96',['XXH_PRIME32_2',['../group___x_x_h32__impl.html#ga23d49e684c0551afaed8e4ff40940c79',1,'xxhash.h']]], + ['xxh_5fprime32_5f3_97',['XXH_PRIME32_3',['../group___x_x_h32__impl.html#gacdda6ef95561d39cf2f9b7f2cd5c6693',1,'xxhash.h']]], + ['xxh_5fprime32_5f4_98',['XXH_PRIME32_4',['../group___x_x_h32__impl.html#ga9f43a7ed63cb15dfc49b1a42c250e511',1,'xxhash.h']]], + ['xxh_5fprime32_5f5_99',['XXH_PRIME32_5',['../group___x_x_h32__impl.html#gaa4ab6ba3eb0659356b8ed3b84c43e3e7',1,'xxhash.h']]], + ['xxh_5fprime64_5f1_100',['XXH_PRIME64_1',['../group___x_x_h64__impl.html#ga20651a9ad53cae6f0a4feb1393d5a716',1,'xxhash.h']]], + ['xxh_5fprime64_5f2_101',['XXH_PRIME64_2',['../group___x_x_h64__impl.html#ga33a01ca165b68cef76da009a54e3ba54',1,'xxhash.h']]], + ['xxh_5fprime64_5f3_102',['XXH_PRIME64_3',['../group___x_x_h64__impl.html#gad18b925ab3b4ad25ae26eb4fb00ebcb8',1,'xxhash.h']]], + ['xxh_5fprime64_5f4_103',['XXH_PRIME64_4',['../group___x_x_h64__impl.html#ga6326d9c3883242a3b5602fae1507afc5',1,'xxhash.h']]], + ['xxh_5fprime64_5f5_104',['XXH_PRIME64_5',['../group___x_x_h64__impl.html#gae44b2a496b0a4184699e7d11ec2d70c6',1,'xxhash.h']]], + ['xxh_5fprivate_5fapi_105',['XXH_PRIVATE_API',['../group__public.html#ga6589b6ea961ec073de006a47282c9a41',1,'xxhash.h']]], + ['xxh_5fpublic_5fapi_106',['XXH_PUBLIC_API',['../group__public.html#ga5832897ed49938aefa629a76034b36b1',1,'XXH_PUBLIC_API: xxhash.h'],['../group__public.html#ga5832897ed49938aefa629a76034b36b1',1,'XXH_PUBLIC_API: xxhash.h']]], + ['xxh_5fscalar_107',['XXH_SCALAR',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151add8559df4f18bb2868e3c2bd5fa69a5e',1,'xxhash.h']]], + ['xxh_5fsize_5fopt_108',['XXH_SIZE_OPT',['../group__tuning.html#ga1e9850064fc149181cce7431f40a990a',1,'xxhash.h']]], + ['xxh_5fsse2_109',['XXH_SSE2',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151a47d2060710fcee22a971c9912f902aa4',1,'xxhash.h']]], + ['xxh_5fstatic_5flinking_5fonly_110',['XXH_STATIC_LINKING_ONLY',['../group__public.html#ga546f2633ae1036f49bdc5582971d7f1e',1,'xxhash.h']]], + ['xxh_5fsve_111',['XXH_SVE',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151aedef83e5c7f75801acbde3ea771fe9f1',1,'xxhash.h']]], + ['xxh_5ftarget_5favx2_112',['XXH_TARGET_AVX2',['../group__dispatch.html#gad2a40b306e49c6e6240acd43484ed5e0',1,'xxhash.h']]], + ['xxh_5ftarget_5favx512_113',['XXH_TARGET_AVX512',['../group__dispatch.html#ga94d06a353acaa62bbd9fbf65e865a282',1,'xxhash.h']]], + ['xxh_5ftarget_5fsse2_114',['XXH_TARGET_SSE2',['../group__dispatch.html#ga13e5de884479e06fa52a7cf484158e2e',1,'xxhash.h']]], + ['xxh_5funaligned_115',['XXH_unaligned',['../group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5ab082c14fd7eef12bcb1dfda2e813586f',1,'xxhash.h']]], + ['xxh_5fvector_116',['XXH_VECTOR',['../group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86',1,'XXH_VECTOR: xxhash.h'],['../group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86',1,'XXH_VECTOR: xxhash.h']]], + ['xxh_5fvector_5ftype_117',['XXH_VECTOR_TYPE',['../group__tuning.html#gaba09620eec7211bfe2567531495bf151',1,'xxhash.h']]], + ['xxh_5fversion_5fnumber_118',['XXH_VERSION_NUMBER',['../group__public.html#gacc66393fff091acefc0e2a00ec5462c4',1,'xxhash.h']]], + ['xxh_5fversionnumber_119',['XXH_versionNumber',['../group__public.html#gabc57fd428d4d33906b3830c746bc4ac9',1,'xxhash.h']]], + ['xxh_5fvsx_120',['XXH_VSX',['../group__tuning.html#ggaba09620eec7211bfe2567531495bf151a62278d38bf34bac7e8f5bbe354a46449',1,'xxhash.h']]], + ['xxh_5fx86dispatch_2ec_121',['xxh_x86dispatch.c',['../xxh__x86dispatch_8c.html',1,'']]], + ['xxh_5fx86dispatch_5fallow_5favx_122',['XXH_X86DISPATCH_ALLOW_AVX',['../group__dispatch.html#ga0664b262ede9b0ef5c286ae7e2e38e2a',1,'xxh_x86dispatch.c']]], + ['xxhash_123',['xxHash',['../index.html',1,'']]], + ['xxhash_2eh_124',['xxhash.h',['../xxhash_8h.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/all_2.js b/doc/v0.8.3/search/all_2.js new file mode 100644 index 00000000..85f28f1e --- /dev/null +++ b/doc/v0.8.3/search/all_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['customsecret_0',['customSecret',['../struct_x_x_h3__state__s.html#ac81c90a4d992f21a0dd00649b386b20f',1,'XXH3_state_s']]] +]; diff --git a/doc/v0.8.3/search/all_3.js b/doc/v0.8.3/search/all_3.js new file mode 100644 index 00000000..1950c08f --- /dev/null +++ b/doc/v0.8.3/search/all_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['digest_0',['digest',['../struct_x_x_h32__canonical__t.html#a85a83578344a5dd1c7a6cc0472230f30',1,'XXH32_canonical_t']]], + ['dispatcher_1',['x86 Dispatcher',['../group__dispatch.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/all_4.js b/doc/v0.8.3/search/all_4.js new file mode 100644 index 00000000..106fb89a --- /dev/null +++ b/doc/v0.8.3/search/all_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['extsecret_0',['extSecret',['../struct_x_x_h3__state__s.html#a14d42adf2a0fe05d8d1d5a8845dfe5df',1,'XXH3_state_s']]] +]; diff --git a/doc/v0.8.3/search/all_5.js b/doc/v0.8.3/search/all_5.js new file mode 100644 index 00000000..3636bd5d --- /dev/null +++ b/doc/v0.8.3/search/all_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['family_0',['family',['../group___x_x_h3__family.html',1,'XXH3 family'],['../group___x_x_h32__family.html',1,'XXH32 family'],['../group___x_x_h64__family.html',1,'XXH64 family']]] +]; diff --git a/doc/v0.8.3/search/all_6.js b/doc/v0.8.3/search/all_6.js new file mode 100644 index 00000000..0aa1df4b --- /dev/null +++ b/doc/v0.8.3/search/all_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['high64_0',['high64',['../struct_x_x_h128__hash__t.html#ad4e0c851eb11bd3f8042ceebc15fe0a8',1,'XXH128_hash_t']]] +]; diff --git a/doc/v0.8.3/search/all_7.js b/doc/v0.8.3/search/all_7.js new file mode 100644 index 00000000..2596ec15 --- /dev/null +++ b/doc/v0.8.3/search/all_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['implementation_0',['Implementation',['../group__impl.html',1,'']]], + ['implementation_1',['implementation',['../group___x_x_h3__impl.html',1,'XXH3 implementation'],['../group___x_x_h32__impl.html',1,'XXH32 implementation'],['../group___x_x_h64__impl.html',1,'XXH64 implementation']]] +]; diff --git a/doc/v0.8.3/search/all_8.js b/doc/v0.8.3/search/all_8.js new file mode 100644 index 00000000..2b344350 --- /dev/null +++ b/doc/v0.8.3/search/all_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['large_5flen_0',['large_len',['../struct_x_x_h32__state__s.html#a8f94809f2917da200c5a2bc2fa04926c',1,'XXH32_state_s']]], + ['low64_1',['low64',['../struct_x_x_h128__hash__t.html#a706323c9b3e76414ec77f8f93e8644ef',1,'XXH128_hash_t']]] +]; diff --git a/doc/v0.8.3/search/all_9.js b/doc/v0.8.3/search/all_9.js new file mode 100644 index 00000000..ec004edf --- /dev/null +++ b/doc/v0.8.3/search/all_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['nbstripesperblock_0',['nbStripesPerBlock',['../struct_x_x_h3__state__s.html#a976838a44d86b618f5421aa79f871e85',1,'XXH3_state_s']]], + ['nbstripessofar_1',['nbStripesSoFar',['../struct_x_x_h3__state__s.html#a4ab6b32aaa2b0a1187468db8349eaf9d',1,'XXH3_state_s']]] +]; diff --git a/doc/v0.8.3/search/all_a.js b/doc/v0.8.3/search/all_a.js new file mode 100644 index 00000000..151e9f00 --- /dev/null +++ b/doc/v0.8.3/search/all_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['parameters_0',['Tuning parameters',['../group__tuning.html',1,'']]], + ['public_20api_1',['Public API',['../group__public.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/all_b.js b/doc/v0.8.3/search/all_b.js new file mode 100644 index 00000000..87be45a8 --- /dev/null +++ b/doc/v0.8.3/search/all_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['reserved_0',['reserved',['../struct_x_x_h32__state__s.html#aa14a64f7deb1efaf6ad0c89ba6b5e92a',1,'XXH32_state_s']]], + ['reserved32_1',['reserved32',['../struct_x_x_h64__state__s.html#a1aedff2659c5622ad35b22f71928aa08',1,'XXH64_state_s']]], + ['reserved64_2',['reserved64',['../struct_x_x_h64__state__s.html#a8312bc02a62178387f9865ab49222065',1,'XXH64_state_s::reserved64'],['../struct_x_x_h3__state__s.html#a2986863b2aaf90025f05cb581dcba481',1,'XXH3_state_s::reserved64']]] +]; diff --git a/doc/v0.8.3/search/all_c.js b/doc/v0.8.3/search/all_c.js new file mode 100644 index 00000000..099e968e --- /dev/null +++ b/doc/v0.8.3/search/all_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['secretlimit_0',['secretLimit',['../struct_x_x_h3__state__s.html#a63a552ad1efda44641d1b80a9d23a505',1,'XXH3_state_s']]], + ['seed_1',['seed',['../struct_x_x_h3__state__s.html#aa402cadf01743cb1a9acbcbb24211bfb',1,'XXH3_state_s']]] +]; diff --git a/doc/v0.8.3/search/all_d.js b/doc/v0.8.3/search/all_d.js new file mode 100644 index 00000000..e7c37831 --- /dev/null +++ b/doc/v0.8.3/search/all_d.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['total_5flen_0',['total_len',['../struct_x_x_h64__state__s.html#af9e2c07ff283799907491063fbde80d5',1,'XXH64_state_s']]], + ['total_5flen_5f32_1',['total_len_32',['../struct_x_x_h32__state__s.html#a483391d07919dedaa835f67672328c61',1,'XXH32_state_s']]], + ['totallen_2',['totalLen',['../struct_x_x_h3__state__s.html#a2fa3f4b9482a5f1b4bf3aeb01cafbea4',1,'XXH3_state_s']]], + ['tuning_20parameters_3',['Tuning parameters',['../group__tuning.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/all_e.js b/doc/v0.8.3/search/all_e.js new file mode 100644 index 00000000..ada85572 --- /dev/null +++ b/doc/v0.8.3/search/all_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['usage_0',['Usage',['../index.html#autotoc_md1',1,'']]], + ['useseed_1',['useSeed',['../struct_x_x_h3__state__s.html#a5c54b1fb1396a7382c4352db7901654e',1,'XXH3_state_s']]] +]; diff --git a/doc/v0.8.3/search/all_f.js b/doc/v0.8.3/search/all_f.js new file mode 100644 index 00000000..27a07c6d --- /dev/null +++ b/doc/v0.8.3/search/all_f.js @@ -0,0 +1,129 @@ +var searchData= +[ + ['x86_20dispatcher_0',['x86 Dispatcher',['../group__dispatch.html',1,'']]], + ['xxh128_1',['XXH128',['../group___x_x_h3__family.html#ga334e014be8252d34f39e6496d0379e13',1,'xxhash.h']]], + ['xxh128_5fcanonical_5ft_2',['XXH128_canonical_t',['../struct_x_x_h128__canonical__t.html',1,'']]], + ['xxh128_5fcanonicalfromhash_3',['XXH128_canonicalFromHash',['../group___x_x_h3__family.html#ga0eb1c6f5085bc5f354f2aac4971ffcb2',1,'xxhash.h']]], + ['xxh128_5fcmp_4',['XXH128_cmp',['../group___x_x_h3__family.html#ga2965cb06dc0d14752d72c30b9f9b56cf',1,'xxhash.h']]], + ['xxh128_5fhash_5ft_5',['XXH128_hash_t',['../struct_x_x_h128__hash__t.html',1,'']]], + ['xxh128_5fhashfromcanonical_6',['XXH128_hashFromCanonical',['../group___x_x_h3__family.html#gabac9bd8cff275f3b862cd5a7e9045818',1,'xxhash.h']]], + ['xxh128_5fisequal_7',['XXH128_isEqual',['../group___x_x_h3__family.html#gae48a69e41062619715826660580d42ab',1,'xxhash.h']]], + ['xxh3_20family_8',['XXH3 family',['../group___x_x_h3__family.html',1,'']]], + ['xxh3_20implementation_9',['XXH3 implementation',['../group___x_x_h3__impl.html',1,'']]], + ['xxh32_10',['XXH32',['../group___x_x_h32__family.html#ga310c01be2371883ad3bb37930626ec86',1,'xxhash.h']]], + ['xxh32_20family_11',['XXH32 family',['../group___x_x_h32__family.html',1,'']]], + ['xxh32_20implementation_12',['XXH32 implementation',['../group___x_x_h32__impl.html',1,'']]], + ['xxh32_5fcanonical_5ft_13',['XXH32_canonical_t',['../struct_x_x_h32__canonical__t.html',1,'']]], + ['xxh32_5fcanonicalfromhash_14',['XXH32_canonicalFromHash',['../group___x_x_h32__family.html#gab033c1336e85ab51e02f1987254af9bd',1,'xxhash.h']]], + ['xxh32_5fcopystate_15',['XXH32_copyState',['../group___x_x_h32__family.html#gaed14b659149c1327acac124a07ee29d3',1,'xxhash.h']]], + ['xxh32_5fcreatestate_16',['XXH32_createState',['../group___x_x_h32__family.html#ga7d53ff3de134f4e294de011cc3e6a498',1,'xxhash.h']]], + ['xxh32_5fdigest_17',['XXH32_digest',['../group___x_x_h32__family.html#gae4d82d62718fd5e09c83ad3f639c892a',1,'xxhash.h']]], + ['xxh32_5fendjmp_18',['XXH32_ENDJMP',['../group__tuning.html#gad5824529c4ad74d2d5cc05bf4868613a',1,'xxhash.h']]], + ['xxh32_5ffreestate_19',['XXH32_freeState',['../group___x_x_h32__family.html#ga87d9d298652e8d5560f482c963ddd6c8',1,'xxhash.h']]], + ['xxh32_5fhash_5ft_20',['XXH32_hash_t',['../group__public.html#ga469df6c7273f15924de58143ef1afe14',1,'xxhash.h']]], + ['xxh32_5fhashfromcanonical_21',['XXH32_hashFromCanonical',['../group___x_x_h32__family.html#gac3cf699c65b7b63df08964c56b1bdaf5',1,'xxhash.h']]], + ['xxh32_5freset_22',['XXH32_reset',['../group___x_x_h32__family.html#ga00a68397351fe1d54fe23a831294b4ef',1,'xxhash.h']]], + ['xxh32_5fstate_5fs_23',['XXH32_state_s',['../struct_x_x_h32__state__s.html',1,'']]], + ['xxh32_5fstate_5ft_24',['XXH32_state_t',['../group___x_x_h32__family.html#ga0048f07d4a3051c20598464f007aa6c5',1,'xxhash.h']]], + ['xxh32_5fupdate_25',['XXH32_update',['../group___x_x_h32__family.html#ga40aa0e1469b0db64a4694cd97c8563b4',1,'xxhash.h']]], + ['xxh3_5f128bits_26',['XXH3_128bits',['../group___x_x_h3__family.html#gaa519b24488e33bb208840d2ecfe8d8de',1,'xxhash.h']]], + ['xxh3_5f128bits_5fdigest_27',['XXH3_128bits_digest',['../group___x_x_h3__family.html#ga9437c17a93a8b34c8e2fdfc992d260e9',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_28',['XXH3_128bits_reset',['../group___x_x_h3__family.html#gab2560d6ad650073db0242473e7471ba5',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithsecret_29',['XXH3_128bits_reset_withSecret',['../group___x_x_h3__family.html#gafc1994ce5b08edba1c742958bbe31d89',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithsecretandseed_30',['XXH3_128bits_reset_withSecretandSeed',['../group___x_x_h3__family.html#gaad850da62eb1bcf23f8a09f7c95d11c0',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithseed_31',['XXH3_128bits_reset_withSeed',['../group___x_x_h3__family.html#ga98de207b208f2778a71795993501dc9c',1,'xxhash.h']]], + ['xxh3_5f128bits_5fupdate_32',['XXH3_128bits_update',['../group___x_x_h3__family.html#ga03531ff6ecf1292888de3290bb7d8ebe',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithsecret_33',['XXH3_128bits_withSecret',['../group___x_x_h3__family.html#gaa7f6e73421e0be9abd7181991ba8030f',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithsecretandseed_34',['XXH3_128bits_withSecretandSeed',['../group___x_x_h3__family.html#gadd6e3be42f33f56f199777141b94604d',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithseed_35',['XXH3_128bits_withSeed',['../group___x_x_h3__family.html#ga2f4c55956ea9cc542340720549cbbcda',1,'xxhash.h']]], + ['xxh3_5f64bits_36',['XXH3_64bits',['../group___x_x_h3__family.html#gacc4473b9d9953adcbfcc51b32cb887ef',1,'xxhash.h']]], + ['xxh3_5f64bits_5fdigest_37',['XXH3_64bits_digest',['../group___x_x_h3__family.html#ga03116acd8c5308bee9cce4d111ad92bf',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_38',['XXH3_64bits_reset',['../group___x_x_h3__family.html#gae178ffc944bf355c8f3ba8c283ce3120',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithsecret_39',['XXH3_64bits_reset_withSecret',['../group___x_x_h3__family.html#ga952ac3a3662c76f749b9eaced7b9746a',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithsecretandseed_40',['XXH3_64bits_reset_withSecretandSeed',['../group___x_x_h3__family.html#ga6eac2cf5c3615c358acf210890bdb621',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithseed_41',['XXH3_64bits_reset_withSeed',['../group___x_x_h3__family.html#ga8d1f6de09ac556d4564ede1e748583a6',1,'xxhash.h']]], + ['xxh3_5f64bits_5fupdate_42',['XXH3_64bits_update',['../group___x_x_h3__family.html#gad4b1454f1650856029d09f75a919740f',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithsecret_43',['XXH3_64bits_withSecret',['../group___x_x_h3__family.html#gac3b0a46f4a38befb3c8fa122f5d74dbb',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithsecretandseed_44',['XXH3_64bits_withSecretandSeed',['../group___x_x_h3__impl.html#ga7c61723080fb6c64f186c419832d5521',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithseed_45',['XXH3_64bits_withSeed',['../group___x_x_h3__family.html#ga22b06ba82074a88f9c08c2dfa3808f80',1,'xxhash.h']]], + ['xxh3_5fcopystate_46',['XXH3_copyState',['../group___x_x_h3__family.html#gac35f35d7339f399121067c0f64f01c19',1,'xxhash.h']]], + ['xxh3_5fcreatestate_47',['XXH3_createState',['../group___x_x_h3__family.html#ga95592969a08becc37428dd547c36b8fd',1,'xxhash.h']]], + ['xxh3_5ffreestate_48',['XXH3_freeState',['../group___x_x_h3__family.html#gaee640ba2104fe3107b7d679f40d17277',1,'xxhash.h']]], + ['xxh3_5fgeneratesecret_49',['XXH3_generateSecret',['../group___x_x_h3__family.html#ga4be9a95a2e7b7252d6f4a6e4f651ac42',1,'xxhash.h']]], + ['xxh3_5fgeneratesecret_5ffromseed_50',['XXH3_generateSecret_fromSeed',['../group___x_x_h3__family.html#ga0888d6959efe3982fcafe516c22ef5a8',1,'xxhash.h']]], + ['xxh3_5finitstate_51',['XXH3_INITSTATE',['../xxhash_8h.html#afc79de39f0cf7e8d395f131c0d9d568e',1,'xxhash.h']]], + ['xxh3_5finline_5fsecret_52',['XXH3_INLINE_SECRET',['../group__tuning.html#gaa6d5f6ddf0a7d14b90a63cb6a9d34c26',1,'xxhash.h']]], + ['xxh3_5fmidsize_5fmax_53',['XXH3_MIDSIZE_MAX',['../xxhash_8h.html#add6603b0469aa41bf291ae15a8f65fc6',1,'xxhash.h']]], + ['xxh3_5fneon_5flanes_54',['XXH3_NEON_LANES',['../group__tuning.html#gac799ce966f18e4837f7fdc3d51917e9c',1,'xxhash.h']]], + ['xxh3_5fsecret_5fdefault_5fsize_55',['XXH3_SECRET_DEFAULT_SIZE',['../xxhash_8h.html#ae30274eeda9ae2faa2eda08deff9696f',1,'xxhash.h']]], + ['xxh3_5fsecret_5fsize_5fmin_56',['XXH3_SECRET_SIZE_MIN',['../group___x_x_h3__family.html#gaeb79a9111c58af32599f8e5cd71d67d2',1,'xxhash.h']]], + ['xxh3_5fstate_5fs_57',['XXH3_state_s',['../struct_x_x_h3__state__s.html',1,'']]], + ['xxh3_5fstate_5ft_58',['XXH3_state_t',['../group___x_x_h3__family.html#ga8e454084a62efb09fad8ba3cc1c1b1d0',1,'xxhash.h']]], + ['xxh64_59',['XXH64',['../group___x_x_h64__family.html#ga9651d864dea7e0755ae3935bf6bf7082',1,'xxhash.h']]], + ['xxh64_20family_60',['XXH64 family',['../group___x_x_h64__family.html',1,'']]], + ['xxh64_20implementation_61',['XXH64 implementation',['../group___x_x_h64__impl.html',1,'']]], + ['xxh64_5fcanonical_5ft_62',['XXH64_canonical_t',['../struct_x_x_h64__canonical__t.html',1,'']]], + ['xxh64_5fcanonicalfromhash_63',['XXH64_canonicalFromHash',['../group___x_x_h64__family.html#ga1b88114ccd49685ab9acf02aabbbdd7b',1,'xxhash.h']]], + ['xxh64_5fcopystate_64',['XXH64_copyState',['../group___x_x_h64__family.html#ga3088b416eee8dcdb09804f722535761e',1,'xxhash.h']]], + ['xxh64_5fcreatestate_65',['XXH64_createState',['../group___x_x_h64__family.html#gadcfc7fb0e3382dc0b13afb125a0fea5c',1,'xxhash.h']]], + ['xxh64_5fdigest_66',['XXH64_digest',['../group___x_x_h64__family.html#gaf5c7d2afed088ede4ff37fa6b6a02412',1,'xxhash.h']]], + ['xxh64_5ffreestate_67',['XXH64_freeState',['../group___x_x_h64__family.html#gac03f9ec46a29db6f6a999c832cf759de',1,'xxhash.h']]], + ['xxh64_5fhash_5ft_68',['XXH64_hash_t',['../group__public.html#ga5406b285b18dfcefa93efed489e3b603',1,'xxhash.h']]], + ['xxh64_5fhashfromcanonical_69',['XXH64_hashFromCanonical',['../group___x_x_h64__family.html#ga8f1b5423301ea5ebbd9e4e01681446e9',1,'xxhash.h']]], + ['xxh64_5freset_70',['XXH64_reset',['../group___x_x_h64__family.html#gafa0153665b1194c656dce7c29c0193c5',1,'xxhash.h']]], + ['xxh64_5fstate_5fs_71',['XXH64_state_s',['../struct_x_x_h64__state__s.html',1,'']]], + ['xxh64_5fstate_5ft_72',['XXH64_state_t',['../group___x_x_h64__family.html#ga0702bdbc80b0cf9e94f2379f7d839b8c',1,'xxhash.h']]], + ['xxh64_5fupdate_73',['XXH64_update',['../group___x_x_h64__family.html#gaeffe8da4eab0d74a741548bb7c895619',1,'xxhash.h']]], + ['xxh_5facc_5falign_74',['XXH_ACC_ALIGN',['../group__tuning.html#ga15f2f40c9206c691f66cf260841f8ad1',1,'xxhash.h']]], + ['xxh_5faligned_75',['XXH_aligned',['../group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5a41340c9f33fe739cef7a1c56dc617194',1,'xxhash.h']]], + ['xxh_5falignment_76',['XXH_alignment',['../group__impl.html#gadec56fccd4f83e34902b6b09ecccfff5',1,'xxhash.h']]], + ['xxh_5favx2_77',['XXH_AVX2',['../group___x_x_h3__family.html#gaf47a10685143573ae686cb24a6b12180',1,'xxhash.h']]], + ['xxh_5favx512_78',['XXH_AVX512',['../group___x_x_h3__family.html#gac99b74047afbf5d887014e8bd8a4311e',1,'xxhash.h']]], + ['xxh_5fcpu_5flittle_5fendian_79',['XXH_CPU_LITTLE_ENDIAN',['../group__tuning.html#ga408fac02658eb4a81f7a1877f1ca3b3f',1,'xxhash.h']]], + ['xxh_5fdebuglevel_80',['XXH_DEBUGLEVEL',['../group__tuning.html#ga574ceb8ab088243cb0dc833b28320eb5',1,'xxhash.h']]], + ['xxh_5fdispatch_5favx2_81',['XXH_DISPATCH_AVX2',['../group__dispatch.html#ga3f9ae9edb0b15907592a18f74996f523',1,'xxh_x86dispatch.c']]], + ['xxh_5fdispatch_5favx512_82',['XXH_DISPATCH_AVX512',['../group__dispatch.html#gae0ba94e5d5bf66251a96f86b3cd7e08a',1,'xxh_x86dispatch.c']]], + ['xxh_5fdispatch_5fscalar_83',['XXH_DISPATCH_SCALAR',['../group__dispatch.html#gab81e416548f2b86412f670dc435a979b',1,'xxh_x86dispatch.c']]], + ['xxh_5ferror_84',['XXH_ERROR',['../group__public.html#gga5020905455674b8c83c1dbc73f0d3534a462a18276729783125c7116cf102667f',1,'xxhash.h']]], + ['xxh_5ferrorcode_85',['XXH_errorcode',['../group__public.html#ga5020905455674b8c83c1dbc73f0d3534',1,'xxhash.h']]], + ['xxh_5fforce_5falign_5fcheck_86',['XXH_FORCE_ALIGN_CHECK',['../group__tuning.html#gaee35763869a969d5576e70dac1c08b8d',1,'xxhash.h']]], + ['xxh_5fforce_5fmemory_5faccess_87',['XXH_FORCE_MEMORY_ACCESS',['../group__tuning.html#ga04b48241beb7c34e5929d328cf5cc71a',1,'xxhash.h']]], + ['xxh_5fimplementation_88',['XXH_IMPLEMENTATION',['../group__public.html#gaa40be3a031b9a5bd9afc800b0959a0c9',1,'xxhash.h']]], + ['xxh_5finline_5fall_89',['XXH_INLINE_ALL',['../group__public.html#ga5a61b869708b770ad75e3e063a2f9273',1,'xxhash.h']]], + ['xxh_5flasx_90',['XXH_LASX',['../group___x_x_h3__family.html#gae59e018cc7b8e2e7216c2ad95b682672',1,'xxhash.h']]], + ['xxh_5flsx_91',['XXH_LSX',['../group___x_x_h3__family.html#ga0cf336b90e67afd4a6028a168d2036fc',1,'xxhash.h']]], + ['xxh_5fnamespace_92',['XXH_NAMESPACE',['../group__public.html#gacde9dad44d3e0e432474bef93e12f9e7',1,'xxhash.h']]], + ['xxh_5fneon_93',['XXH_NEON',['../group___x_x_h3__family.html#ga1590a8c029aa95462b4d2f21d9e87222',1,'xxhash.h']]], + ['xxh_5fno_5finline_5fhints_94',['XXH_NO_INLINE_HINTS',['../group__tuning.html#gae980c41901d840d8909aa74d603ad4f1',1,'xxhash.h']]], + ['xxh_5fno_5flong_5flong_95',['XXH_NO_LONG_LONG',['../group__tuning.html#ga7e738bf7fb8249e8a834a8c8a8581d80',1,'xxhash.h']]], + ['xxh_5fno_5fstream_96',['XXH_NO_STREAM',['../group__tuning.html#ga96f0b839b3187287c904d37c993f6d1f',1,'xxhash.h']]], + ['xxh_5fok_97',['XXH_OK',['../group__public.html#gga5020905455674b8c83c1dbc73f0d3534abd20b092d624344e301b0cadd29d5bd6',1,'xxhash.h']]], + ['xxh_5fprime32_5f1_98',['XXH_PRIME32_1',['../group___x_x_h32__impl.html#ga29fede2b86ee758448c55edf6171e11f',1,'xxhash.h']]], + ['xxh_5fprime32_5f2_99',['XXH_PRIME32_2',['../group___x_x_h32__impl.html#ga23d49e684c0551afaed8e4ff40940c79',1,'xxhash.h']]], + ['xxh_5fprime32_5f3_100',['XXH_PRIME32_3',['../group___x_x_h32__impl.html#gacdda6ef95561d39cf2f9b7f2cd5c6693',1,'xxhash.h']]], + ['xxh_5fprime32_5f4_101',['XXH_PRIME32_4',['../group___x_x_h32__impl.html#ga9f43a7ed63cb15dfc49b1a42c250e511',1,'xxhash.h']]], + ['xxh_5fprime32_5f5_102',['XXH_PRIME32_5',['../group___x_x_h32__impl.html#gaa4ab6ba3eb0659356b8ed3b84c43e3e7',1,'xxhash.h']]], + ['xxh_5fprime64_5f1_103',['XXH_PRIME64_1',['../group___x_x_h64__impl.html#ga20651a9ad53cae6f0a4feb1393d5a716',1,'xxhash.h']]], + ['xxh_5fprime64_5f2_104',['XXH_PRIME64_2',['../group___x_x_h64__impl.html#ga33a01ca165b68cef76da009a54e3ba54',1,'xxhash.h']]], + ['xxh_5fprime64_5f3_105',['XXH_PRIME64_3',['../group___x_x_h64__impl.html#gad18b925ab3b4ad25ae26eb4fb00ebcb8',1,'xxhash.h']]], + ['xxh_5fprime64_5f4_106',['XXH_PRIME64_4',['../group___x_x_h64__impl.html#ga6326d9c3883242a3b5602fae1507afc5',1,'xxhash.h']]], + ['xxh_5fprime64_5f5_107',['XXH_PRIME64_5',['../group___x_x_h64__impl.html#gae44b2a496b0a4184699e7d11ec2d70c6',1,'xxhash.h']]], + ['xxh_5fprivate_5fapi_108',['XXH_PRIVATE_API',['../group__public.html#ga6589b6ea961ec073de006a47282c9a41',1,'xxhash.h']]], + ['xxh_5fpublic_5fapi_109',['XXH_PUBLIC_API',['../group__public.html#ga5832897ed49938aefa629a76034b36b1',1,'XXH_PUBLIC_API: xxhash.h'],['../group__public.html#ga5832897ed49938aefa629a76034b36b1',1,'XXH_PUBLIC_API: xxhash.h']]], + ['xxh_5fscalar_110',['XXH_SCALAR',['../group__tuning.html#ga9cc731558db44d378e6dde975236d4ab',1,'xxhash.h']]], + ['xxh_5fsize_5fopt_111',['XXH_SIZE_OPT',['../group__tuning.html#ga1e9850064fc149181cce7431f40a990a',1,'xxhash.h']]], + ['xxh_5fsse2_112',['XXH_SSE2',['../group___x_x_h3__family.html#ga70e0a18d7c95a038b39d2e649e99d4ee',1,'xxhash.h']]], + ['xxh_5fstatic_5flinking_5fonly_113',['XXH_STATIC_LINKING_ONLY',['../group__public.html#ga546f2633ae1036f49bdc5582971d7f1e',1,'xxhash.h']]], + ['xxh_5fsve_114',['XXH_SVE',['../group___x_x_h3__family.html#ga76cb3b8fe2820051f6ded37fc0f78632',1,'xxhash.h']]], + ['xxh_5ftarget_5favx2_115',['XXH_TARGET_AVX2',['../group__dispatch.html#gad2a40b306e49c6e6240acd43484ed5e0',1,'xxhash.h']]], + ['xxh_5ftarget_5favx512_116',['XXH_TARGET_AVX512',['../group__dispatch.html#ga94d06a353acaa62bbd9fbf65e865a282',1,'xxhash.h']]], + ['xxh_5ftarget_5fsse2_117',['XXH_TARGET_SSE2',['../group__dispatch.html#ga13e5de884479e06fa52a7cf484158e2e',1,'xxhash.h']]], + ['xxh_5funaligned_118',['XXH_unaligned',['../group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5ab082c14fd7eef12bcb1dfda2e813586f',1,'xxhash.h']]], + ['xxh_5fvector_119',['XXH_VECTOR',['../group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86',1,'XXH_VECTOR: xxhash.h'],['../group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86',1,'XXH_VECTOR: xxhash.h']]], + ['xxh_5fversion_5fnumber_120',['XXH_VERSION_NUMBER',['../group__public.html#gacc66393fff091acefc0e2a00ec5462c4',1,'xxhash.h']]], + ['xxh_5fversionnumber_121',['XXH_versionNumber',['../group__public.html#gabc57fd428d4d33906b3830c746bc4ac9',1,'xxhash.h']]], + ['xxh_5fvsx_122',['XXH_VSX',['../group___x_x_h3__family.html#gaaf36dc5eae1c42626ae2fa18b752eac8',1,'xxhash.h']]], + ['xxh_5fx86dispatch_2ec_123',['xxh_x86dispatch.c',['../xxh__x86dispatch_8c.html',1,'']]], + ['xxhash_124',['xxHash',['../index.html',1,'']]], + ['xxhash_2eh_125',['xxhash.h',['../xxhash_8h.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/classes_0.js b/doc/v0.8.3/search/classes_0.js new file mode 100644 index 00000000..039eb7fd --- /dev/null +++ b/doc/v0.8.3/search/classes_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['xxh128_5fcanonical_5ft_0',['XXH128_canonical_t',['../struct_x_x_h128__canonical__t.html',1,'']]], + ['xxh128_5fhash_5ft_1',['XXH128_hash_t',['../struct_x_x_h128__hash__t.html',1,'']]], + ['xxh32_5fcanonical_5ft_2',['XXH32_canonical_t',['../struct_x_x_h32__canonical__t.html',1,'']]], + ['xxh32_5fstate_5fs_3',['XXH32_state_s',['../struct_x_x_h32__state__s.html',1,'']]], + ['xxh3_5fstate_5fs_4',['XXH3_state_s',['../struct_x_x_h3__state__s.html',1,'']]], + ['xxh64_5fcanonical_5ft_5',['XXH64_canonical_t',['../struct_x_x_h64__canonical__t.html',1,'']]], + ['xxh64_5fstate_5fs_6',['XXH64_state_s',['../struct_x_x_h64__state__s.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/close.svg b/doc/v0.8.3/search/close.svg new file mode 100644 index 00000000..337d6cc1 --- /dev/null +++ b/doc/v0.8.3/search/close.svg @@ -0,0 +1,18 @@ + + + + + + diff --git a/doc/v0.8.3/search/defines_0.js b/doc/v0.8.3/search/defines_0.js new file mode 100644 index 00000000..bf861dbb --- /dev/null +++ b/doc/v0.8.3/search/defines_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['xxh3_5finitstate_0',['XXH3_INITSTATE',['../xxhash_8h.html#afc79de39f0cf7e8d395f131c0d9d568e',1,'xxhash.h']]], + ['xxh3_5fmidsize_5fmax_1',['XXH3_MIDSIZE_MAX',['../xxhash_8h.html#add6603b0469aa41bf291ae15a8f65fc6',1,'xxhash.h']]], + ['xxh3_5fsecret_5fdefault_5fsize_2',['XXH3_SECRET_DEFAULT_SIZE',['../xxhash_8h.html#ae30274eeda9ae2faa2eda08deff9696f',1,'xxhash.h']]] +]; diff --git a/doc/v0.8.3/search/enums_0.js b/doc/v0.8.3/search/enums_0.js new file mode 100644 index 00000000..c863b0f8 --- /dev/null +++ b/doc/v0.8.3/search/enums_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['xxh_5falignment_0',['XXH_alignment',['../group__impl.html#gadec56fccd4f83e34902b6b09ecccfff5',1,'xxhash.h']]], + ['xxh_5ferrorcode_1',['XXH_errorcode',['../group__public.html#ga5020905455674b8c83c1dbc73f0d3534',1,'xxhash.h']]] +]; diff --git a/doc/v0.8.3/search/enumvalues_0.js b/doc/v0.8.3/search/enumvalues_0.js new file mode 100644 index 00000000..3fec81ca --- /dev/null +++ b/doc/v0.8.3/search/enumvalues_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['xxh_5faligned_0',['XXH_aligned',['../group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5a41340c9f33fe739cef7a1c56dc617194',1,'xxhash.h']]], + ['xxh_5ferror_1',['XXH_ERROR',['../group__public.html#gga5020905455674b8c83c1dbc73f0d3534a462a18276729783125c7116cf102667f',1,'xxhash.h']]], + ['xxh_5fok_2',['XXH_OK',['../group__public.html#gga5020905455674b8c83c1dbc73f0d3534abd20b092d624344e301b0cadd29d5bd6',1,'xxhash.h']]], + ['xxh_5funaligned_3',['XXH_unaligned',['../group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5ab082c14fd7eef12bcb1dfda2e813586f',1,'xxhash.h']]] +]; diff --git a/doc/v0.8.3/search/files_0.js b/doc/v0.8.3/search/files_0.js new file mode 100644 index 00000000..d5165bb5 --- /dev/null +++ b/doc/v0.8.3/search/files_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['xxh_5fx86dispatch_2ec_0',['xxh_x86dispatch.c',['../xxh__x86dispatch_8c.html',1,'']]], + ['xxhash_2eh_1',['xxhash.h',['../xxhash_8h.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/functions_0.js b/doc/v0.8.3/search/functions_0.js new file mode 100644 index 00000000..99109f98 --- /dev/null +++ b/doc/v0.8.3/search/functions_0.js @@ -0,0 +1,52 @@ +var searchData= +[ + ['xxh128_0',['XXH128',['../group___x_x_h3__family.html#ga334e014be8252d34f39e6496d0379e13',1,'xxhash.h']]], + ['xxh128_5fcanonicalfromhash_1',['XXH128_canonicalFromHash',['../group___x_x_h3__family.html#ga0eb1c6f5085bc5f354f2aac4971ffcb2',1,'xxhash.h']]], + ['xxh128_5fcmp_2',['XXH128_cmp',['../group___x_x_h3__family.html#ga2965cb06dc0d14752d72c30b9f9b56cf',1,'xxhash.h']]], + ['xxh128_5fhashfromcanonical_3',['XXH128_hashFromCanonical',['../group___x_x_h3__family.html#gabac9bd8cff275f3b862cd5a7e9045818',1,'xxhash.h']]], + ['xxh128_5fisequal_4',['XXH128_isEqual',['../group___x_x_h3__family.html#gae48a69e41062619715826660580d42ab',1,'xxhash.h']]], + ['xxh32_5',['XXH32',['../group___x_x_h32__family.html#ga310c01be2371883ad3bb37930626ec86',1,'xxhash.h']]], + ['xxh32_5fcanonicalfromhash_6',['XXH32_canonicalFromHash',['../group___x_x_h32__family.html#gab033c1336e85ab51e02f1987254af9bd',1,'xxhash.h']]], + ['xxh32_5fcopystate_7',['XXH32_copyState',['../group___x_x_h32__family.html#gaed14b659149c1327acac124a07ee29d3',1,'xxhash.h']]], + ['xxh32_5fcreatestate_8',['XXH32_createState',['../group___x_x_h32__family.html#ga7d53ff3de134f4e294de011cc3e6a498',1,'xxhash.h']]], + ['xxh32_5fdigest_9',['XXH32_digest',['../group___x_x_h32__family.html#gae4d82d62718fd5e09c83ad3f639c892a',1,'xxhash.h']]], + ['xxh32_5ffreestate_10',['XXH32_freeState',['../group___x_x_h32__family.html#ga87d9d298652e8d5560f482c963ddd6c8',1,'xxhash.h']]], + ['xxh32_5fhashfromcanonical_11',['XXH32_hashFromCanonical',['../group___x_x_h32__family.html#gac3cf699c65b7b63df08964c56b1bdaf5',1,'xxhash.h']]], + ['xxh32_5freset_12',['XXH32_reset',['../group___x_x_h32__family.html#ga00a68397351fe1d54fe23a831294b4ef',1,'xxhash.h']]], + ['xxh32_5fupdate_13',['XXH32_update',['../group___x_x_h32__family.html#ga40aa0e1469b0db64a4694cd97c8563b4',1,'xxhash.h']]], + ['xxh3_5f128bits_14',['XXH3_128bits',['../group___x_x_h3__family.html#gaa519b24488e33bb208840d2ecfe8d8de',1,'xxhash.h']]], + ['xxh3_5f128bits_5fdigest_15',['XXH3_128bits_digest',['../group___x_x_h3__family.html#ga9437c17a93a8b34c8e2fdfc992d260e9',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_16',['XXH3_128bits_reset',['../group___x_x_h3__family.html#gab2560d6ad650073db0242473e7471ba5',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithsecret_17',['XXH3_128bits_reset_withSecret',['../group___x_x_h3__family.html#gafc1994ce5b08edba1c742958bbe31d89',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithsecretandseed_18',['XXH3_128bits_reset_withSecretandSeed',['../group___x_x_h3__family.html#gaad850da62eb1bcf23f8a09f7c95d11c0',1,'xxhash.h']]], + ['xxh3_5f128bits_5freset_5fwithseed_19',['XXH3_128bits_reset_withSeed',['../group___x_x_h3__family.html#ga98de207b208f2778a71795993501dc9c',1,'xxhash.h']]], + ['xxh3_5f128bits_5fupdate_20',['XXH3_128bits_update',['../group___x_x_h3__family.html#ga03531ff6ecf1292888de3290bb7d8ebe',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithsecret_21',['XXH3_128bits_withSecret',['../group___x_x_h3__family.html#gaa7f6e73421e0be9abd7181991ba8030f',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithsecretandseed_22',['XXH3_128bits_withSecretandSeed',['../group___x_x_h3__family.html#gadd6e3be42f33f56f199777141b94604d',1,'xxhash.h']]], + ['xxh3_5f128bits_5fwithseed_23',['XXH3_128bits_withSeed',['../group___x_x_h3__family.html#ga2f4c55956ea9cc542340720549cbbcda',1,'xxhash.h']]], + ['xxh3_5f64bits_24',['XXH3_64bits',['../group___x_x_h3__family.html#gacc4473b9d9953adcbfcc51b32cb887ef',1,'xxhash.h']]], + ['xxh3_5f64bits_5fdigest_25',['XXH3_64bits_digest',['../group___x_x_h3__family.html#ga03116acd8c5308bee9cce4d111ad92bf',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_26',['XXH3_64bits_reset',['../group___x_x_h3__family.html#gae178ffc944bf355c8f3ba8c283ce3120',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithsecret_27',['XXH3_64bits_reset_withSecret',['../group___x_x_h3__family.html#ga952ac3a3662c76f749b9eaced7b9746a',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithsecretandseed_28',['XXH3_64bits_reset_withSecretandSeed',['../group___x_x_h3__family.html#ga6eac2cf5c3615c358acf210890bdb621',1,'xxhash.h']]], + ['xxh3_5f64bits_5freset_5fwithseed_29',['XXH3_64bits_reset_withSeed',['../group___x_x_h3__family.html#ga8d1f6de09ac556d4564ede1e748583a6',1,'xxhash.h']]], + ['xxh3_5f64bits_5fupdate_30',['XXH3_64bits_update',['../group___x_x_h3__family.html#gad4b1454f1650856029d09f75a919740f',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithsecret_31',['XXH3_64bits_withSecret',['../group___x_x_h3__family.html#gac3b0a46f4a38befb3c8fa122f5d74dbb',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithsecretandseed_32',['XXH3_64bits_withSecretandSeed',['../group___x_x_h3__impl.html#ga7c61723080fb6c64f186c419832d5521',1,'xxhash.h']]], + ['xxh3_5f64bits_5fwithseed_33',['XXH3_64bits_withSeed',['../group___x_x_h3__family.html#ga22b06ba82074a88f9c08c2dfa3808f80',1,'xxhash.h']]], + ['xxh3_5fcopystate_34',['XXH3_copyState',['../group___x_x_h3__family.html#gac35f35d7339f399121067c0f64f01c19',1,'xxhash.h']]], + ['xxh3_5fcreatestate_35',['XXH3_createState',['../group___x_x_h3__family.html#ga95592969a08becc37428dd547c36b8fd',1,'xxhash.h']]], + ['xxh3_5ffreestate_36',['XXH3_freeState',['../group___x_x_h3__family.html#gaee640ba2104fe3107b7d679f40d17277',1,'xxhash.h']]], + ['xxh3_5fgeneratesecret_37',['XXH3_generateSecret',['../group___x_x_h3__family.html#ga4be9a95a2e7b7252d6f4a6e4f651ac42',1,'xxhash.h']]], + ['xxh3_5fgeneratesecret_5ffromseed_38',['XXH3_generateSecret_fromSeed',['../group___x_x_h3__family.html#ga0888d6959efe3982fcafe516c22ef5a8',1,'xxhash.h']]], + ['xxh64_39',['XXH64',['../group___x_x_h64__family.html#ga9651d864dea7e0755ae3935bf6bf7082',1,'xxhash.h']]], + ['xxh64_5fcanonicalfromhash_40',['XXH64_canonicalFromHash',['../group___x_x_h64__family.html#ga1b88114ccd49685ab9acf02aabbbdd7b',1,'xxhash.h']]], + ['xxh64_5fcopystate_41',['XXH64_copyState',['../group___x_x_h64__family.html#ga3088b416eee8dcdb09804f722535761e',1,'xxhash.h']]], + ['xxh64_5fcreatestate_42',['XXH64_createState',['../group___x_x_h64__family.html#gadcfc7fb0e3382dc0b13afb125a0fea5c',1,'xxhash.h']]], + ['xxh64_5fdigest_43',['XXH64_digest',['../group___x_x_h64__family.html#gaf5c7d2afed088ede4ff37fa6b6a02412',1,'xxhash.h']]], + ['xxh64_5ffreestate_44',['XXH64_freeState',['../group___x_x_h64__family.html#gac03f9ec46a29db6f6a999c832cf759de',1,'xxhash.h']]], + ['xxh64_5fhashfromcanonical_45',['XXH64_hashFromCanonical',['../group___x_x_h64__family.html#ga8f1b5423301ea5ebbd9e4e01681446e9',1,'xxhash.h']]], + ['xxh64_5freset_46',['XXH64_reset',['../group___x_x_h64__family.html#gafa0153665b1194c656dce7c29c0193c5',1,'xxhash.h']]], + ['xxh64_5fupdate_47',['XXH64_update',['../group___x_x_h64__family.html#gaeffe8da4eab0d74a741548bb7c895619',1,'xxhash.h']]], + ['xxh_5fversionnumber_48',['XXH_versionNumber',['../group__public.html#gabc57fd428d4d33906b3830c746bc4ac9',1,'xxhash.h']]] +]; diff --git a/doc/v0.8.3/search/groups_0.js b/doc/v0.8.3/search/groups_0.js new file mode 100644 index 00000000..48762441 --- /dev/null +++ b/doc/v0.8.3/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['api_0',['Public API',['../group__public.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/groups_1.js b/doc/v0.8.3/search/groups_1.js new file mode 100644 index 00000000..a8f4437b --- /dev/null +++ b/doc/v0.8.3/search/groups_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['dispatcher_0',['x86 Dispatcher',['../group__dispatch.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/groups_2.js b/doc/v0.8.3/search/groups_2.js new file mode 100644 index 00000000..3636bd5d --- /dev/null +++ b/doc/v0.8.3/search/groups_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['family_0',['family',['../group___x_x_h3__family.html',1,'XXH3 family'],['../group___x_x_h32__family.html',1,'XXH32 family'],['../group___x_x_h64__family.html',1,'XXH64 family']]] +]; diff --git a/doc/v0.8.3/search/groups_3.js b/doc/v0.8.3/search/groups_3.js new file mode 100644 index 00000000..2596ec15 --- /dev/null +++ b/doc/v0.8.3/search/groups_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['implementation_0',['Implementation',['../group__impl.html',1,'']]], + ['implementation_1',['implementation',['../group___x_x_h3__impl.html',1,'XXH3 implementation'],['../group___x_x_h32__impl.html',1,'XXH32 implementation'],['../group___x_x_h64__impl.html',1,'XXH64 implementation']]] +]; diff --git a/doc/v0.8.3/search/groups_4.js b/doc/v0.8.3/search/groups_4.js new file mode 100644 index 00000000..151e9f00 --- /dev/null +++ b/doc/v0.8.3/search/groups_4.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['parameters_0',['Tuning parameters',['../group__tuning.html',1,'']]], + ['public_20api_1',['Public API',['../group__public.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/groups_5.js b/doc/v0.8.3/search/groups_5.js new file mode 100644 index 00000000..525f8d56 --- /dev/null +++ b/doc/v0.8.3/search/groups_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['tuning_20parameters_0',['Tuning parameters',['../group__tuning.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/groups_6.js b/doc/v0.8.3/search/groups_6.js new file mode 100644 index 00000000..6341ea8d --- /dev/null +++ b/doc/v0.8.3/search/groups_6.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['x86_20dispatcher_0',['x86 Dispatcher',['../group__dispatch.html',1,'']]], + ['xxh3_20family_1',['XXH3 family',['../group___x_x_h3__family.html',1,'']]], + ['xxh3_20implementation_2',['XXH3 implementation',['../group___x_x_h3__impl.html',1,'']]], + ['xxh32_20family_3',['XXH32 family',['../group___x_x_h32__family.html',1,'']]], + ['xxh32_20implementation_4',['XXH32 implementation',['../group___x_x_h32__impl.html',1,'']]], + ['xxh64_20family_5',['XXH64 family',['../group___x_x_h64__family.html',1,'']]], + ['xxh64_20implementation_6',['XXH64 implementation',['../group___x_x_h64__impl.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/mag.svg b/doc/v0.8.3/search/mag.svg new file mode 100644 index 00000000..ffb6cf0d --- /dev/null +++ b/doc/v0.8.3/search/mag.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/doc/v0.8.3/search/mag_d.svg b/doc/v0.8.3/search/mag_d.svg new file mode 100644 index 00000000..4122773f --- /dev/null +++ b/doc/v0.8.3/search/mag_d.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/doc/v0.8.3/search/mag_sel.svg b/doc/v0.8.3/search/mag_sel.svg new file mode 100644 index 00000000..553dba87 --- /dev/null +++ b/doc/v0.8.3/search/mag_sel.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/doc/v0.8.3/search/mag_seld.svg b/doc/v0.8.3/search/mag_seld.svg new file mode 100644 index 00000000..c906f84c --- /dev/null +++ b/doc/v0.8.3/search/mag_seld.svg @@ -0,0 +1,31 @@ + + + + + + + + + diff --git a/doc/v0.8.3/search/pages_0.js b/doc/v0.8.3/search/pages_0.js new file mode 100644 index 00000000..a72ae3b8 --- /dev/null +++ b/doc/v0.8.3/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['xxhash_0',['xxHash',['../index.html',1,'']]] +]; diff --git a/doc/v0.8.3/search/search.css b/doc/v0.8.3/search/search.css new file mode 100644 index 00000000..a53214fc --- /dev/null +++ b/doc/v0.8.3/search/search.css @@ -0,0 +1,286 @@ +/*---------------- Search Box */ + +#MSearchBox { + position: absolute; + right: 5px; +} +/*---------------- Search box styling */ + +.SRPage * { + font-weight: normal; + line-height: normal; +} + +dark-mode-toggle { + margin-left: 5px; + display: flex; + float: right; +} + +#MSearchBox { + display: inline-block; + white-space : nowrap; + background: var(--search-background-color); + border-radius: 0.65em; + box-shadow: var(--search-box-shadow); + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + width: 20px; + height: 19px; + background-image: var(--search-magnification-select-image); + margin: 0 0 0 0.3em; + padding: 0; +} + +#MSearchSelectExt { + display: inline-block; + vertical-align: middle; + width: 10px; + height: 19px; + background-image: var(--search-magnification-image); + margin: 0 0 0 0.5em; + padding: 0; +} + + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 19px; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: var(--search-foreground-color); + outline: none; + font-family: var(--font-family-search); + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + +@media(hover: none) { + /* to avoid zooming on iOS */ + #MSearchField { + font-size: 16px; + } +} + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: var(--search-active-color); +} + + + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-filter-border-color); + background-color: var(--search-filter-background-color); + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt var(--font-family-search); + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: var(--font-family-monospace); + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: var(--search-filter-foreground-color); + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: var(--search-filter-foreground-color); + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: var(--search-filter-highlight-text-color); + background-color: var(--search-filter-highlight-bg-color); + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + /*width: 60ex;*/ + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid var(--search-results-border-color); + background-color: var(--search-results-background-color); + z-index:10000; + width: 300px; + height: 400px; + overflow: auto; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +div.SRPage { + margin: 5px 2px; + background-color: var(--search-results-background-color); +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: var(--search-results-foreground-color); + font-family: var(--font-family-search); + font-size: 8pt; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: var(--font-family-search); +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: var(--font-family-search); +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: var(--nav-gradient-active-image-parent); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/doc/v0.8.3/search/search.js b/doc/v0.8.3/search/search.js new file mode 100644 index 00000000..666af01e --- /dev/null +++ b/doc/v0.8.3/search/search.js @@ -0,0 +1,694 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +const SEARCH_COOKIE_NAME = ''+'search_grp'; + +const searchResults = new SearchResults(); + +/* A class handling everything associated with the search panel. + + Parameters: + name - The name of the global variable that will be + storing this instance. Is needed to be able to set timeouts. + resultPath - path to use for external files +*/ +function SearchBox(name, resultsPath, extension) { + if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } + + function getXPos(item) { + let x = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + x += item.offsetLeft; + item = item.offsetParent; + } + } + return x; + } + + function getYPos(item) { + let y = 0; + if (item.offsetWidth) { + while (item && item!=document.body) { + y += item.offsetTop; + item = item.offsetParent; + } + } + return y; + } + + // ---------- Instance variables + this.name = name; + this.resultsPath = resultsPath; + this.keyTimeout = 0; + this.keyTimeoutLength = 500; + this.closeSelectionTimeout = 300; + this.lastSearchValue = ""; + this.lastResultsPage = ""; + this.hideTimeout = 0; + this.searchIndex = 0; + this.searchActive = false; + this.extension = extension; + + // ----------- DOM Elements + + this.DOMSearchField = () => document.getElementById("MSearchField"); + this.DOMSearchSelect = () => document.getElementById("MSearchSelect"); + this.DOMSearchSelectWindow = () => document.getElementById("MSearchSelectWindow"); + this.DOMPopupSearchResults = () => document.getElementById("MSearchResults"); + this.DOMPopupSearchResultsWindow = () => document.getElementById("MSearchResultsWindow"); + this.DOMSearchClose = () => document.getElementById("MSearchClose"); + this.DOMSearchBox = () => document.getElementById("MSearchBox"); + + // ------------ Event Handlers + + // Called when focus is added or removed from the search field. + this.OnSearchFieldFocus = function(isActive) { + this.Activate(isActive); + } + + this.OnSearchSelectShow = function() { + const searchSelectWindow = this.DOMSearchSelectWindow(); + const searchField = this.DOMSearchSelect(); + + const left = getXPos(searchField); + const top = getYPos(searchField) + searchField.offsetHeight; + + // show search selection popup + searchSelectWindow.style.display='block'; + searchSelectWindow.style.left = left + 'px'; + searchSelectWindow.style.top = top + 'px'; + + // stop selection hide timer + if (this.hideTimeout) { + clearTimeout(this.hideTimeout); + this.hideTimeout=0; + } + return false; // to avoid "image drag" default event + } + + this.OnSearchSelectHide = function() { + this.hideTimeout = setTimeout(this.CloseSelectionWindow.bind(this), + this.closeSelectionTimeout); + } + + // Called when the content of the search field is changed. + this.OnSearchFieldChange = function(evt) { + if (this.keyTimeout) { // kill running timer + clearTimeout(this.keyTimeout); + this.keyTimeout = 0; + } + + const e = evt ? evt : window.event; // for IE + if (e.keyCode==40 || e.keyCode==13) { + if (e.shiftKey==1) { + this.OnSearchSelectShow(); + const win=this.DOMSearchSelectWindow(); + for (let i=0;i do a search + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) { // Up + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } else if (e.keyCode==13 || e.keyCode==27) { + e.stopPropagation(); + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() { + this.keyTimeout = 0; + + // strip leading whitespace + const searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + const code = searchValue.toLowerCase().charCodeAt(0); + let idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) { // surrogate pair + idxChar = searchValue.substr(0, 2); + } + + let jsFile; + let idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + const hexCode=idx.toString(16); + jsFile = this.resultsPath + indexSectionNames[this.searchIndex] + '_' + hexCode + '.js'; + } + + const loadJS = function(url, impl, loc) { + const scriptTag = document.createElement('script'); + scriptTag.src = url; + scriptTag.onload = impl; + scriptTag.onreadystatechange = impl; + loc.appendChild(scriptTag); + } + + const domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + const domSearchBox = this.DOMSearchBox(); + const domPopupSearchResults = this.DOMPopupSearchResults(); + const domSearchClose = this.DOMSearchClose(); + const resultsPath = this.resultsPath; + + const handleResults = function() { + document.getElementById("Loading").style.display="none"; + if (typeof searchData !== 'undefined') { + createResults(resultsPath); + document.getElementById("NoMatches").style.display="none"; + } + + if (idx!=-1) { + searchResults.Search(searchValue); + } else { // no file with search results => force empty search results + searchResults.Search('===='); + } + + if (domPopupSearchResultsWindow.style.display!='block') { + domSearchClose.style.display = 'inline-block'; + let left = getXPos(domSearchBox) + 150; + let top = getYPos(domSearchBox) + 20; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + const maxWidth = document.body.clientWidth; + const maxHeight = document.body.clientHeight; + let width = 300; + if (left<10) left=10; + if (width+left+8>maxWidth) width=maxWidth-left-8; + let height = 400; + if (height+top+8>maxHeight) height=maxHeight-top-8; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResultsWindow.style.height = height + 'px'; + } + } + + if (jsFile) { + loadJS(jsFile, handleResults, this.DOMPopupSearchResultsWindow()); + } else { + handleResults(); + } + + this.lastSearchValue = searchValue; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) { + this.DOMSearchBox().className = 'MSearchBoxActive'; + this.searchActive = true; + } else if (!isActive) { // directly remove the panel + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + this.DOMSearchField().value = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults() { + + function convertToId(search) { + let result = ''; + for (let i=0;i. + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) { + const parentElement = document.getElementById(id); + let element = parentElement.firstChild; + + while (element && element!=parentElement) { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { + element = element.firstChild; + } else if (element.nextSibling) { + element = element.nextSibling; + } else { + do { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) { + const element = this.FindChildElement(id); + if (element) { + if (element.style.display == 'block') { + element.style.display = 'none'; + } else { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) { + if (!search) { // get search word from URL + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + const resultRows = document.getElementsByTagName("div"); + let matches = 0; + + let i = 0; + while (i < resultRows.length) { + const row = resultRows.item(i); + if (row.className == "SRResult") { + let rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) { + row.style.display = 'block'; + matches++; + } else { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) { // no results + document.getElementById("NoMatches").style.display='block'; + } else { // at least one result + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) { + let focusItem; + for (;;) { + const focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') { + break; + } else if (!focusItem) { // last element + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) { + if (e.type == "keydown") { + this.repeatOn = false; + this.lastKey = e.keyCode; + } else if (e.type == "keypress") { + if (!this.repeatOn) { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } else if (e.type == "keyup") { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + const newIndex = itemIndex-1; + let focusItem = this.NavPrev(newIndex); + if (focusItem) { + let child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') { // children visible + let n=0; + let tmpElem; + for (;;) { // search for last child + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) { + focusItem = tmpElem; + } else { // found it! + break; + } + n++; + } + } + } + if (focusItem) { + focusItem.focus(); + } else { // return focus to search field + document.getElementById("MSearchField").focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = itemIndex+1; + let focusItem; + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') { // children visible + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } else if (this.lastKey==39) { // Right + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } else if (this.lastKey==37) { // Left + const item = document.getElementById('Item'+itemIndex); + const elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) { + const e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) { // Up + if (childIndex>0) { + const newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } else { // already at first child, jump to parent + document.getElementById('Item'+itemIndex).focus(); + } + } else if (this.lastKey==40) { // Down + const newIndex = childIndex+1; + let elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) { // last child, jump to parent next parent + elem = this.NavNext(itemIndex+1); + } + if (elem) { + elem.focus(); + } + } else if (this.lastKey==27) { // Escape + e.stopPropagation(); + searchBox.CloseResultsWindow(); + document.getElementById("MSearchField").focus(); + } else if (this.lastKey==13) { // Enter + return true; + } + return false; + } +} + +function createResults(resultsPath) { + + function setKeyActions(elem,action) { + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); + } + + function setClassAttr(elem,attr) { + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); + } + + const results = document.getElementById("SRResults"); + results.innerHTML = ''; + searchData.forEach((elem,index) => { + const id = elem[0]; + const srResult = document.createElement('div'); + srResult.setAttribute('id','SR_'+id); + setClassAttr(srResult,'SRResult'); + const srEntry = document.createElement('div'); + setClassAttr(srEntry,'SREntry'); + const srLink = document.createElement('a'); + srLink.setAttribute('id','Item'+index); + setKeyActions(srLink,'return searchResults.Nav(event,'+index+')'); + setClassAttr(srLink,'SRSymbol'); + srLink.innerHTML = elem[1][0]; + srEntry.appendChild(srLink); + if (elem[1].length==2) { // single result + srLink.setAttribute('href',resultsPath+elem[1][1][0]); + srLink.setAttribute('onclick','searchBox.CloseResultsWindow()'); + if (elem[1][1][1]) { + srLink.setAttribute('target','_parent'); + } else { + srLink.setAttribute('target','_blank'); + } + const srScope = document.createElement('span'); + setClassAttr(srScope,'SRScope'); + srScope.innerHTML = elem[1][1][2]; + srEntry.appendChild(srScope); + } else { // multiple results + srLink.setAttribute('href','javascript:searchResults.Toggle("SR_'+id+'")'); + const srChildren = document.createElement('div'); + setClassAttr(srChildren,'SRChildren'); + for (let c=0; c + + + + + + +xxHash: XXH128_canonical_t Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH128_canonical_t Struct Reference
    +
    +
    + + + + +

    +Data Fields

    +unsigned char digest [sizeof(XXH128_hash_t)]
     
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h128__hash__t.html b/doc/v0.8.3/struct_x_x_h128__hash__t.html new file mode 100644 index 00000000..1aea1478 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h128__hash__t.html @@ -0,0 +1,171 @@ + + + + + + + +xxHash: XXH128_hash_t Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH128_hash_t Struct Reference
    +
    +
    + +

    The return value from 128-bit hashes. + More...

    + +

    #include <xxhash.h>

    + + + + + + +

    +Data Fields

    XXH64_hash_t low64
     
    XXH64_hash_t high64
     
    +

    Detailed Description

    +

    The return value from 128-bit hashes.

    +

    Stored in little endian order, although the fields themselves are in native endianness.

    +

    Field Documentation

    + +

    ◆ low64

    + +
    +
    + + + + +
    XXH64_hash_t XXH128_hash_t::low64
    +
    +

    value & 0xFFFFFFFFFFFFFFFF

    + +
    +
    + +

    ◆ high64

    + +
    +
    + + + + +
    XXH64_hash_t XXH128_hash_t::high64
    +
    +

    value >> 64

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h128__hash__t.js b/doc/v0.8.3/struct_x_x_h128__hash__t.js new file mode 100644 index 00000000..2ab0c7b4 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h128__hash__t.js @@ -0,0 +1,5 @@ +var struct_x_x_h128__hash__t = +[ + [ "low64", "struct_x_x_h128__hash__t.html#a706323c9b3e76414ec77f8f93e8644ef", null ], + [ "high64", "struct_x_x_h128__hash__t.html#ad4e0c851eb11bd3f8042ceebc15fe0a8", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/struct_x_x_h32__canonical__t.html b/doc/v0.8.3/struct_x_x_h32__canonical__t.html new file mode 100644 index 00000000..40c05c56 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h32__canonical__t.html @@ -0,0 +1,153 @@ + + + + + + + +xxHash: XXH32_canonical_t Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH32_canonical_t Struct Reference
    +
    +
    + +

    Canonical (big endian) representation of XXH32_hash_t. + More...

    + +

    #include <xxhash.h>

    + + + + +

    +Data Fields

    unsigned char digest [4]
     
    +

    Detailed Description

    +

    Canonical (big endian) representation of XXH32_hash_t.

    +

    Field Documentation

    + +

    ◆ digest

    + +
    +
    + + + + +
    unsigned char XXH32_canonical_t::digest[4]
    +
    +

    Hash bytes, big endian

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h32__canonical__t.js b/doc/v0.8.3/struct_x_x_h32__canonical__t.js new file mode 100644 index 00000000..db8e4d82 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h32__canonical__t.js @@ -0,0 +1,4 @@ +var struct_x_x_h32__canonical__t = +[ + [ "digest", "struct_x_x_h32__canonical__t.html#a85a83578344a5dd1c7a6cc0472230f30", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/struct_x_x_h32__state__s.html b/doc/v0.8.3/struct_x_x_h32__state__s.html new file mode 100644 index 00000000..0bcb4583 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h32__state__s.html @@ -0,0 +1,231 @@ + + + + + + + +xxHash: XXH32_state_s Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH32_state_s Struct Reference
    +
    +
    + + + + + + + + + + + + + + +

    +Data Fields

    XXH32_hash_t total_len_32
     
    XXH32_hash_t large_len
     
    XXH32_hash_t acc [4]
     
    unsigned char buffer [16]
     
    XXH32_hash_t bufferedSize
     
    XXH32_hash_t reserved
     
    +

    Field Documentation

    + +

    ◆ total_len_32

    + +
    +
    + + + + +
    XXH32_hash_t XXH32_state_s::total_len_32
    +
    +

    Total length hashed, modulo 2^32

    + +
    +
    + +

    ◆ large_len

    + +
    +
    + + + + +
    XXH32_hash_t XXH32_state_s::large_len
    +
    +

    Whether the hash is >= 16 (handles total_len_32 overflow)

    + +
    +
    + +

    ◆ acc

    + +
    +
    + + + + +
    XXH32_hash_t XXH32_state_s::acc[4]
    +
    +

    Accumulator lanes

    + +
    +
    + +

    ◆ buffer

    + +
    +
    + + + + +
    unsigned char XXH32_state_s::buffer[16]
    +
    +

    Internal buffer for partial reads.

    + +
    +
    + +

    ◆ bufferedSize

    + +
    +
    + + + + +
    XXH32_hash_t XXH32_state_s::bufferedSize
    +
    +

    Amount of data in buffer

    + +
    +
    + +

    ◆ reserved

    + +
    +
    + + + + +
    XXH32_hash_t XXH32_state_s::reserved
    +
    +

    Reserved field. Do not read nor write to it.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h32__state__s.js b/doc/v0.8.3/struct_x_x_h32__state__s.js new file mode 100644 index 00000000..40a1a71f --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h32__state__s.js @@ -0,0 +1,9 @@ +var struct_x_x_h32__state__s = +[ + [ "total_len_32", "struct_x_x_h32__state__s.html#a483391d07919dedaa835f67672328c61", null ], + [ "large_len", "struct_x_x_h32__state__s.html#a8f94809f2917da200c5a2bc2fa04926c", null ], + [ "acc", "struct_x_x_h32__state__s.html#aec9b2929a5731e45e70bb477b7038fae", null ], + [ "buffer", "struct_x_x_h32__state__s.html#afd19b6ddfd672c1c0bc3a4e9554b2d97", null ], + [ "bufferedSize", "struct_x_x_h32__state__s.html#a379b06dfccb48d2e08ac722ecd2357cc", null ], + [ "reserved", "struct_x_x_h32__state__s.html#aa14a64f7deb1efaf6ad0c89ba6b5e92a", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/struct_x_x_h3__state__s.html b/doc/v0.8.3/struct_x_x_h3__state__s.html new file mode 100644 index 00000000..b7ebc44a --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h3__state__s.html @@ -0,0 +1,333 @@ + + + + + + + +xxHash: XXH3_state_s Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH3_state_s Struct Reference
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Data Fields

    XXH64_hash_t acc [8]
     
    unsigned char customSecret [XXH3_SECRET_DEFAULT_SIZE]
     
    unsigned char buffer [XXH3_INTERNALBUFFER_SIZE]
     
    XXH32_hash_t bufferedSize
     
    XXH32_hash_t useSeed
     
    size_t nbStripesSoFar
     
    XXH64_hash_t totalLen
     
    size_t nbStripesPerBlock
     
    size_t secretLimit
     
    XXH64_hash_t seed
     
    XXH64_hash_t reserved64
     
    const unsigned char * extSecret
     
    +

    Field Documentation

    + +

    ◆ acc

    + +
    +
    + + + + +
    XXH64_hash_t XXH3_state_s::acc[8]
    +
    +

    The 8 accumulators. See XXH32_state_s::acc and XXH64_state_s::acc

    + +
    +
    + +

    ◆ customSecret

    + +
    +
    + + + + +
    unsigned char XXH3_state_s::customSecret[XXH3_SECRET_DEFAULT_SIZE]
    +
    +

    Used to store a custom secret generated from a seed.

    + +
    +
    + +

    ◆ buffer

    + +
    +
    + + + + +
    unsigned char XXH3_state_s::buffer[XXH3_INTERNALBUFFER_SIZE]
    +
    +

    The internal buffer.

    See also
    XXH32_state_s::mem32
    + +
    +
    + +

    ◆ bufferedSize

    + +
    +
    + + + + +
    XXH32_hash_t XXH3_state_s::bufferedSize
    +
    +

    The amount of memory in buffer,

    See also
    XXH32_state_s::memsize
    + +
    +
    + +

    ◆ useSeed

    + +
    +
    + + + + +
    XXH32_hash_t XXH3_state_s::useSeed
    +
    +

    Reserved field. Needed for padding on 64-bit.

    + +
    +
    + +

    ◆ nbStripesSoFar

    + +
    +
    + + + + +
    size_t XXH3_state_s::nbStripesSoFar
    +
    +

    Number or stripes processed.

    + +
    +
    + +

    ◆ totalLen

    + +
    +
    + + + + +
    XXH64_hash_t XXH3_state_s::totalLen
    +
    +

    Total length hashed. 64-bit even on 32-bit targets.

    + +
    +
    + +

    ◆ nbStripesPerBlock

    + +
    +
    + + + + +
    size_t XXH3_state_s::nbStripesPerBlock
    +
    +

    Number of stripes per block.

    + +
    +
    + +

    ◆ secretLimit

    + +
    +
    + + + + +
    size_t XXH3_state_s::secretLimit
    +
    +

    Size of customSecret or extSecret

    + +
    +
    + +

    ◆ seed

    + +
    +
    + + + + +
    XXH64_hash_t XXH3_state_s::seed
    +
    +

    Seed for _withSeed variants. Must be zero otherwise,

    See also
    XXH3_INITSTATE()
    + +
    +
    + +

    ◆ reserved64

    + +
    +
    + + + + +
    XXH64_hash_t XXH3_state_s::reserved64
    +
    +

    Reserved field.

    + +
    +
    + +

    ◆ extSecret

    + +
    +
    + + + + +
    const unsigned char* XXH3_state_s::extSecret
    +
    +

    Reference to an external secret for the _withSecret variants, NULL for other variants.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h3__state__s.js b/doc/v0.8.3/struct_x_x_h3__state__s.js new file mode 100644 index 00000000..d427720f --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h3__state__s.js @@ -0,0 +1,15 @@ +var struct_x_x_h3__state__s = +[ + [ "acc", "struct_x_x_h3__state__s.html#ad46e292aaa3931ffcceb961ee129ccd5", null ], + [ "customSecret", "struct_x_x_h3__state__s.html#ac81c90a4d992f21a0dd00649b386b20f", null ], + [ "buffer", "struct_x_x_h3__state__s.html#ab2a8c0eba9804ece6442a6ab3ff49f7e", null ], + [ "bufferedSize", "struct_x_x_h3__state__s.html#a19ba097c74cfa101eaabfd66b3801464", null ], + [ "useSeed", "struct_x_x_h3__state__s.html#a5c54b1fb1396a7382c4352db7901654e", null ], + [ "nbStripesSoFar", "struct_x_x_h3__state__s.html#a4ab6b32aaa2b0a1187468db8349eaf9d", null ], + [ "totalLen", "struct_x_x_h3__state__s.html#a2fa3f4b9482a5f1b4bf3aeb01cafbea4", null ], + [ "nbStripesPerBlock", "struct_x_x_h3__state__s.html#a976838a44d86b618f5421aa79f871e85", null ], + [ "secretLimit", "struct_x_x_h3__state__s.html#a63a552ad1efda44641d1b80a9d23a505", null ], + [ "seed", "struct_x_x_h3__state__s.html#aa402cadf01743cb1a9acbcbb24211bfb", null ], + [ "reserved64", "struct_x_x_h3__state__s.html#a2986863b2aaf90025f05cb581dcba481", null ], + [ "extSecret", "struct_x_x_h3__state__s.html#a14d42adf2a0fe05d8d1d5a8845dfe5df", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/struct_x_x_h64__canonical__t.html b/doc/v0.8.3/struct_x_x_h64__canonical__t.html new file mode 100644 index 00000000..eb5bfe26 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h64__canonical__t.html @@ -0,0 +1,138 @@ + + + + + + + +xxHash: XXH64_canonical_t Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH64_canonical_t Struct Reference
    +
    +
    + +

    Canonical (big endian) representation of XXH64_hash_t. + More...

    + +

    #include <xxhash.h>

    + + + + +

    +Data Fields

    +unsigned char digest [sizeof(XXH64_hash_t)]
     
    +

    Detailed Description

    +

    Canonical (big endian) representation of XXH64_hash_t.

    +

    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h64__state__s.html b/doc/v0.8.3/struct_x_x_h64__state__s.html new file mode 100644 index 00000000..89da6a5c --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h64__state__s.html @@ -0,0 +1,231 @@ + + + + + + + +xxHash: XXH64_state_s Struct Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    XXH64_state_s Struct Reference
    +
    +
    + + + + + + + + + + + + + + +

    +Data Fields

    XXH64_hash_t total_len
     
    XXH64_hash_t acc [4]
     
    unsigned char buffer [32]
     
    XXH32_hash_t bufferedSize
     
    XXH32_hash_t reserved32
     
    XXH64_hash_t reserved64
     
    +

    Field Documentation

    + +

    ◆ total_len

    + +
    +
    + + + + +
    XXH64_hash_t XXH64_state_s::total_len
    +
    +

    Total length hashed. This is always 64-bit.

    + +
    +
    + +

    ◆ acc

    + +
    +
    + + + + +
    XXH64_hash_t XXH64_state_s::acc[4]
    +
    +

    Accumulator lanes

    + +
    +
    + +

    ◆ buffer

    + +
    +
    + + + + +
    unsigned char XXH64_state_s::buffer[32]
    +
    +

    Internal buffer for partial reads..

    + +
    +
    + +

    ◆ bufferedSize

    + +
    +
    + + + + +
    XXH32_hash_t XXH64_state_s::bufferedSize
    +
    +

    Amount of data in buffer

    + +
    +
    + +

    ◆ reserved32

    + +
    +
    + + + + +
    XXH32_hash_t XXH64_state_s::reserved32
    +
    +

    Reserved field, needed for padding anyways

    + +
    +
    + +

    ◆ reserved64

    + +
    +
    + + + + +
    XXH64_hash_t XXH64_state_s::reserved64
    +
    +

    Reserved field. Do not read or write to it.

    + +
    +
    +
    The documentation for this struct was generated from the following file: +
    +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h64__state__s.js b/doc/v0.8.3/struct_x_x_h64__state__s.js new file mode 100644 index 00000000..da875a21 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h64__state__s.js @@ -0,0 +1,9 @@ +var struct_x_x_h64__state__s = +[ + [ "total_len", "struct_x_x_h64__state__s.html#af9e2c07ff283799907491063fbde80d5", null ], + [ "acc", "struct_x_x_h64__state__s.html#a6b0b9f4f81a229112db01253ee52fa8f", null ], + [ "buffer", "struct_x_x_h64__state__s.html#a02b6fc84cac440849886df2828c4be79", null ], + [ "bufferedSize", "struct_x_x_h64__state__s.html#a9f6135565b33d7398cbe6867c273f970", null ], + [ "reserved32", "struct_x_x_h64__state__s.html#a1aedff2659c5622ad35b22f71928aa08", null ], + [ "reserved64", "struct_x_x_h64__state__s.html#a8312bc02a62178387f9865ab49222065", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/struct_x_x_h__dispatch128_functions__s.html b/doc/v0.8.3/struct_x_x_h__dispatch128_functions__s.html new file mode 100644 index 00000000..18854b12 --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h__dispatch128_functions__s.html @@ -0,0 +1,103 @@ + + + + + + + +xxHash: XXH_dispatch128Functions_s Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    xxHash 0.8.2 +
    +
    Extremely fast non-cryptographic hash function
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    + +
    XXH_dispatch128Functions_s Struct Reference
    +
    +
    + + + + + + + + + + +

    +Data Fields

    +XXH3_dispatchx86_hashLong128_default hashLong128_default
     
    +XXH3_dispatchx86_hashLong128_withSeed hashLong128_seed
     
    +XXH3_dispatchx86_hashLong128_withSecret hashLong128_secret
     
    +XXH3_dispatchx86_update update
     
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/doc/v0.8.3/struct_x_x_h__dispatch_functions__s.html b/doc/v0.8.3/struct_x_x_h__dispatch_functions__s.html new file mode 100644 index 00000000..199eb0de --- /dev/null +++ b/doc/v0.8.3/struct_x_x_h__dispatch_functions__s.html @@ -0,0 +1,103 @@ + + + + + + + +xxHash: XXH_dispatchFunctions_s Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    xxHash 0.8.2 +
    +
    Extremely fast non-cryptographic hash function
    +
    +
    + + + + + + + + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    + +
    XXH_dispatchFunctions_s Struct Reference
    +
    +
    + + + + + + + + + + +

    +Data Fields

    +XXH3_dispatchx86_hashLong64_default hashLong64_default
     
    +XXH3_dispatchx86_hashLong64_withSeed hashLong64_seed
     
    +XXH3_dispatchx86_hashLong64_withSecret hashLong64_secret
     
    +XXH3_dispatchx86_update update
     
    +
    The documentation for this struct was generated from the following file: +
    + + + + diff --git a/doc/v0.8.3/sync_off.png b/doc/v0.8.3/sync_off.png new file mode 100644 index 00000000..c7160533 Binary files /dev/null and b/doc/v0.8.3/sync_off.png differ diff --git a/doc/v0.8.3/sync_on.png b/doc/v0.8.3/sync_on.png new file mode 100644 index 00000000..f9d80e92 Binary files /dev/null and b/doc/v0.8.3/sync_on.png differ diff --git a/doc/v0.8.3/tab_a.png b/doc/v0.8.3/tab_a.png new file mode 100644 index 00000000..d2c7443b Binary files /dev/null and b/doc/v0.8.3/tab_a.png differ diff --git a/doc/v0.8.3/tab_ad.png b/doc/v0.8.3/tab_ad.png new file mode 100644 index 00000000..c5e015bc Binary files /dev/null and b/doc/v0.8.3/tab_ad.png differ diff --git a/doc/v0.8.3/tab_b.png b/doc/v0.8.3/tab_b.png new file mode 100644 index 00000000..c699adbd Binary files /dev/null and b/doc/v0.8.3/tab_b.png differ diff --git a/doc/v0.8.3/tab_bd.png b/doc/v0.8.3/tab_bd.png new file mode 100644 index 00000000..d3c195e5 Binary files /dev/null and b/doc/v0.8.3/tab_bd.png differ diff --git a/doc/v0.8.3/tab_h.png b/doc/v0.8.3/tab_h.png new file mode 100644 index 00000000..08ac060b Binary files /dev/null and b/doc/v0.8.3/tab_h.png differ diff --git a/doc/v0.8.3/tab_hd.png b/doc/v0.8.3/tab_hd.png new file mode 100644 index 00000000..ebd26ab0 Binary files /dev/null and b/doc/v0.8.3/tab_hd.png differ diff --git a/doc/v0.8.3/tab_s.png b/doc/v0.8.3/tab_s.png new file mode 100644 index 00000000..74f174ff Binary files /dev/null and b/doc/v0.8.3/tab_s.png differ diff --git a/doc/v0.8.3/tab_sd.png b/doc/v0.8.3/tab_sd.png new file mode 100644 index 00000000..afc04410 Binary files /dev/null and b/doc/v0.8.3/tab_sd.png differ diff --git a/doc/v0.8.3/tabs.css b/doc/v0.8.3/tabs.css new file mode 100644 index 00000000..7fa4268a --- /dev/null +++ b/doc/v0.8.3/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.main-menu-btn{position:relative;display:inline-block;width:36px;height:36px;text-indent:36px;margin-left:8px;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.main-menu-btn-icon,.main-menu-btn-icon:before,.main-menu-btn-icon:after{position:absolute;top:50%;left:2px;height:2px;width:24px;background:var(--nav-menu-button-color);-webkit-transition:all .25s;transition:all .25s}.main-menu-btn-icon:before{content:'';top:-7px;left:0}.main-menu-btn-icon:after{content:'';top:7px;left:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon{height:0}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before{top:0;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after{top:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}#main-menu-state{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(1px,1px,1px,1px)}#main-menu-state:not(:checked) ~ #main-menu{display:none}#main-menu-state:checked ~ #main-menu{display:block}@media(min-width:768px){.main-menu-btn{position:absolute;top:-99999px}#main-menu-state:not(:checked) ~ #main-menu{display:block}}.sm-dox{background-image:var(--nav-gradient-image)}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0 12px;padding-right:43px;font-family:var(--font-family-nav);font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:var(--nav-text-normal-shadow);color:var(--nav-text-normal-color);outline:0}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a.current{color:#d23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:var(--nav-menu-toggle-color);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox a span.sub-arrow:before{display:block;content:'+'}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px;border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0;border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox ul{background:var(--nav-menu-background-color)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:var(--nav-menu-background-color);background-image:none}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:0 1px 1px black}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media(min-width:768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:var(--nav-gradient-image);line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:var(--nav-text-normal-color) transparent transparent transparent;background:transparent;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0 12px;background-image:var(--nav-separator-image);background-repeat:no-repeat;background-position:right;-moz-border-radius:0 !important;-webkit-border-radius:0;border-radius:0 !important}.sm-dox a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox a:hover span.sub-arrow{border-color:var(--nav-text-hover-color) transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent var(--nav-menu-background-color) transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:var(--nav-menu-background-color);-moz-border-radius:5px !important;-webkit-border-radius:5px;border-radius:5px !important;-moz-box-shadow:0 5px 9px rgba(0,0,0,0.2);-webkit-box-shadow:0 5px 9px rgba(0,0,0,0.2);box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent var(--nav-menu-foreground-color);border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:var(--nav-menu-foreground-color);background-image:none;border:0 !important}.sm-dox ul a:hover{background-image:var(--nav-gradient-active-image);background-repeat:repeat-x;color:var(--nav-text-hover-color);text-shadow:var(--nav-text-hover-shadow)}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent var(--nav-text-hover-color)}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:var(--nav-menu-background-color);height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #d23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#d23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent var(--nav-menu-foreground-color) transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:var(--nav-menu-foreground-color) transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:var(--nav-gradient-image)}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:var(--nav-menu-background-color)}} diff --git a/doc/v0.8.3/topics.html b/doc/v0.8.3/topics.html new file mode 100644 index 00000000..8cabb780 --- /dev/null +++ b/doc/v0.8.3/topics.html @@ -0,0 +1,132 @@ + + + + + + + +xxHash: Topics + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    Topics
    +
    +
    +
    Here is a list of all topics with brief descriptions:
    +
    +
    + + + + diff --git a/doc/v0.8.3/topics.js b/doc/v0.8.3/topics.js new file mode 100644 index 00000000..a8e5e4f9 --- /dev/null +++ b/doc/v0.8.3/topics.js @@ -0,0 +1,9 @@ +var topics = +[ + [ "Benchmarks", "index.html#autotoc_md0", null ], + [ "Usage", "index.html#autotoc_md1", null ], + [ "x86 Dispatcher", "group__dispatch.html", "group__dispatch" ], + [ "Public API", "group__public.html", "group__public" ], + [ "Tuning parameters", "group__tuning.html", "group__tuning" ], + [ "Implementation", "group__impl.html", "group__impl" ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/xxh__x86dispatch_8c.html b/doc/v0.8.3/xxh__x86dispatch_8c.html new file mode 100644 index 00000000..b4cb9676 --- /dev/null +++ b/doc/v0.8.3/xxh__x86dispatch_8c.html @@ -0,0 +1,139 @@ + + + + + + + +xxHash: xxh_x86dispatch.c File Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    xxh_x86dispatch.c File Reference
    +
    +
    +
    #include <assert.h>
    +
    + + + + + + + + + + +

    +Macros

    #define XXH_DISPATCH_SCALAR   1
     Enables/dispatching the scalar code path.
     
    #define XXH_DISPATCH_AVX2   0
     Enables/disables dispatching for AVX2.
     
    #define XXH_DISPATCH_AVX512   0
     Enables/disables dispatching for AVX512.
     
    +

    Detailed Description

    +

    Automatic dispatcher code for the XXH3 family on x86-based targets.

    +

    Optional add-on.

    +

    Compile this file with the default flags for your target. Note that compiling with flags like -mavx*, -march=native, or /arch:AVX* will make the resulting binary incompatible with cpus not supporting the requested instruction set.

    +
    +
    + + + + diff --git a/doc/v0.8.3/xxh__x86dispatch_8c.js b/doc/v0.8.3/xxh__x86dispatch_8c.js new file mode 100644 index 00000000..493732cf --- /dev/null +++ b/doc/v0.8.3/xxh__x86dispatch_8c.js @@ -0,0 +1,6 @@ +var xxh__x86dispatch_8c = +[ + [ "XXH_DISPATCH_SCALAR", "group__dispatch.html#gab81e416548f2b86412f670dc435a979b", null ], + [ "XXH_DISPATCH_AVX2", "group__dispatch.html#ga3f9ae9edb0b15907592a18f74996f523", null ], + [ "XXH_DISPATCH_AVX512", "group__dispatch.html#gae0ba94e5d5bf66251a96f86b3cd7e08a", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/xxhash_8h.html b/doc/v0.8.3/xxhash_8h.html new file mode 100644 index 00000000..48d4b0ad --- /dev/null +++ b/doc/v0.8.3/xxhash_8h.html @@ -0,0 +1,876 @@ + + + + + + + +xxHash: xxhash.h File Reference + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    + +
    xxhash.h File Reference
    +
    +
    +
    #include <stddef.h>
    +#include <stdlib.h>
    +#include <string.h>
    +#include <limits.h>
    +#include <altivec.h>
    +
    +

    Go to the source code of this file.

    + + + + + + + + + + + + + + + + + + + +

    +Data Structures

    struct  XXH32_canonical_t
     Canonical (big endian) representation of XXH32_hash_t. More...
     
    struct  XXH64_canonical_t
     Canonical (big endian) representation of XXH64_hash_t. More...
     
    struct  XXH128_hash_t
     The return value from 128-bit hashes. More...
     
    struct  XXH128_canonical_t
     
    struct  XXH32_state_s
     
    struct  XXH64_state_s
     
    struct  XXH3_state_s
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Macros

    #define XXH_STATIC_LINKING_ONLY
     Gives access to internal state declaration, required for static allocation.
     
    #define XXH_IMPLEMENTATION
     Gives access to internal definitions.
     
    #define XXH_INLINE_ALL
     Exposes the implementation and marks all functions as inline.
     
    +#define XXH_PRIVATE_API
     Exposes the implementation without marking functions as inline.
     
    #define XXH_NAMESPACE   /* YOUR NAME HERE */
     Emulate a namespace by transparently prefixing all symbols.
     
    +#define XXHASH_H_5627135585666179   1
     
    +#define XXH_PUBLIC_API   /* do nothing */
     Marks a global symbol.
     
    +#define XXH_PUBLIC_API   /* do nothing */
     Marks a global symbol.
     
    +#define XXH_CONSTF   /* disable */
     
    +#define XXH_PUREF
     
    +#define XXH_MALLOCF
     
    +#define XXH_VERSION_MAJOR   0
     
    +#define XXH_VERSION_MINOR   8
     
    +#define XXH_VERSION_RELEASE   3
     
    +#define XXH_VERSION_NUMBER   (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)
     Version number, encoded as two digits each.
     
    #define XXH_SCALAR   0
     Possible values for XXH_VECTOR.
     
    #define XXH_SSE2   1
     
    #define XXH_AVX2   2
     
    #define XXH_AVX512   3
     
    #define XXH_NEON   4
     
    #define XXH_VSX   5
     
    #define XXH_SVE   6
     
    #define XXH_LSX   7
     
    #define XXH_LASX   8
     
    #define XXH3_SECRET_SIZE_MIN   136
     
    +#define XXHASH_H_STATIC_13879238742
     
    #define XXH_ALIGN(n)
     
    #define XXH_ALIGN_MEMBER(align, type)
     
    +#define XXH3_INTERNALBUFFER_SIZE   256
     
    #define XXH3_SECRET_DEFAULT_SIZE   192
     Default Secret's size.
     
    #define XXH3_INITSTATE(XXH3_state_ptr)
     Initializes a stack-allocated XXH3_state_s.
     
    +#define XXH3_MIDSIZE_MAX   240
     Maximum size of "short" key in bytes.
     
    +#define XXH_IMPLEM_13a8737387
     
    #define XXH_NO_LONG_LONG
     Define this to disable 64-bit code.
     
    #define XXH_FORCE_MEMORY_ACCESS   0
     Controls how unaligned memory is accessed.
     
    #define XXH_SIZE_OPT   0
     Controls how much xxHash optimizes for size.
     
    #define XXH_FORCE_ALIGN_CHECK   0
     If defined to non-zero, adds a special path for aligned inputs (XXH32() and XXH64() only).
     
    #define XXH_NO_INLINE_HINTS   0
     When non-zero, sets all functions to static.
     
    #define XXH3_INLINE_SECRET   0
     Determines whether to inline the XXH3 withSecret code.
     
    #define XXH32_ENDJMP   0
     Whether to use a jump for XXH32_finalize.
     
    +#define XXH_OLD_NAMES
     
    #define XXH_NO_STREAM
     Disables the streaming API.
     
    +#define XXH_FORCE_INLINE   static
     
    +#define XXH_NO_INLINE   static
     
    +#define XXH_STATIC   static
     
    +#define XXH3_WITH_SECRET_INLINE   XXH_NO_INLINE
     
    +#define XXH_RESTRICT   /* disable */
     
    #define XXH_DEBUGLEVEL   0
     Sets the debugging level.
     
    #define XXH_ASSERT(c)
     
    #define XXH_STATIC_ASSERT_WITH_MESSAGE(c, m)
     
    #define XXH_STATIC_ASSERT(c)
     
    #define XXH_COMPILER_GUARD(var)
     
    #define XXH_COMPILER_GUARD_CLANG_NEON(var)
     
    #define XXH_CPU_LITTLE_ENDIAN   XXH_isLittleEndian()
     Whether the target is little endian.
     
    +#define XXH_GCC_VERSION   (__GNUC__ * 100 + __GNUC_MINOR__)
     
    #define XXH_HAS_BUILTIN(x)
     
    +#define XXH_UNREACHABLE()
     
    #define XXH_ASSUME(c)
     
    #define XXH_rotl32(x, r)
     
    #define XXH_rotl64(x, r)
     
    #define XXH_PRIME32_1   0x9E3779B1U
     
    #define XXH_PRIME32_2   0x85EBCA77U
     
    #define XXH_PRIME32_3   0xC2B2AE3DU
     
    #define XXH_PRIME32_4   0x27D4EB2FU
     
    #define XXH_PRIME32_5   0x165667B1U
     
    #define XXH_get32bits(p)
     
    #define XXH_PROCESS1
     
    #define XXH_PROCESS4
     
    #define XXH_PRIME64_1   0x9E3779B185EBCA87ULL
     
    #define XXH_PRIME64_2   0xC2B2AE3D27D4EB4FULL
     
    #define XXH_PRIME64_3   0x165667B19E3779F9ULL
     
    #define XXH_PRIME64_4   0x85EBCA77C2B2AE63ULL
     
    #define XXH_PRIME64_5   0x27D4EB2F165667C5ULL
     
    #define XXH_get64bits(p)
     
    #define XXH_likely(x)
     
    #define XXH_unlikely(x)
     
    #define XXH_HAS_INCLUDE(x)
     
    #define XXH_VECTOR   XXH_SCALAR
     Overrides the vectorization implementation chosen for XXH3.
     
    #define XXH_ACC_ALIGN   8
     Selects the minimum alignment for XXH3's accumulators.
     
    #define XXH_VECTOR   XXH_SCALAR
     Overrides the vectorization implementation chosen for XXH3.
     
    +#define XXH_SEC_ALIGN   XXH_ACC_ALIGN
     
    +#define XXH_ALIASING   /* nothing */
     
    #define XXH3_NEON_LANES   XXH_ACC_NB
     Controls the NEON to scalar ratio for XXH3.
     
    +#define XXH_VSX_BE   0
     
    #define ACCRND(acc, offset)
     
    #define XXH_PREFETCH(ptr)
     
    +#define XXH_SECRET_DEFAULT_SIZE   192 /* minimum XXH3_SECRET_SIZE_MIN */
     
    +#define XXH3_MIDSIZE_STARTOFFSET   3
     
    +#define XXH3_MIDSIZE_LASTOFFSET   17
     
    +#define XXH_STRIPE_LEN   64
     
    +#define XXH_SECRET_CONSUME_RATE   8 /* nb of secret bytes consumed at each accumulation */
     
    +#define XXH_ACC_NB   (XXH_STRIPE_LEN / sizeof(xxh_u64))
     
    +#define XXH_PREFETCH_DIST   512
     
    #define XXH3_ACCUMULATE_TEMPLATE(name)
     
    +#define XXH_TARGET_AVX512   /* disable attribute target */
     Like XXH_TARGET_SSE2, but for AVX512.
     
    +#define XXH_TARGET_AVX2   /* disable attribute target */
     Like XXH_TARGET_SSE2, but for AVX2.
     
    #define XXH_TARGET_SSE2   /* disable attribute target */
     Allows a function to be compiled with SSE2 intrinsics.
     
    #define _LSX_SHUFFLE(z, y, x, w)
     
    #define _LASX_SHUFFLE(z, y, x, w)
     
    +#define XXH3_accumulate_512   XXH3_accumulate_512_avx512
     
    +#define XXH3_accumulate   XXH3_accumulate_avx512
     
    +#define XXH3_scrambleAcc   XXH3_scrambleAcc_avx512
     
    +#define XXH3_initCustomSecret   XXH3_initCustomSecret_avx512
     
    +#define XXH_SECRET_LASTACC_START   7 /* not aligned on 8, last secret is different from acc & scrambler */
     
    +#define XXH_SECRET_MERGEACCS_START   11
     
    #define XXH3_INIT_ACC
     
    +#define XXH3_STREAM_USE_STACK   1
     
    +#define XXH3_INTERNALBUFFER_STRIPES   (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
     
    #define XXH_MIN(x, y)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Typedefs

    typedef uint32_t XXH32_hash_t
     An unsigned 32-bit integer.
     
    typedef struct XXH32_state_s XXH32_state_t
     The opaque state struct for the XXH32 streaming API.
     
    typedef struct XXH64_state_s XXH64_state_t
     The opaque state struct for the XXH64 streaming API.
     
    typedef struct XXH3_state_s XXH3_state_t
     The opaque state struct for the XXH3 streaming API.
     
    +typedef unsigned char xxh_u8
     
    +typedef XXH32_hash_t xxh_u32
     
    +typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING
     
    +typedef __vector unsigned long long xxh_u64x2
     
    +typedef __vector unsigned char xxh_u8x16
     
    +typedef __vector unsigned xxh_u32x4
     
    +typedef long long xxh_i64
     
    +typedef void(* XXH3_f_accumulate) (xxh_u64 *restrict, const xxh_u8 *restrict, const xxh_u8 *restrict, size_t)
     
    +typedef void(* XXH3_f_scrambleAcc) (void *restrict, const void *)
     
    +typedef void(* XXH3_f_initCustomSecret) (void *restrict, xxh_u64)
     
    +typedef XXH64_hash_t(* XXH3_hashLong64_f) (const void *restrict, size_t, XXH64_hash_t, const xxh_u8 *restrict, size_t)
     
    +typedef XXH128_hash_t(* XXH3_hashLong128_f) (const void *restrict, size_t, XXH64_hash_t, const void *restrict, size_t)
     
    typedef uint64_t XXH64_hash_t
     An unsigned 64-bit integer.
     
    + + + + + + +

    +Enumerations

    enum  XXH_errorcode { XXH_OK = 0 +, XXH_ERROR + }
     Exit code for the streaming API. More...
     
    enum  XXH_alignment { XXH_aligned +, XXH_unaligned + }
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Functions

    unsigned XXH_versionNumber (void)
     Obtains the xxHash version.
     
    XXH32_hash_t XXH32 (const void *input, size_t length, XXH32_hash_t seed)
     Calculates the 32-bit hash of input using xxHash32.
     
    XXH32_state_tXXH32_createState (void)
     Allocates an XXH32_state_t.
     
    XXH_errorcode XXH32_freeState (XXH32_state_t *statePtr)
     Frees an XXH32_state_t.
     
    void XXH32_copyState (XXH32_state_t *dst_state, const XXH32_state_t *src_state)
     Copies one XXH32_state_t to another.
     
    XXH_errorcode XXH32_reset (XXH32_state_t *statePtr, XXH32_hash_t seed)
     Resets an XXH32_state_t to begin a new hash.
     
    XXH_errorcode XXH32_update (XXH32_state_t *statePtr, const void *input, size_t length)
     Consumes a block of input to an XXH32_state_t.
     
    XXH32_hash_t XXH32_digest (const XXH32_state_t *statePtr)
     Returns the calculated hash value from an XXH32_state_t.
     
    void XXH32_canonicalFromHash (XXH32_canonical_t *dst, XXH32_hash_t hash)
     Converts an XXH32_hash_t to a big endian XXH32_canonical_t.
     
    XXH32_hash_t XXH32_hashFromCanonical (const XXH32_canonical_t *src)
     Converts an XXH32_canonical_t to a native XXH32_hash_t.
     
    XXH64_hash_t XXH64 (const void *input, size_t length, XXH64_hash_t seed)
     Calculates the 64-bit hash of input using xxHash64.
     
    XXH64_state_tXXH64_createState (void)
     Allocates an XXH64_state_t.
     
    XXH_errorcode XXH64_freeState (XXH64_state_t *statePtr)
     Frees an XXH64_state_t.
     
    void XXH64_copyState (XXH64_state_t *dst_state, const XXH64_state_t *src_state)
     Copies one XXH64_state_t to another.
     
    XXH_errorcode XXH64_reset (XXH64_state_t *statePtr, XXH64_hash_t seed)
     Resets an XXH64_state_t to begin a new hash.
     
    XXH_errorcode XXH64_update (XXH64_state_t *statePtr, const void *input, size_t length)
     Consumes a block of input to an XXH64_state_t.
     
    XXH64_hash_t XXH64_digest (const XXH64_state_t *statePtr)
     Returns the calculated hash value from an XXH64_state_t.
     
    void XXH64_canonicalFromHash (XXH64_canonical_t *dst, XXH64_hash_t hash)
     Converts an XXH64_hash_t to a big endian XXH64_canonical_t.
     
    XXH64_hash_t XXH64_hashFromCanonical (const XXH64_canonical_t *src)
     Converts an XXH64_canonical_t to a native XXH64_hash_t.
     
    XXH64_hash_t XXH3_64bits (const void *input, size_t length)
     Calculates 64-bit unseeded variant of XXH3 hash of input.
     
    XXH64_hash_t XXH3_64bits_withSeed (const void *input, size_t length, XXH64_hash_t seed)
     Calculates 64-bit seeded variant of XXH3 hash of input.
     
    XXH64_hash_t XXH3_64bits_withSecret (const void *data, size_t len, const void *secret, size_t secretSize)
     Calculates 64-bit variant of XXH3 with a custom "secret".
     
    XXH3_state_tXXH3_createState (void)
     Allocate an XXH3_state_t.
     
    XXH_errorcode XXH3_freeState (XXH3_state_t *statePtr)
     Frees an XXH3_state_t.
     
    void XXH3_copyState (XXH3_state_t *dst_state, const XXH3_state_t *src_state)
     Copies one XXH3_state_t to another.
     
    XXH_errorcode XXH3_64bits_reset (XXH3_state_t *statePtr)
     Resets an XXH3_state_t to begin a new hash.
     
    XXH_errorcode XXH3_64bits_reset_withSeed (XXH3_state_t *statePtr, XXH64_hash_t seed)
     Resets an XXH3_state_t with 64-bit seed to begin a new hash.
     
    XXH_errorcode XXH3_64bits_reset_withSecret (XXH3_state_t *statePtr, const void *secret, size_t secretSize)
     Resets an XXH3_state_t with secret data to begin a new hash.
     
    XXH_errorcode XXH3_64bits_update (XXH3_state_t *statePtr, const void *input, size_t length)
     Consumes a block of input to an XXH3_state_t.
     
    XXH64_hash_t XXH3_64bits_digest (const XXH3_state_t *statePtr)
     Returns the calculated XXH3 64-bit hash value from an XXH3_state_t.
     
    XXH128_hash_t XXH3_128bits (const void *data, size_t len)
     Calculates 128-bit unseeded variant of XXH3 of data.
     
    XXH128_hash_t XXH3_128bits_withSeed (const void *data, size_t len, XXH64_hash_t seed)
     Calculates 128-bit seeded variant of XXH3 hash of data.
     
    XXH128_hash_t XXH3_128bits_withSecret (const void *data, size_t len, const void *secret, size_t secretSize)
     Calculates 128-bit variant of XXH3 with a custom "secret".
     
    XXH_errorcode XXH3_128bits_reset (XXH3_state_t *statePtr)
     Resets an XXH3_state_t to begin a new hash.
     
    XXH_errorcode XXH3_128bits_reset_withSeed (XXH3_state_t *statePtr, XXH64_hash_t seed)
     Resets an XXH3_state_t with 64-bit seed to begin a new hash.
     
    XXH_errorcode XXH3_128bits_reset_withSecret (XXH3_state_t *statePtr, const void *secret, size_t secretSize)
     Resets an XXH3_state_t with secret data to begin a new hash.
     
    XXH_errorcode XXH3_128bits_update (XXH3_state_t *statePtr, const void *input, size_t length)
     Consumes a block of input to an XXH3_state_t.
     
    XXH128_hash_t XXH3_128bits_digest (const XXH3_state_t *statePtr)
     Returns the calculated XXH3 128-bit hash value from an XXH3_state_t.
     
    int XXH128_isEqual (XXH128_hash_t h1, XXH128_hash_t h2)
     Check equality of two XXH128_hash_t values.
     
    int XXH128_cmp (const void *h128_1, const void *h128_2)
     Compares two XXH128_hash_t.
     
    void XXH128_canonicalFromHash (XXH128_canonical_t *dst, XXH128_hash_t hash)
     Converts an XXH128_hash_t to a big endian XXH128_canonical_t.
     
    XXH128_hash_t XXH128_hashFromCanonical (const XXH128_canonical_t *src)
     Converts an XXH128_canonical_t to a native XXH128_hash_t.
     
    XXH128_hash_t XXH128 (const void *data, size_t len, XXH64_hash_t seed)
     Calculates the 128-bit hash of data using XXH3.
     
    XXH_errorcode XXH3_generateSecret (void *secretBuffer, size_t secretSize, const void *customSeed, size_t customSeedSize)
     Derive a high-entropy secret from any user-defined content, named customSeed.
     
    void XXH3_generateSecret_fromSeed (void *secretBuffer, XXH64_hash_t seed)
     Generate the same secret as the _withSeed() variants.
     
    XXH64_hash_t XXH3_64bits_withSecretandSeed (const void *data, size_t len, const void *secret, size_t secretSize, XXH64_hash_t seed)
     Calculates 64/128-bit seeded variant of XXH3 hash of data.
     
    XXH128_hash_t XXH3_128bits_withSecretandSeed (const void *input, size_t length, const void *secret, size_t secretSize, XXH64_hash_t seed64)
     Calculates 128-bit seeded variant of XXH3 hash of data.
     
    XXH_errorcode XXH3_64bits_reset_withSecretandSeed (XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64)
     Resets an XXH3_state_t with secret data to begin a new hash.
     
    XXH_errorcode XXH3_128bits_reset_withSecretandSeed (XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64)
     Resets an XXH3_state_t with secret data to begin a new hash.
     
    +XXH_STATIC xxh_u64 XXH64_finalize (xxh_u64 hash, const xxh_u8 *ptr, size_t len, XXH_alignment align)
     
    XXH_STATIC_ASSERT (XXH_STRIPE_LEN==sizeof(__m512i))
     
    for (i=0;i< XXH_STRIPE_LEN/sizeof(__m256i);i++)
     
    XXH_ASSERT ((((size_t) acc) &(XXH_ACC_ALIGN-1))==0)
     
    XXH_ASSERT (lane< XXH_ACC_NB)
     
    +XXH3_WITH_SECRET_INLINE XXH64_hash_t XXH3_hashLong_64b_withSecret (const void *restrict input, size_t len, XXH64_hash_t seed64, const xxh_u8 *restrict secret, size_t secretLen)
     
    +XXH3_WITH_SECRET_INLINE XXH128_hash_t XXH3_hashLong_128b_withSecret (const void *restrict input, size_t len, XXH64_hash_t seed64, const void *restrict secret, size_t secretLen)
     
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +Variables

    static XXH_TARGET_AVX512 const void *restrict secret
     
    +const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1)
     
    +__m512i const acc_vec = *xacc
     
    +__m512i const shifted = _mm512_srli_epi64 (acc_vec, 47)
     
    +__m512i const key_vec = _mm512_loadu_si512 (secret)
     
    +__m512i const data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 )
     
    +__m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32)
     
    +__m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32)
     
    +__m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32)
     
    +* xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32))
     
    +const __m256i *const xsecret = (const __m256i *) secret
     
    +size_t i
     
    +uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1)
     
    +uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32))
     
    +xxh_u64x2 const v32 = { 32, 32 }
     
    +xxh_u64x2 const v47 = { 47, 47 }
     
    +xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 }
     
    static void const *restrict size_t lane
     
    +xxh_u64 acc64 = xacc[lane]
     
    +typedef XXH64_hash_t xxh_u64
     
    +

    Detailed Description

    +

    xxHash prototypes and implementation

    +

    Macro Definition Documentation

    + +

    ◆ XXH_ALIGN

    + +
    +
    + + + + + + + +
    #define XXH_ALIGN( n)
    +
    +Value:
    /* disabled */
    +
    +
    +
    + +

    ◆ XXH_ALIGN_MEMBER

    + +
    +
    + + + + + + + + + + + +
    #define XXH_ALIGN_MEMBER( align,
    type )
    +
    +Value:
    XXH_ALIGN(align) type
    +
    +
    +
    + +

    ◆ XXH3_SECRET_DEFAULT_SIZE

    + +
    +
    + + + + +
    #define XXH3_SECRET_DEFAULT_SIZE   192
    +
    + +

    Default Secret's size.

    +

    This is the size of internal XXH3_kSecret and is needed by XXH3_generateSecret_fromSeed().

    +

    Not to be confused with XXH3_SECRET_SIZE_MIN.

    + +
    +
    + +

    ◆ XXH3_INITSTATE

    + +
    +
    + + + + + + + +
    #define XXH3_INITSTATE( XXH3_state_ptr)
    +
    +Value:
    do { \
    +
    XXH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \
    +
    tmp_xxh3_state_ptr->seed = 0; \
    +
    tmp_xxh3_state_ptr->extSecret = NULL; \
    +
    } while(0)
    +
    struct XXH3_state_s XXH3_state_t
    The opaque state struct for the XXH3 streaming API.
    Definition xxhash.h:1244
    +
    const unsigned char * extSecret
    Definition xxhash.h:1796
    +
    XXH64_hash_t seed
    Definition xxhash.h:1792
    +
    +

    Initializes a stack-allocated XXH3_state_s.

    +

    When the XXH3_state_t structure is merely emplaced on stack, it should be initialized with XXH3_INITSTATE() or a memset() in case its first reset uses XXH3_NNbits_reset_withSeed(). This init can be omitted if the first reset uses default or _withSecret mode. This operation isn't necessary when the state is created with XXH3_createState(). Note that this doesn't prepare the state for a streaming operation, it's still necessary to use XXH3_NNbits_reset*() afterwards.

    + +
    +
    + +

    ◆ XXH_PROCESS1

    + +
    +
    + + + + +
    #define XXH_PROCESS1
    +
    +Value:
    do { \
    +
    hash += (*ptr++) * XXH_PRIME32_5; \
    +
    hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1; \
    +
    } while (0)
    +
    #define XXH_PRIME32_1
    Definition xxhash.h:2906
    +
    #define XXH_PRIME32_5
    Definition xxhash.h:2910
    +
    +
    +
    + +

    ◆ XXH_PROCESS4

    + +
    +
    + + + + +
    #define XXH_PROCESS4
    +
    +Value:
    do { \
    +
    hash += XXH_get32bits(ptr) * XXH_PRIME32_3; \
    +
    ptr += 4; \
    +
    hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \
    +
    } while (0)
    +
    #define XXH_PRIME32_4
    Definition xxhash.h:2909
    +
    #define XXH_PRIME32_3
    Definition xxhash.h:2908
    +
    +
    +
    +
    +
    + + + + diff --git a/doc/v0.8.3/xxhash_8h.js b/doc/v0.8.3/xxhash_8h.js new file mode 100644 index 00000000..3529bf81 --- /dev/null +++ b/doc/v0.8.3/xxhash_8h.js @@ -0,0 +1,116 @@ +var xxhash_8h = +[ + [ "XXH32_state_s", "struct_x_x_h32__state__s.html", "struct_x_x_h32__state__s" ], + [ "XXH64_state_s", "struct_x_x_h64__state__s.html", "struct_x_x_h64__state__s" ], + [ "XXH3_state_s", "struct_x_x_h3__state__s.html", "struct_x_x_h3__state__s" ], + [ "XXH_STATIC_LINKING_ONLY", "group__public.html#ga546f2633ae1036f49bdc5582971d7f1e", null ], + [ "XXH_IMPLEMENTATION", "group__public.html#gaa40be3a031b9a5bd9afc800b0959a0c9", null ], + [ "XXH_INLINE_ALL", "group__public.html#ga5a61b869708b770ad75e3e063a2f9273", null ], + [ "XXH_PRIVATE_API", "group__public.html#ga6589b6ea961ec073de006a47282c9a41", null ], + [ "XXH_NAMESPACE", "group__public.html#gacde9dad44d3e0e432474bef93e12f9e7", null ], + [ "XXH_PUBLIC_API", "group__public.html#ga5832897ed49938aefa629a76034b36b1", null ], + [ "XXH_PUBLIC_API", "group__public.html#ga5832897ed49938aefa629a76034b36b1", null ], + [ "XXH_VERSION_NUMBER", "group__public.html#gacc66393fff091acefc0e2a00ec5462c4", null ], + [ "XXH_SCALAR", "group__tuning.html#ga9cc731558db44d378e6dde975236d4ab", null ], + [ "XXH_SSE2", "group___x_x_h3__family.html#ga70e0a18d7c95a038b39d2e649e99d4ee", null ], + [ "XXH_AVX2", "group___x_x_h3__family.html#gaf47a10685143573ae686cb24a6b12180", null ], + [ "XXH_AVX512", "group___x_x_h3__family.html#gac99b74047afbf5d887014e8bd8a4311e", null ], + [ "XXH_NEON", "group___x_x_h3__family.html#ga1590a8c029aa95462b4d2f21d9e87222", null ], + [ "XXH_VSX", "group___x_x_h3__family.html#gaaf36dc5eae1c42626ae2fa18b752eac8", null ], + [ "XXH_SVE", "group___x_x_h3__family.html#ga76cb3b8fe2820051f6ded37fc0f78632", null ], + [ "XXH_LSX", "group___x_x_h3__family.html#ga0cf336b90e67afd4a6028a168d2036fc", null ], + [ "XXH_LASX", "group___x_x_h3__family.html#gae59e018cc7b8e2e7216c2ad95b682672", null ], + [ "XXH3_SECRET_SIZE_MIN", "group___x_x_h3__family.html#gaeb79a9111c58af32599f8e5cd71d67d2", null ], + [ "XXH3_SECRET_DEFAULT_SIZE", "xxhash_8h.html#ae30274eeda9ae2faa2eda08deff9696f", null ], + [ "XXH3_INITSTATE", "xxhash_8h.html#afc79de39f0cf7e8d395f131c0d9d568e", null ], + [ "XXH3_MIDSIZE_MAX", "xxhash_8h.html#add6603b0469aa41bf291ae15a8f65fc6", null ], + [ "XXH_NO_LONG_LONG", "group__tuning.html#ga7e738bf7fb8249e8a834a8c8a8581d80", null ], + [ "XXH_FORCE_MEMORY_ACCESS", "group__tuning.html#ga04b48241beb7c34e5929d328cf5cc71a", null ], + [ "XXH_SIZE_OPT", "group__tuning.html#ga1e9850064fc149181cce7431f40a990a", null ], + [ "XXH_FORCE_ALIGN_CHECK", "group__tuning.html#gaee35763869a969d5576e70dac1c08b8d", null ], + [ "XXH_NO_INLINE_HINTS", "group__tuning.html#gae980c41901d840d8909aa74d603ad4f1", null ], + [ "XXH3_INLINE_SECRET", "group__tuning.html#gaa6d5f6ddf0a7d14b90a63cb6a9d34c26", null ], + [ "XXH32_ENDJMP", "group__tuning.html#gad5824529c4ad74d2d5cc05bf4868613a", null ], + [ "XXH_NO_STREAM", "group__tuning.html#ga96f0b839b3187287c904d37c993f6d1f", null ], + [ "XXH_DEBUGLEVEL", "group__tuning.html#ga574ceb8ab088243cb0dc833b28320eb5", null ], + [ "XXH_CPU_LITTLE_ENDIAN", "group__tuning.html#ga408fac02658eb4a81f7a1877f1ca3b3f", null ], + [ "XXH_PRIME32_1", "group___x_x_h32__impl.html#ga29fede2b86ee758448c55edf6171e11f", null ], + [ "XXH_PRIME32_2", "group___x_x_h32__impl.html#ga23d49e684c0551afaed8e4ff40940c79", null ], + [ "XXH_PRIME32_3", "group___x_x_h32__impl.html#gacdda6ef95561d39cf2f9b7f2cd5c6693", null ], + [ "XXH_PRIME32_4", "group___x_x_h32__impl.html#ga9f43a7ed63cb15dfc49b1a42c250e511", null ], + [ "XXH_PRIME32_5", "group___x_x_h32__impl.html#gaa4ab6ba3eb0659356b8ed3b84c43e3e7", null ], + [ "XXH_PRIME64_1", "group___x_x_h64__impl.html#ga20651a9ad53cae6f0a4feb1393d5a716", null ], + [ "XXH_PRIME64_2", "group___x_x_h64__impl.html#ga33a01ca165b68cef76da009a54e3ba54", null ], + [ "XXH_PRIME64_3", "group___x_x_h64__impl.html#gad18b925ab3b4ad25ae26eb4fb00ebcb8", null ], + [ "XXH_PRIME64_4", "group___x_x_h64__impl.html#ga6326d9c3883242a3b5602fae1507afc5", null ], + [ "XXH_PRIME64_5", "group___x_x_h64__impl.html#gae44b2a496b0a4184699e7d11ec2d70c6", null ], + [ "XXH_VECTOR", "group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86", null ], + [ "XXH_ACC_ALIGN", "group__tuning.html#ga15f2f40c9206c691f66cf260841f8ad1", null ], + [ "XXH_VECTOR", "group__tuning.html#gab216d0cd3d35dcfd7c6860ea296cdd86", null ], + [ "XXH3_NEON_LANES", "group__tuning.html#gac799ce966f18e4837f7fdc3d51917e9c", null ], + [ "XXH_TARGET_AVX512", "group__dispatch.html#ga94d06a353acaa62bbd9fbf65e865a282", null ], + [ "XXH_TARGET_AVX2", "group__dispatch.html#gad2a40b306e49c6e6240acd43484ed5e0", null ], + [ "XXH_TARGET_SSE2", "group__dispatch.html#ga13e5de884479e06fa52a7cf484158e2e", null ], + [ "XXH32_hash_t", "group__public.html#ga469df6c7273f15924de58143ef1afe14", null ], + [ "XXH32_state_t", "group___x_x_h32__family.html#ga0048f07d4a3051c20598464f007aa6c5", null ], + [ "XXH64_hash_t", "group__public.html#ga5406b285b18dfcefa93efed489e3b603", null ], + [ "XXH64_state_t", "group___x_x_h64__family.html#ga0702bdbc80b0cf9e94f2379f7d839b8c", null ], + [ "XXH3_state_t", "group___x_x_h3__family.html#ga8e454084a62efb09fad8ba3cc1c1b1d0", null ], + [ "XXH_errorcode", "group__public.html#ga5020905455674b8c83c1dbc73f0d3534", [ + [ "XXH_OK", "group__public.html#gga5020905455674b8c83c1dbc73f0d3534abd20b092d624344e301b0cadd29d5bd6", null ], + [ "XXH_ERROR", "group__public.html#gga5020905455674b8c83c1dbc73f0d3534a462a18276729783125c7116cf102667f", null ] + ] ], + [ "XXH_alignment", "group__impl.html#gadec56fccd4f83e34902b6b09ecccfff5", [ + [ "XXH_aligned", "group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5a41340c9f33fe739cef7a1c56dc617194", null ], + [ "XXH_unaligned", "group__impl.html#ggadec56fccd4f83e34902b6b09ecccfff5ab082c14fd7eef12bcb1dfda2e813586f", null ] + ] ], + [ "XXH_versionNumber", "group__public.html#gabc57fd428d4d33906b3830c746bc4ac9", null ], + [ "XXH32", "group___x_x_h32__family.html#ga310c01be2371883ad3bb37930626ec86", null ], + [ "XXH32_createState", "group___x_x_h32__family.html#ga7d53ff3de134f4e294de011cc3e6a498", null ], + [ "XXH32_freeState", "group___x_x_h32__family.html#ga87d9d298652e8d5560f482c963ddd6c8", null ], + [ "XXH32_copyState", "group___x_x_h32__family.html#gaed14b659149c1327acac124a07ee29d3", null ], + [ "XXH32_reset", "group___x_x_h32__family.html#ga00a68397351fe1d54fe23a831294b4ef", null ], + [ "XXH32_update", "group___x_x_h32__family.html#ga40aa0e1469b0db64a4694cd97c8563b4", null ], + [ "XXH32_digest", "group___x_x_h32__family.html#gae4d82d62718fd5e09c83ad3f639c892a", null ], + [ "XXH32_canonicalFromHash", "group___x_x_h32__family.html#gab033c1336e85ab51e02f1987254af9bd", null ], + [ "XXH32_hashFromCanonical", "group___x_x_h32__family.html#gac3cf699c65b7b63df08964c56b1bdaf5", null ], + [ "XXH64", "group___x_x_h64__family.html#ga9651d864dea7e0755ae3935bf6bf7082", null ], + [ "XXH64_createState", "group___x_x_h64__family.html#gadcfc7fb0e3382dc0b13afb125a0fea5c", null ], + [ "XXH64_freeState", "group___x_x_h64__family.html#gac03f9ec46a29db6f6a999c832cf759de", null ], + [ "XXH64_copyState", "group___x_x_h64__family.html#ga3088b416eee8dcdb09804f722535761e", null ], + [ "XXH64_reset", "group___x_x_h64__family.html#gafa0153665b1194c656dce7c29c0193c5", null ], + [ "XXH64_update", "group___x_x_h64__family.html#gaeffe8da4eab0d74a741548bb7c895619", null ], + [ "XXH64_digest", "group___x_x_h64__family.html#gaf5c7d2afed088ede4ff37fa6b6a02412", null ], + [ "XXH64_canonicalFromHash", "group___x_x_h64__family.html#ga1b88114ccd49685ab9acf02aabbbdd7b", null ], + [ "XXH64_hashFromCanonical", "group___x_x_h64__family.html#ga8f1b5423301ea5ebbd9e4e01681446e9", null ], + [ "XXH3_64bits", "group___x_x_h3__family.html#gacc4473b9d9953adcbfcc51b32cb887ef", null ], + [ "XXH3_64bits_withSeed", "group___x_x_h3__family.html#ga22b06ba82074a88f9c08c2dfa3808f80", null ], + [ "XXH3_64bits_withSecret", "group___x_x_h3__family.html#gac3b0a46f4a38befb3c8fa122f5d74dbb", null ], + [ "XXH3_createState", "group___x_x_h3__family.html#ga95592969a08becc37428dd547c36b8fd", null ], + [ "XXH3_freeState", "group___x_x_h3__family.html#gaee640ba2104fe3107b7d679f40d17277", null ], + [ "XXH3_copyState", "group___x_x_h3__family.html#gac35f35d7339f399121067c0f64f01c19", null ], + [ "XXH3_64bits_reset", "group___x_x_h3__family.html#gae178ffc944bf355c8f3ba8c283ce3120", null ], + [ "XXH3_64bits_reset_withSeed", "group___x_x_h3__family.html#ga8d1f6de09ac556d4564ede1e748583a6", null ], + [ "XXH3_64bits_reset_withSecret", "group___x_x_h3__family.html#ga952ac3a3662c76f749b9eaced7b9746a", null ], + [ "XXH3_64bits_update", "group___x_x_h3__family.html#gad4b1454f1650856029d09f75a919740f", null ], + [ "XXH3_64bits_digest", "group___x_x_h3__family.html#ga03116acd8c5308bee9cce4d111ad92bf", null ], + [ "XXH3_128bits", "group___x_x_h3__family.html#gaa519b24488e33bb208840d2ecfe8d8de", null ], + [ "XXH3_128bits_withSeed", "group___x_x_h3__family.html#ga2f4c55956ea9cc542340720549cbbcda", null ], + [ "XXH3_128bits_withSecret", "group___x_x_h3__family.html#gaa7f6e73421e0be9abd7181991ba8030f", null ], + [ "XXH3_128bits_reset", "group___x_x_h3__family.html#gab2560d6ad650073db0242473e7471ba5", null ], + [ "XXH3_128bits_reset_withSeed", "group___x_x_h3__family.html#ga98de207b208f2778a71795993501dc9c", null ], + [ "XXH3_128bits_reset_withSecret", "group___x_x_h3__family.html#gafc1994ce5b08edba1c742958bbe31d89", null ], + [ "XXH3_128bits_update", "group___x_x_h3__family.html#ga03531ff6ecf1292888de3290bb7d8ebe", null ], + [ "XXH3_128bits_digest", "group___x_x_h3__family.html#ga9437c17a93a8b34c8e2fdfc992d260e9", null ], + [ "XXH128_isEqual", "group___x_x_h3__family.html#gae48a69e41062619715826660580d42ab", null ], + [ "XXH128_cmp", "group___x_x_h3__family.html#ga2965cb06dc0d14752d72c30b9f9b56cf", null ], + [ "XXH128_canonicalFromHash", "group___x_x_h3__family.html#ga0eb1c6f5085bc5f354f2aac4971ffcb2", null ], + [ "XXH128_hashFromCanonical", "group___x_x_h3__family.html#gabac9bd8cff275f3b862cd5a7e9045818", null ], + [ "XXH128", "group___x_x_h3__family.html#ga334e014be8252d34f39e6496d0379e13", null ], + [ "XXH3_generateSecret", "group___x_x_h3__family.html#ga4be9a95a2e7b7252d6f4a6e4f651ac42", null ], + [ "XXH3_generateSecret_fromSeed", "group___x_x_h3__family.html#ga0888d6959efe3982fcafe516c22ef5a8", null ], + [ "XXH3_64bits_withSecretandSeed", "group___x_x_h3__impl.html#ga7c61723080fb6c64f186c419832d5521", null ], + [ "XXH3_128bits_withSecretandSeed", "group___x_x_h3__family.html#gadd6e3be42f33f56f199777141b94604d", null ], + [ "XXH3_64bits_reset_withSecretandSeed", "group___x_x_h3__family.html#ga6eac2cf5c3615c358acf210890bdb621", null ], + [ "XXH3_128bits_reset_withSecretandSeed", "group___x_x_h3__family.html#gaad850da62eb1bcf23f8a09f7c95d11c0", null ] +]; \ No newline at end of file diff --git a/doc/v0.8.3/xxhash_8h_source.html b/doc/v0.8.3/xxhash_8h_source.html new file mode 100644 index 00000000..7e1df6bd --- /dev/null +++ b/doc/v0.8.3/xxhash_8h_source.html @@ -0,0 +1,5622 @@ + + + + + + + +xxHash: xxhash.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    xxHash 0.8.3 +
    +
    Extremely fast non-cryptographic hash function
    +
    + +   + + + + +
    +
    +
    + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +
    Loading...
    +
    Searching...
    +
    No Matches
    +
    +
    +
    +
    + +
    +
    xxhash.h
    +
    +
    +Go to the documentation of this file.
    1/*
    +
    2 * xxHash - Extremely Fast Hash algorithm
    +
    3 * Header File
    +
    4 * Copyright (C) 2012-2023 Yann Collet
    +
    5 *
    +
    6 * BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
    +
    7 *
    +
    8 * Redistribution and use in source and binary forms, with or without
    +
    9 * modification, are permitted provided that the following conditions are
    +
    10 * met:
    +
    11 *
    +
    12 * * Redistributions of source code must retain the above copyright
    +
    13 * notice, this list of conditions and the following disclaimer.
    +
    14 * * Redistributions in binary form must reproduce the above
    +
    15 * copyright notice, this list of conditions and the following disclaimer
    +
    16 * in the documentation and/or other materials provided with the
    +
    17 * distribution.
    +
    18 *
    +
    19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    +
    20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    +
    21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    +
    22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    +
    23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    +
    24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    +
    25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    +
    26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    +
    27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +
    28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    +
    29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +
    30 *
    +
    31 * You can contact the author at:
    +
    32 * - xxHash homepage: https://www.xxhash.com
    +
    33 * - xxHash source repository: https://github.com/Cyan4973/xxHash
    +
    34 */
    +
    35
    +
    243
    +
    244#if defined (__cplusplus)
    +
    245extern "C" {
    +
    246#endif
    +
    247
    +
    248/* ****************************
    +
    249 * INLINE mode
    +
    250 ******************************/
    +
    256#ifdef XXH_DOXYGEN
    +
    268# define XXH_STATIC_LINKING_ONLY
    +
    269/* Do not undef XXH_STATIC_LINKING_ONLY for Doxygen */
    +
    270
    +
    281# define XXH_IMPLEMENTATION
    +
    282/* Do not undef XXH_IMPLEMENTATION for Doxygen */
    +
    283
    +
    302# define XXH_INLINE_ALL
    +
    303# undef XXH_INLINE_ALL
    +
    307# define XXH_PRIVATE_API
    +
    308# undef XXH_PRIVATE_API
    +
    322# define XXH_NAMESPACE /* YOUR NAME HERE */
    +
    323# undef XXH_NAMESPACE
    +
    324#endif
    +
    325
    +
    326#if (defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)) \
    +
    327 && !defined(XXH_INLINE_ALL_31684351384)
    +
    328 /* this section should be traversed only once */
    +
    329# define XXH_INLINE_ALL_31684351384
    +
    330 /* give access to the advanced API, required to compile implementations */
    +
    331# undef XXH_STATIC_LINKING_ONLY /* avoid macro redef */
    +
    332# define XXH_STATIC_LINKING_ONLY
    +
    333 /* make all functions private */
    +
    334# undef XXH_PUBLIC_API
    +
    335# if defined(__GNUC__)
    +
    336# define XXH_PUBLIC_API static __inline __attribute__((__unused__))
    +
    337# elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */)
    +
    338# define XXH_PUBLIC_API static inline
    +
    339# elif defined(_MSC_VER)
    +
    340# define XXH_PUBLIC_API static __inline
    +
    341# else
    +
    342 /* note: this version may generate warnings for unused static functions */
    +
    343# define XXH_PUBLIC_API static
    +
    344# endif
    +
    345
    +
    346 /*
    +
    347 * This part deals with the special case where a unit wants to inline xxHash,
    +
    348 * but "xxhash.h" has previously been included without XXH_INLINE_ALL,
    +
    349 * such as part of some previously included *.h header file.
    +
    350 * Without further action, the new include would just be ignored,
    +
    351 * and functions would effectively _not_ be inlined (silent failure).
    +
    352 * The following macros solve this situation by prefixing all inlined names,
    +
    353 * avoiding naming collision with previous inclusions.
    +
    354 */
    +
    355 /* Before that, we unconditionally #undef all symbols,
    +
    356 * in case they were already defined with XXH_NAMESPACE.
    +
    357 * They will then be redefined for XXH_INLINE_ALL
    +
    358 */
    +
    359# undef XXH_versionNumber
    +
    360 /* XXH32 */
    +
    361# undef XXH32
    +
    362# undef XXH32_createState
    +
    363# undef XXH32_freeState
    +
    364# undef XXH32_reset
    +
    365# undef XXH32_update
    +
    366# undef XXH32_digest
    +
    367# undef XXH32_copyState
    +
    368# undef XXH32_canonicalFromHash
    +
    369# undef XXH32_hashFromCanonical
    +
    370 /* XXH64 */
    +
    371# undef XXH64
    +
    372# undef XXH64_createState
    +
    373# undef XXH64_freeState
    +
    374# undef XXH64_reset
    +
    375# undef XXH64_update
    +
    376# undef XXH64_digest
    +
    377# undef XXH64_copyState
    +
    378# undef XXH64_canonicalFromHash
    +
    379# undef XXH64_hashFromCanonical
    +
    380 /* XXH3_64bits */
    +
    381# undef XXH3_64bits
    +
    382# undef XXH3_64bits_withSecret
    +
    383# undef XXH3_64bits_withSeed
    +
    384# undef XXH3_64bits_withSecretandSeed
    +
    385# undef XXH3_createState
    +
    386# undef XXH3_freeState
    +
    387# undef XXH3_copyState
    +
    388# undef XXH3_64bits_reset
    +
    389# undef XXH3_64bits_reset_withSeed
    +
    390# undef XXH3_64bits_reset_withSecret
    +
    391# undef XXH3_64bits_update
    +
    392# undef XXH3_64bits_digest
    +
    393# undef XXH3_generateSecret
    +
    394 /* XXH3_128bits */
    +
    395# undef XXH128
    +
    396# undef XXH3_128bits
    +
    397# undef XXH3_128bits_withSeed
    +
    398# undef XXH3_128bits_withSecret
    +
    399# undef XXH3_128bits_reset
    +
    400# undef XXH3_128bits_reset_withSeed
    +
    401# undef XXH3_128bits_reset_withSecret
    +
    402# undef XXH3_128bits_reset_withSecretandSeed
    +
    403# undef XXH3_128bits_update
    +
    404# undef XXH3_128bits_digest
    +
    405# undef XXH128_isEqual
    +
    406# undef XXH128_cmp
    +
    407# undef XXH128_canonicalFromHash
    +
    408# undef XXH128_hashFromCanonical
    +
    409 /* Finally, free the namespace itself */
    +
    410# undef XXH_NAMESPACE
    +
    411
    +
    412 /* employ the namespace for XXH_INLINE_ALL */
    +
    413# define XXH_NAMESPACE XXH_INLINE_
    +
    414 /*
    +
    415 * Some identifiers (enums, type names) are not symbols,
    +
    416 * but they must nonetheless be renamed to avoid redeclaration.
    +
    417 * Alternative solution: do not redeclare them.
    +
    418 * However, this requires some #ifdefs, and has a more dispersed impact.
    +
    419 * Meanwhile, renaming can be achieved in a single place.
    +
    420 */
    +
    421# define XXH_IPREF(Id) XXH_NAMESPACE ## Id
    +
    422# define XXH_OK XXH_IPREF(XXH_OK)
    +
    423# define XXH_ERROR XXH_IPREF(XXH_ERROR)
    +
    424# define XXH_errorcode XXH_IPREF(XXH_errorcode)
    +
    425# define XXH32_canonical_t XXH_IPREF(XXH32_canonical_t)
    +
    426# define XXH64_canonical_t XXH_IPREF(XXH64_canonical_t)
    +
    427# define XXH128_canonical_t XXH_IPREF(XXH128_canonical_t)
    +
    428# define XXH32_state_s XXH_IPREF(XXH32_state_s)
    +
    429# define XXH32_state_t XXH_IPREF(XXH32_state_t)
    +
    430# define XXH64_state_s XXH_IPREF(XXH64_state_s)
    +
    431# define XXH64_state_t XXH_IPREF(XXH64_state_t)
    +
    432# define XXH3_state_s XXH_IPREF(XXH3_state_s)
    +
    433# define XXH3_state_t XXH_IPREF(XXH3_state_t)
    +
    434# define XXH128_hash_t XXH_IPREF(XXH128_hash_t)
    +
    435 /* Ensure the header is parsed again, even if it was previously included */
    +
    436# undef XXHASH_H_5627135585666179
    +
    437# undef XXHASH_H_STATIC_13879238742
    +
    438#endif /* XXH_INLINE_ALL || XXH_PRIVATE_API */
    +
    439
    +
    440/* ****************************************************************
    +
    441 * Stable API
    +
    442 *****************************************************************/
    +
    443#ifndef XXHASH_H_5627135585666179
    +
    444#define XXHASH_H_5627135585666179 1
    +
    445
    +
    447#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
    +
    448# if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
    +
    449# ifdef XXH_EXPORT
    +
    450# define XXH_PUBLIC_API __declspec(dllexport)
    +
    451# elif XXH_IMPORT
    +
    452# define XXH_PUBLIC_API __declspec(dllimport)
    +
    453# endif
    +
    454# else
    +
    455# define XXH_PUBLIC_API /* do nothing */
    +
    456# endif
    +
    457#endif
    +
    458
    +
    459#ifdef XXH_NAMESPACE
    +
    460# define XXH_CAT(A,B) A##B
    +
    461# define XXH_NAME2(A,B) XXH_CAT(A,B)
    +
    462# define XXH_versionNumber XXH_NAME2(XXH_NAMESPACE, XXH_versionNumber)
    +
    463/* XXH32 */
    +
    464# define XXH32 XXH_NAME2(XXH_NAMESPACE, XXH32)
    +
    465# define XXH32_createState XXH_NAME2(XXH_NAMESPACE, XXH32_createState)
    +
    466# define XXH32_freeState XXH_NAME2(XXH_NAMESPACE, XXH32_freeState)
    +
    467# define XXH32_reset XXH_NAME2(XXH_NAMESPACE, XXH32_reset)
    +
    468# define XXH32_update XXH_NAME2(XXH_NAMESPACE, XXH32_update)
    +
    469# define XXH32_digest XXH_NAME2(XXH_NAMESPACE, XXH32_digest)
    +
    470# define XXH32_copyState XXH_NAME2(XXH_NAMESPACE, XXH32_copyState)
    +
    471# define XXH32_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH32_canonicalFromHash)
    +
    472# define XXH32_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH32_hashFromCanonical)
    +
    473/* XXH64 */
    +
    474# define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64)
    +
    475# define XXH64_createState XXH_NAME2(XXH_NAMESPACE, XXH64_createState)
    +
    476# define XXH64_freeState XXH_NAME2(XXH_NAMESPACE, XXH64_freeState)
    +
    477# define XXH64_reset XXH_NAME2(XXH_NAMESPACE, XXH64_reset)
    +
    478# define XXH64_update XXH_NAME2(XXH_NAMESPACE, XXH64_update)
    +
    479# define XXH64_digest XXH_NAME2(XXH_NAMESPACE, XXH64_digest)
    +
    480# define XXH64_copyState XXH_NAME2(XXH_NAMESPACE, XXH64_copyState)
    +
    481# define XXH64_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH64_canonicalFromHash)
    +
    482# define XXH64_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH64_hashFromCanonical)
    +
    483/* XXH3_64bits */
    +
    484# define XXH3_64bits XXH_NAME2(XXH_NAMESPACE, XXH3_64bits)
    +
    485# define XXH3_64bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecret)
    +
    486# define XXH3_64bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSeed)
    +
    487# define XXH3_64bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_withSecretandSeed)
    +
    488# define XXH3_createState XXH_NAME2(XXH_NAMESPACE, XXH3_createState)
    +
    489# define XXH3_freeState XXH_NAME2(XXH_NAMESPACE, XXH3_freeState)
    +
    490# define XXH3_copyState XXH_NAME2(XXH_NAMESPACE, XXH3_copyState)
    +
    491# define XXH3_64bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset)
    +
    492# define XXH3_64bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSeed)
    +
    493# define XXH3_64bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecret)
    +
    494# define XXH3_64bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_reset_withSecretandSeed)
    +
    495# define XXH3_64bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_update)
    +
    496# define XXH3_64bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_64bits_digest)
    +
    497# define XXH3_generateSecret XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret)
    +
    498# define XXH3_generateSecret_fromSeed XXH_NAME2(XXH_NAMESPACE, XXH3_generateSecret_fromSeed)
    +
    499/* XXH3_128bits */
    +
    500# define XXH128 XXH_NAME2(XXH_NAMESPACE, XXH128)
    +
    501# define XXH3_128bits XXH_NAME2(XXH_NAMESPACE, XXH3_128bits)
    +
    502# define XXH3_128bits_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSeed)
    +
    503# define XXH3_128bits_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecret)
    +
    504# define XXH3_128bits_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_withSecretandSeed)
    +
    505# define XXH3_128bits_reset XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset)
    +
    506# define XXH3_128bits_reset_withSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSeed)
    +
    507# define XXH3_128bits_reset_withSecret XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecret)
    +
    508# define XXH3_128bits_reset_withSecretandSeed XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_reset_withSecretandSeed)
    +
    509# define XXH3_128bits_update XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_update)
    +
    510# define XXH3_128bits_digest XXH_NAME2(XXH_NAMESPACE, XXH3_128bits_digest)
    +
    511# define XXH128_isEqual XXH_NAME2(XXH_NAMESPACE, XXH128_isEqual)
    +
    512# define XXH128_cmp XXH_NAME2(XXH_NAMESPACE, XXH128_cmp)
    +
    513# define XXH128_canonicalFromHash XXH_NAME2(XXH_NAMESPACE, XXH128_canonicalFromHash)
    +
    514# define XXH128_hashFromCanonical XXH_NAME2(XXH_NAMESPACE, XXH128_hashFromCanonical)
    +
    515#endif
    +
    516
    +
    517
    +
    518/* *************************************
    +
    519* Compiler specifics
    +
    520***************************************/
    +
    521
    +
    522/* specific declaration modes for Windows */
    +
    523#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
    +
    524# if defined(_WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
    +
    525# ifdef XXH_EXPORT
    +
    526# define XXH_PUBLIC_API __declspec(dllexport)
    +
    527# elif XXH_IMPORT
    +
    528# define XXH_PUBLIC_API __declspec(dllimport)
    +
    529# endif
    +
    530# else
    +
    531# define XXH_PUBLIC_API /* do nothing */
    +
    532# endif
    +
    533#endif
    +
    534
    +
    535#if defined (__GNUC__)
    +
    536# define XXH_CONSTF __attribute__((__const__))
    +
    537# define XXH_PUREF __attribute__((__pure__))
    +
    538# define XXH_MALLOCF __attribute__((__malloc__))
    +
    539#else
    +
    540# define XXH_CONSTF /* disable */
    +
    541# define XXH_PUREF
    +
    542# define XXH_MALLOCF
    +
    543#endif
    +
    544
    +
    545/* *************************************
    +
    546* Version
    +
    547***************************************/
    +
    548#define XXH_VERSION_MAJOR 0
    +
    549#define XXH_VERSION_MINOR 8
    +
    550#define XXH_VERSION_RELEASE 3
    +
    552#define XXH_VERSION_NUMBER (XXH_VERSION_MAJOR *100*100 + XXH_VERSION_MINOR *100 + XXH_VERSION_RELEASE)
    +
    553
    +
    562XXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void);
    +
    563
    +
    564
    +
    565/* ****************************
    +
    566* Common basic types
    +
    567******************************/
    +
    568#include <stddef.h> /* size_t */
    +
    +
    572typedef enum {
    +
    573 XXH_OK = 0,
    + + +
    +
    576
    +
    577
    +
    578/*-**********************************************************************
    +
    579* 32-bit hash
    +
    580************************************************************************/
    +
    581#if defined(XXH_DOXYGEN) /* Don't show <stdint.h> include */
    +
    587typedef uint32_t XXH32_hash_t;
    +
    588
    +
    589#elif !defined (__VMS) \
    +
    590 && (defined (__cplusplus) \
    +
    591 || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
    +
    592# ifdef _AIX
    +
    593# include <inttypes.h>
    +
    594# else
    +
    595# include <stdint.h>
    +
    596# endif
    +
    597 typedef uint32_t XXH32_hash_t;
    +
    598
    +
    599#else
    +
    600# include <limits.h>
    +
    601# if UINT_MAX == 0xFFFFFFFFUL
    +
    602 typedef unsigned int XXH32_hash_t;
    +
    603# elif ULONG_MAX == 0xFFFFFFFFUL
    +
    604 typedef unsigned long XXH32_hash_t;
    +
    605# else
    +
    606# error "unsupported platform: need a 32-bit type"
    +
    607# endif
    +
    608#endif
    +
    609
    +
    626
    +
    643XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32 (const void* input, size_t length, XXH32_hash_t seed);
    +
    644
    +
    645#ifndef XXH_NO_STREAM
    + +
    654
    + + +
    687XXH_PUBLIC_API void XXH32_copyState(XXH32_state_t* dst_state, const XXH32_state_t* src_state);
    +
    688
    + +
    706
    +
    728XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* statePtr, const void* input, size_t length);
    +
    729
    +
    746XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_digest (const XXH32_state_t* statePtr);
    +
    747#endif /* !XXH_NO_STREAM */
    +
    748
    +
    749/******* Canonical representation *******/
    +
    750
    +
    +
    754typedef struct {
    +
    755 unsigned char digest[4];
    + +
    +
    757
    + +
    770
    + +
    784
    +
    785
    +
    787#ifdef __has_attribute
    +
    788# define XXH_HAS_ATTRIBUTE(x) __has_attribute(x)
    +
    789#else
    +
    790# define XXH_HAS_ATTRIBUTE(x) 0
    +
    791#endif
    +
    793
    +
    795/*
    +
    796 * C23 __STDC_VERSION__ number hasn't been specified yet. For now
    +
    797 * leave as `201711L` (C17 + 1).
    +
    798 * TODO: Update to correct value when its been specified.
    +
    799 */
    +
    800#define XXH_C23_VN 201711L
    +
    802
    +
    804/* C-language Attributes are added in C23. */
    +
    805#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN) && defined(__has_c_attribute)
    +
    806# define XXH_HAS_C_ATTRIBUTE(x) __has_c_attribute(x)
    +
    807#else
    +
    808# define XXH_HAS_C_ATTRIBUTE(x) 0
    +
    809#endif
    +
    811
    +
    813#if defined(__cplusplus) && defined(__has_cpp_attribute)
    +
    814# define XXH_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x)
    +
    815#else
    +
    816# define XXH_HAS_CPP_ATTRIBUTE(x) 0
    +
    817#endif
    +
    819
    +
    821/*
    +
    822 * Define XXH_FALLTHROUGH macro for annotating switch case with the 'fallthrough' attribute
    +
    823 * introduced in CPP17 and C23.
    +
    824 * CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough
    +
    825 * C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough
    +
    826 */
    +
    827#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough)
    +
    828# define XXH_FALLTHROUGH [[fallthrough]]
    +
    829#elif XXH_HAS_ATTRIBUTE(__fallthrough__)
    +
    830# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__))
    +
    831#else
    +
    832# define XXH_FALLTHROUGH /* fallthrough */
    +
    833#endif
    +
    835
    +
    837/*
    +
    838 * Define XXH_NOESCAPE for annotated pointers in public API.
    +
    839 * https://clang.llvm.org/docs/AttributeReference.html#noescape
    +
    840 * As of writing this, only supported by clang.
    +
    841 */
    +
    842#if XXH_HAS_ATTRIBUTE(noescape)
    +
    843# define XXH_NOESCAPE __attribute__((__noescape__))
    +
    844#else
    +
    845# define XXH_NOESCAPE
    +
    846#endif
    +
    848
    +
    849
    +
    855
    +
    856#ifndef XXH_NO_LONG_LONG
    +
    857/*-**********************************************************************
    +
    858* 64-bit hash
    +
    859************************************************************************/
    +
    860#if defined(XXH_DOXYGEN) /* don't include <stdint.h> */
    +
    866typedef uint64_t XXH64_hash_t;
    +
    867#elif !defined (__VMS) \
    +
    868 && (defined (__cplusplus) \
    +
    869 || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
    +
    870# ifdef _AIX
    +
    871# include <inttypes.h>
    +
    872# else
    +
    873# include <stdint.h>
    +
    874# endif
    +
    875 typedef uint64_t XXH64_hash_t;
    +
    876#else
    +
    877# include <limits.h>
    +
    878# if defined(__LP64__) && ULONG_MAX == 0xFFFFFFFFFFFFFFFFULL
    +
    879 /* LP64 ABI says uint64_t is unsigned long */
    +
    880 typedef unsigned long XXH64_hash_t;
    +
    881# else
    +
    882 /* the following type must have a width of 64-bit */
    +
    883 typedef unsigned long long XXH64_hash_t;
    +
    884# endif
    +
    885#endif
    +
    886
    +
    900
    +
    917XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed);
    +
    918
    +
    919/******* Streaming *******/
    +
    920#ifndef XXH_NO_STREAM
    +
    927typedef struct XXH64_state_s XXH64_state_t; /* incomplete type */
    +
    928
    + +
    940
    + +
    953
    +
    962XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dst_state, const XXH64_state_t* src_state);
    +
    963
    + +
    981
    +
    1003XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH_NOESCAPE XXH64_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
    +
    1004
    +
    1021XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_digest (XXH_NOESCAPE const XXH64_state_t* statePtr);
    +
    1022#endif /* !XXH_NO_STREAM */
    +
    1023/******* Canonical representation *******/
    +
    1024
    +
    1028typedef struct { unsigned char digest[sizeof(XXH64_hash_t)]; } XXH64_canonical_t;
    +
    1029
    + +
    1042
    +
    1055XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH64_hashFromCanonical(XXH_NOESCAPE const XXH64_canonical_t* src);
    +
    1056
    +
    1057#ifndef XXH_NO_XXH3
    +
    1058
    +
    1113
    +
    1120# define XXH_SCALAR 0
    +
    1121# define XXH_SSE2 1
    +
    1122# define XXH_AVX2 2
    +
    1123# define XXH_AVX512 3
    +
    1124# define XXH_NEON 4
    +
    1125# define XXH_VSX 5
    +
    1126# define XXH_SVE 6
    +
    1127# define XXH_LSX 7
    +
    1128# define XXH_LASX 8
    +
    1129
    +
    1130
    +
    1131/*-**********************************************************************
    +
    1132* XXH3 64-bit variant
    +
    1133************************************************************************/
    +
    1134
    +
    1157XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length);
    +
    1158
    +
    1183XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed);
    +
    1184
    +
    1192#define XXH3_SECRET_SIZE_MIN 136
    +
    1193
    +
    1226XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);
    +
    1227
    +
    1228
    +
    1229/******* Streaming *******/
    +
    1230#ifndef XXH_NO_STREAM
    +
    1231/*
    +
    1232 * Streaming requires state maintenance.
    +
    1233 * This operation costs memory and CPU.
    +
    1234 * As a consequence, streaming is slower than one-shot hashing.
    +
    1235 * For better performance, prefer one-shot functions whenever applicable.
    +
    1236 */
    +
    1237
    + + + +
    1247
    +
    1256XXH_PUBLIC_API void XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state);
    +
    1257
    + +
    1278
    + +
    1300
    +
    1325XXH_PUBLIC_API XXH_errorcode XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);
    +
    1326
    +
    1348XXH_PUBLIC_API XXH_errorcode XXH3_64bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
    +
    1349
    +
    1366XXH_PUBLIC_API XXH_PUREF XXH64_hash_t XXH3_64bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);
    +
    1367#endif /* !XXH_NO_STREAM */
    +
    1368
    +
    1369/* note : canonical representation of XXH3 is the same as XXH64
    +
    1370 * since they both produce XXH64_hash_t values */
    +
    1371
    +
    1372
    +
    1373/*-**********************************************************************
    +
    1374* XXH3 128-bit variant
    +
    1375************************************************************************/
    +
    1376
    + +
    1387
    +
    1406XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* data, size_t len);
    +
    1426XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSeed(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);
    +
    1454XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_withSecret(XXH_NOESCAPE const void* data, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize);
    +
    1455
    +
    1456/******* Streaming *******/
    +
    1457#ifndef XXH_NO_STREAM
    +
    1458/*
    +
    1459 * Streaming requires state maintenance.
    +
    1460 * This operation costs memory and CPU.
    +
    1461 * As a consequence, streaming is slower than one-shot hashing.
    +
    1462 * For better performance, prefer one-shot functions whenever applicable.
    +
    1463 *
    +
    1464 * XXH3_128bits uses the same XXH3_state_t as XXH3_64bits().
    +
    1465 * Use already declared XXH3_createState() and XXH3_freeState().
    +
    1466 *
    +
    1467 * All reset and streaming functions have same meaning as their 64-bit counterpart.
    +
    1468 */
    +
    1469
    + +
    1489
    + +
    1532XXH_PUBLIC_API XXH_errorcode XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize);
    +
    1533
    +
    1555XXH_PUBLIC_API XXH_errorcode XXH3_128bits_update (XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* input, size_t length);
    +
    1556
    +
    1572XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH3_128bits_digest (XXH_NOESCAPE const XXH3_state_t* statePtr);
    +
    1573#endif /* !XXH_NO_STREAM */
    +
    1574
    +
    1575/* Following helper functions make it possible to compare XXH128_hast_t values.
    +
    1576 * Since XXH128_hash_t is a structure, this capability is not offered by the language.
    +
    1577 * Note: For better performance, these functions can be inlined using XXH_INLINE_ALL */
    +
    1578
    + +
    1589
    +
    1602XXH_PUBLIC_API XXH_PUREF int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2);
    +
    1603
    +
    1604
    +
    1605/******* Canonical representation *******/
    +
    1606typedef struct { unsigned char digest[sizeof(XXH128_hash_t)]; } XXH128_canonical_t;
    +
    1607
    +
    1608
    + +
    1620
    + +
    1633
    +
    1634
    +
    1635#endif /* !XXH_NO_XXH3 */
    +
    1636#endif /* XXH_NO_LONG_LONG */
    +
    1637
    +
    1641#endif /* XXHASH_H_5627135585666179 */
    +
    1642
    +
    1643
    +
    1644
    +
    1645#if defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742)
    +
    1646#define XXHASH_H_STATIC_13879238742
    +
    1647/* ****************************************************************************
    +
    1648 * This section contains declarations which are not guaranteed to remain stable.
    +
    1649 * They may change in future versions, becoming incompatible with a different
    +
    1650 * version of the library.
    +
    1651 * These declarations should only be used with static linking.
    +
    1652 * Never use them in association with dynamic linking!
    +
    1653 ***************************************************************************** */
    +
    1654
    +
    1655/*
    +
    1656 * These definitions are only present to allow static allocation
    +
    1657 * of XXH states, on stack or in a struct, for example.
    +
    1658 * Never **ever** access their members directly.
    +
    1659 */
    +
    1660
    + +
    1681
    +
    1682
    +
    1683#ifndef XXH_NO_LONG_LONG /* defined when there is no 64-bit support */
    +
    1684
    + +
    1705
    +
    1706#ifndef XXH_NO_XXH3
    +
    1707
    +
    1708#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */
    +
    1709# define XXH_ALIGN(n) _Alignas(n)
    +
    1710#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */
    +
    1711/* In C++ alignas() is a keyword */
    +
    1712# define XXH_ALIGN(n) alignas(n)
    +
    1713#elif defined(__GNUC__)
    +
    1714# define XXH_ALIGN(n) __attribute__ ((aligned(n)))
    +
    1715#elif defined(_MSC_VER)
    +
    1716# define XXH_ALIGN(n) __declspec(align(n))
    +
    1717#else
    +
    1718# define XXH_ALIGN(n) /* disabled */
    +
    1719#endif
    +
    1720
    +
    1721/* Old GCC versions only accept the attribute after the type in structures. */
    +
    1722#if !(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) /* C11+ */ \
    +
    1723 && ! (defined(__cplusplus) && (__cplusplus >= 201103L)) /* >= C++11 */ \
    +
    1724 && defined(__GNUC__)
    +
    1725# define XXH_ALIGN_MEMBER(align, type) type XXH_ALIGN(align)
    +
    1726#else
    +
    1727# define XXH_ALIGN_MEMBER(align, type) XXH_ALIGN(align) type
    +
    1728#endif
    +
    1729
    +
    1738#define XXH3_INTERNALBUFFER_SIZE 256
    +
    1739
    +
    1749#define XXH3_SECRET_DEFAULT_SIZE 192
    +
    1750
    +
    + +
    1774 XXH_ALIGN_MEMBER(64, XXH64_hash_t acc[8]);
    +
    1776 XXH_ALIGN_MEMBER(64, unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]);
    +
    1778 XXH_ALIGN_MEMBER(64, unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]);
    + + + + + + + + +
    1796 const unsigned char* extSecret;
    +
    1799 /* note: there may be some padding at the end due to alignment on 64 bytes */
    +
    1800}; /* typedef'd to XXH3_state_t */
    +
    +
    1801
    +
    1802#undef XXH_ALIGN_MEMBER
    +
    1803
    +
    +
    1815#define XXH3_INITSTATE(XXH3_state_ptr) \
    +
    1816 do { \
    +
    1817 XXH3_state_t* tmp_xxh3_state_ptr = (XXH3_state_ptr); \
    +
    1818 tmp_xxh3_state_ptr->seed = 0; \
    +
    1819 tmp_xxh3_state_ptr->extSecret = NULL; \
    +
    1820 } while(0)
    +
    +
    1821
    +
    1822
    +
    1839XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, size_t len, XXH64_hash_t seed);
    +
    1840
    +
    1841
    +
    1842/* === Experimental API === */
    +
    1843/* Symbols defined below must be considered tied to a specific library version. */
    +
    1844
    +
    1903XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize);
    +
    1904
    +
    1943XXH_PUBLIC_API void XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed);
    +
    1944
    +
    1948#define XXH3_MIDSIZE_MAX 240
    +
    1949
    + +
    1985XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* data, size_t len,
    +
    1986 XXH_NOESCAPE const void* secret, size_t secretSize,
    +
    1987 XXH64_hash_t seed);
    +
    1988
    + +
    2004XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length,
    +
    2005 XXH_NOESCAPE const void* secret, size_t secretSize,
    +
    2006 XXH64_hash_t seed64);
    +
    2007
    +
    2008#ifndef XXH_NO_STREAM
    + + +
    2024 XXH_NOESCAPE const void* secret, size_t secretSize,
    +
    2025 XXH64_hash_t seed64);
    +
    2026
    + + +
    2050 XXH_NOESCAPE const void* secret, size_t secretSize,
    +
    2051 XXH64_hash_t seed64);
    +
    2052
    +
    2053#endif /* !XXH_NO_STREAM */
    +
    2054
    +
    2055#endif /* !XXH_NO_XXH3 */
    +
    2056#endif /* XXH_NO_LONG_LONG */
    +
    2057#if defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API)
    +
    2058# define XXH_IMPLEMENTATION
    +
    2059#endif
    +
    2060
    +
    2061#endif /* defined(XXH_STATIC_LINKING_ONLY) && !defined(XXHASH_H_STATIC_13879238742) */
    +
    2062
    +
    2063
    +
    2064/* ======================================================================== */
    +
    2065/* ======================================================================== */
    +
    2066/* ======================================================================== */
    +
    2067
    +
    2068
    +
    2069/*-**********************************************************************
    +
    2070 * xxHash implementation
    +
    2071 *-**********************************************************************
    +
    2072 * xxHash's implementation used to be hosted inside xxhash.c.
    +
    2073 *
    +
    2074 * However, inlining requires implementation to be visible to the compiler,
    +
    2075 * hence be included alongside the header.
    +
    2076 * Previously, implementation was hosted inside xxhash.c,
    +
    2077 * which was then #included when inlining was activated.
    +
    2078 * This construction created issues with a few build and install systems,
    +
    2079 * as it required xxhash.c to be stored in /include directory.
    +
    2080 *
    +
    2081 * xxHash implementation is now directly integrated within xxhash.h.
    +
    2082 * As a consequence, xxhash.c is no longer needed in /include.
    +
    2083 *
    +
    2084 * xxhash.c is still available and is still useful.
    +
    2085 * In a "normal" setup, when xxhash is not inlined,
    +
    2086 * xxhash.h only exposes the prototypes and public symbols,
    +
    2087 * while xxhash.c can be built into an object file xxhash.o
    +
    2088 * which can then be linked into the final binary.
    +
    2089 ************************************************************************/
    +
    2090
    +
    2091#if ( defined(XXH_INLINE_ALL) || defined(XXH_PRIVATE_API) \
    +
    2092 || defined(XXH_IMPLEMENTATION) ) && !defined(XXH_IMPLEM_13a8737387)
    +
    2093# define XXH_IMPLEM_13a8737387
    +
    2094
    +
    2095/* *************************************
    +
    2096* Tuning parameters
    +
    2097***************************************/
    +
    2098
    +
    2105#ifdef XXH_DOXYGEN
    +
    2111# define XXH_NO_LONG_LONG
    +
    2112# undef XXH_NO_LONG_LONG /* don't actually */
    +
    2163# define XXH_FORCE_MEMORY_ACCESS 0
    +
    2164
    +
    2191# define XXH_SIZE_OPT 0
    +
    2192
    +
    2221# define XXH_FORCE_ALIGN_CHECK 0
    +
    2222
    +
    2243# define XXH_NO_INLINE_HINTS 0
    +
    2244
    +
    2260# define XXH3_INLINE_SECRET 0
    +
    2261
    +
    2272# define XXH32_ENDJMP 0
    +
    2273
    +
    2281# define XXH_OLD_NAMES
    +
    2282# undef XXH_OLD_NAMES /* don't actually use, it is ugly. */
    +
    2283
    +
    2292# define XXH_NO_STREAM
    +
    2293# undef XXH_NO_STREAM /* don't actually */
    +
    2294#endif /* XXH_DOXYGEN */
    +
    2298
    +
    2299#ifndef XXH_FORCE_MEMORY_ACCESS /* can be defined externally, on command line for example */
    +
    2300 /* prefer __packed__ structures (method 1) for GCC
    +
    2301 * < ARMv7 with unaligned access (e.g. Raspbian armhf) still uses byte shifting, so we use memcpy
    +
    2302 * which for some reason does unaligned loads. */
    +
    2303# if defined(__GNUC__) && !(defined(__ARM_ARCH) && __ARM_ARCH < 7 && defined(__ARM_FEATURE_UNALIGNED))
    +
    2304# define XXH_FORCE_MEMORY_ACCESS 1
    +
    2305# endif
    +
    2306#endif
    +
    2307
    +
    2308#ifndef XXH_SIZE_OPT
    +
    2309 /* default to 1 for -Os or -Oz */
    +
    2310# if (defined(__GNUC__) || defined(__clang__)) && defined(__OPTIMIZE_SIZE__)
    +
    2311# define XXH_SIZE_OPT 1
    +
    2312# else
    +
    2313# define XXH_SIZE_OPT 0
    +
    2314# endif
    +
    2315#endif
    +
    2316
    +
    2317#ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */
    +
    2318 /* don't check on sizeopt, x86, aarch64, or arm when unaligned access is available */
    +
    2319# if XXH_SIZE_OPT >= 1 || \
    +
    2320 defined(__i386) || defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_FEATURE_UNALIGNED) \
    +
    2321 || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM) /* visual */
    +
    2322# define XXH_FORCE_ALIGN_CHECK 0
    +
    2323# else
    +
    2324# define XXH_FORCE_ALIGN_CHECK 1
    +
    2325# endif
    +
    2326#endif
    +
    2327
    +
    2328#ifndef XXH_NO_INLINE_HINTS
    +
    2329# if XXH_SIZE_OPT >= 1 || defined(__NO_INLINE__) /* -O0, -fno-inline */
    +
    2330# define XXH_NO_INLINE_HINTS 1
    +
    2331# else
    +
    2332# define XXH_NO_INLINE_HINTS 0
    +
    2333# endif
    +
    2334#endif
    +
    2335
    +
    2336#ifndef XXH3_INLINE_SECRET
    +
    2337# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \
    +
    2338 || !defined(XXH_INLINE_ALL)
    +
    2339# define XXH3_INLINE_SECRET 0
    +
    2340# else
    +
    2341# define XXH3_INLINE_SECRET 1
    +
    2342# endif
    +
    2343#endif
    +
    2344
    +
    2345#ifndef XXH32_ENDJMP
    +
    2346/* generally preferable for performance */
    +
    2347# define XXH32_ENDJMP 0
    +
    2348#endif
    +
    2349
    +
    2354
    +
    2355
    +
    2356/* *************************************
    +
    2357* Includes & Memory related functions
    +
    2358***************************************/
    +
    2359#if defined(XXH_NO_STREAM)
    +
    2360/* nothing */
    +
    2361#elif defined(XXH_NO_STDLIB)
    +
    2362
    +
    2363/* When requesting to disable any mention of stdlib,
    +
    2364 * the library loses the ability to invoked malloc / free.
    +
    2365 * In practice, it means that functions like `XXH*_createState()`
    +
    2366 * will always fail, and return NULL.
    +
    2367 * This flag is useful in situations where
    +
    2368 * xxhash.h is integrated into some kernel, embedded or limited environment
    +
    2369 * without access to dynamic allocation.
    +
    2370 */
    +
    2371
    +
    2372static XXH_CONSTF void* XXH_malloc(size_t s) { (void)s; return NULL; }
    +
    2373static void XXH_free(void* p) { (void)p; }
    +
    2374
    +
    2375#else
    +
    2376
    +
    2377/*
    +
    2378 * Modify the local functions below should you wish to use
    +
    2379 * different memory routines for malloc() and free()
    +
    2380 */
    +
    2381#include <stdlib.h>
    +
    2382
    +
    2387static XXH_MALLOCF void* XXH_malloc(size_t s) { return malloc(s); }
    +
    2388
    +
    2393static void XXH_free(void* p) { free(p); }
    +
    2394
    +
    2395#endif /* XXH_NO_STDLIB */
    +
    2396
    +
    2397#include <string.h>
    +
    2398
    +
    2403static void* XXH_memcpy(void* dest, const void* src, size_t size)
    +
    2404{
    +
    2405 return memcpy(dest,src,size);
    +
    2406}
    +
    2407
    +
    2408#include <limits.h> /* ULLONG_MAX */
    +
    2409
    +
    2410
    +
    2411/* *************************************
    +
    2412* Compiler Specific Options
    +
    2413***************************************/
    +
    2414#ifdef _MSC_VER /* Visual Studio warning fix */
    +
    2415# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
    +
    2416#endif
    +
    2417
    +
    2418#if XXH_NO_INLINE_HINTS /* disable inlining hints */
    +
    2419# if defined(__GNUC__) || defined(__clang__)
    +
    2420# define XXH_FORCE_INLINE static __attribute__((__unused__))
    +
    2421# else
    +
    2422# define XXH_FORCE_INLINE static
    +
    2423# endif
    +
    2424# define XXH_NO_INLINE static
    +
    2425/* enable inlining hints */
    +
    2426#elif defined(__GNUC__) || defined(__clang__)
    +
    2427# define XXH_FORCE_INLINE static __inline__ __attribute__((__always_inline__, __unused__))
    +
    2428# define XXH_NO_INLINE static __attribute__((__noinline__))
    +
    2429#elif defined(_MSC_VER) /* Visual Studio */
    +
    2430# define XXH_FORCE_INLINE static __forceinline
    +
    2431# define XXH_NO_INLINE static __declspec(noinline)
    +
    2432#elif defined (__cplusplus) \
    +
    2433 || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) /* C99 */
    +
    2434# define XXH_FORCE_INLINE static inline
    +
    2435# define XXH_NO_INLINE static
    +
    2436#else
    +
    2437# define XXH_FORCE_INLINE static
    +
    2438# define XXH_NO_INLINE static
    +
    2439#endif
    +
    2440
    +
    2441#if defined(XXH_INLINE_ALL)
    +
    2442# define XXH_STATIC XXH_FORCE_INLINE
    +
    2443#else
    +
    2444# define XXH_STATIC static
    +
    2445#endif
    +
    2446
    +
    2447#if XXH3_INLINE_SECRET
    +
    2448# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE
    +
    2449#else
    +
    2450# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE
    +
    2451#endif
    +
    2452
    +
    2453#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */
    +
    2454# define XXH_RESTRICT /* disable */
    +
    2455#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
    +
    2456# define XXH_RESTRICT restrict
    +
    2457#elif (defined (__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) \
    +
    2458 || (defined (__clang__)) \
    +
    2459 || (defined (_MSC_VER) && (_MSC_VER >= 1400)) \
    +
    2460 || (defined (__INTEL_COMPILER) && (__INTEL_COMPILER >= 1300))
    +
    2461/*
    +
    2462 * There are a LOT more compilers that recognize __restrict but this
    +
    2463 * covers the major ones.
    +
    2464 */
    +
    2465# define XXH_RESTRICT __restrict
    +
    2466#else
    +
    2467# define XXH_RESTRICT /* disable */
    +
    2468#endif
    +
    2469
    +
    2470/* *************************************
    +
    2471* Debug
    +
    2472***************************************/
    +
    2481#ifndef XXH_DEBUGLEVEL
    +
    2482# ifdef DEBUGLEVEL /* backwards compat */
    +
    2483# define XXH_DEBUGLEVEL DEBUGLEVEL
    +
    2484# else
    +
    2485# define XXH_DEBUGLEVEL 0
    +
    2486# endif
    +
    2487#endif
    +
    2488
    +
    2489#if (XXH_DEBUGLEVEL>=1)
    +
    2490# include <assert.h> /* note: can still be disabled with NDEBUG */
    +
    2491# define XXH_ASSERT(c) assert(c)
    +
    2492#else
    +
    2493# if defined(__INTEL_COMPILER)
    +
    2494# define XXH_ASSERT(c) XXH_ASSUME((unsigned char) (c))
    +
    2495# else
    +
    2496# define XXH_ASSERT(c) XXH_ASSUME(c)
    +
    2497# endif
    +
    2498#endif
    +
    2499
    +
    2500/* note: use after variable declarations */
    +
    2501#ifndef XXH_STATIC_ASSERT
    +
    2502# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
    +
    2503# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { _Static_assert((c),m); } while(0)
    +
    2504# elif defined(__cplusplus) && (__cplusplus >= 201103L) /* C++11 */
    +
    2505# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m); } while(0)
    +
    2506# else
    +
    2507# define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char x[(c) ? 1 : -1]; }; } while(0)
    +
    2508# endif
    +
    2509# define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)
    +
    2510#endif
    +
    2511
    +
    2528#if defined(__GNUC__) || defined(__clang__)
    +
    2529# define XXH_COMPILER_GUARD(var) __asm__("" : "+r" (var))
    +
    2530#else
    +
    2531# define XXH_COMPILER_GUARD(var) ((void)0)
    +
    2532#endif
    +
    2533
    +
    2534/* Specifically for NEON vectors which use the "w" constraint, on
    +
    2535 * Clang. */
    +
    2536#if defined(__clang__) && defined(__ARM_ARCH) && !defined(__wasm__)
    +
    2537# define XXH_COMPILER_GUARD_CLANG_NEON(var) __asm__("" : "+w" (var))
    +
    2538#else
    +
    2539# define XXH_COMPILER_GUARD_CLANG_NEON(var) ((void)0)
    +
    2540#endif
    +
    2541
    +
    2542/* *************************************
    +
    2543* Basic Types
    +
    2544***************************************/
    +
    2545#if !defined (__VMS) \
    +
    2546 && (defined (__cplusplus) \
    +
    2547 || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
    +
    2548# ifdef _AIX
    +
    2549# include <inttypes.h>
    +
    2550# else
    +
    2551# include <stdint.h>
    +
    2552# endif
    +
    2553 typedef uint8_t xxh_u8;
    +
    2554#else
    +
    2555 typedef unsigned char xxh_u8;
    +
    2556#endif
    +
    2557typedef XXH32_hash_t xxh_u32;
    +
    2558
    +
    2559#ifdef XXH_OLD_NAMES
    +
    2560# warning "XXH_OLD_NAMES is planned to be removed starting v0.9. If the program depends on it, consider moving away from it by employing newer type names directly"
    +
    2561# define BYTE xxh_u8
    +
    2562# define U8 xxh_u8
    +
    2563# define U32 xxh_u32
    +
    2564#endif
    +
    2565
    +
    2566/* *** Memory access *** */
    +
    2567
    +
    2578
    +
    2589
    +
    2600
    +
    2617
    +
    2618#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))
    +
    2619/*
    +
    2620 * Manual byteshift. Best for old compilers which don't inline memcpy.
    +
    2621 * We actually directly use XXH_readLE32 and XXH_readBE32.
    +
    2622 */
    +
    2623#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
    +
    2624
    +
    2625/*
    +
    2626 * Force direct memory access. Only works on CPU which support unaligned memory
    +
    2627 * access in hardware.
    +
    2628 */
    +
    2629static xxh_u32 XXH_read32(const void* memPtr) { return *(const xxh_u32*) memPtr; }
    +
    2630
    +
    2631#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
    +
    2632
    +
    2633/*
    +
    2634 * __attribute__((aligned(1))) is supported by gcc and clang. Originally the
    +
    2635 * documentation claimed that it only increased the alignment, but actually it
    +
    2636 * can decrease it on gcc, clang, and icc:
    +
    2637 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,
    +
    2638 * https://gcc.godbolt.org/z/xYez1j67Y.
    +
    2639 */
    +
    2640#ifdef XXH_OLD_NAMES
    +
    2641typedef union { xxh_u32 u32; } __attribute__((__packed__)) unalign;
    +
    2642#endif
    +
    2643static xxh_u32 XXH_read32(const void* ptr)
    +
    2644{
    +
    2645 typedef __attribute__((__aligned__(1))) xxh_u32 xxh_unalign32;
    +
    2646 return *((const xxh_unalign32*)ptr);
    +
    2647}
    +
    2648
    +
    2649#else
    +
    2650
    +
    2651/*
    +
    2652 * Portable and safe solution. Generally efficient.
    +
    2653 * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
    +
    2654 */
    +
    2655static xxh_u32 XXH_read32(const void* memPtr)
    +
    2656{
    +
    2657 xxh_u32 val;
    +
    2658 XXH_memcpy(&val, memPtr, sizeof(val));
    +
    2659 return val;
    +
    2660}
    +
    2661
    +
    2662#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */
    +
    2663
    +
    2664
    +
    2665/* *** Endianness *** */
    +
    2666
    +
    2683#ifndef XXH_CPU_LITTLE_ENDIAN
    +
    2684/*
    +
    2685 * Try to detect endianness automatically, to avoid the nonstandard behavior
    +
    2686 * in `XXH_isLittleEndian()`
    +
    2687 */
    +
    2688# if defined(_WIN32) /* Windows is always little endian */ \
    +
    2689 || defined(__LITTLE_ENDIAN__) \
    +
    2690 || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
    +
    2691# define XXH_CPU_LITTLE_ENDIAN 1
    +
    2692# elif defined(__BIG_ENDIAN__) \
    +
    2693 || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
    +
    2694# define XXH_CPU_LITTLE_ENDIAN 0
    +
    2695# else
    +
    2702static int XXH_isLittleEndian(void)
    +
    2703{
    +
    2704 /*
    +
    2705 * Portable and well-defined behavior.
    +
    2706 * Don't use static: it is detrimental to performance.
    +
    2707 */
    +
    2708 const union { xxh_u32 u; xxh_u8 c[4]; } one = { 1 };
    +
    2709 return one.c[0];
    +
    2710}
    +
    2711# define XXH_CPU_LITTLE_ENDIAN XXH_isLittleEndian()
    +
    2712# endif
    +
    2713#endif
    +
    2714
    +
    2715
    +
    2716
    +
    2717
    +
    2718/* ****************************************
    +
    2719* Compiler-specific Functions and Macros
    +
    2720******************************************/
    +
    2721#define XXH_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
    +
    2722
    +
    2723#ifdef __has_builtin
    +
    2724# define XXH_HAS_BUILTIN(x) __has_builtin(x)
    +
    2725#else
    +
    2726# define XXH_HAS_BUILTIN(x) 0
    +
    2727#endif
    +
    2728
    +
    2729
    +
    2730
    +
    2731/*
    +
    2732 * C23 and future versions have standard "unreachable()".
    +
    2733 * Once it has been implemented reliably we can add it as an
    +
    2734 * additional case:
    +
    2735 *
    +
    2736 * ```
    +
    2737 * #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= XXH_C23_VN)
    +
    2738 * # include <stddef.h>
    +
    2739 * # ifdef unreachable
    +
    2740 * # define XXH_UNREACHABLE() unreachable()
    +
    2741 * # endif
    +
    2742 * #endif
    +
    2743 * ```
    +
    2744 *
    +
    2745 * Note C++23 also has std::unreachable() which can be detected
    +
    2746 * as follows:
    +
    2747 * ```
    +
    2748 * #if defined(__cpp_lib_unreachable) && (__cpp_lib_unreachable >= 202202L)
    +
    2749 * # include <utility>
    +
    2750 * # define XXH_UNREACHABLE() std::unreachable()
    +
    2751 * #endif
    +
    2752 * ```
    +
    2753 * NB: `__cpp_lib_unreachable` is defined in the `<version>` header.
    +
    2754 * We don't use that as including `<utility>` in `extern "C"` blocks
    +
    2755 * doesn't work on GCC12
    +
    2756 */
    +
    2757
    +
    2758#if XXH_HAS_BUILTIN(__builtin_unreachable)
    +
    2759# define XXH_UNREACHABLE() __builtin_unreachable()
    +
    2760
    +
    2761#elif defined(_MSC_VER)
    +
    2762# define XXH_UNREACHABLE() __assume(0)
    +
    2763
    +
    2764#else
    +
    2765# define XXH_UNREACHABLE()
    +
    2766#endif
    +
    2767
    +
    2768#if XXH_HAS_BUILTIN(__builtin_assume)
    +
    2769# define XXH_ASSUME(c) __builtin_assume(c)
    +
    2770#else
    +
    2771# define XXH_ASSUME(c) if (!(c)) { XXH_UNREACHABLE(); }
    +
    2772#endif
    +
    2773
    +
    2787#if !defined(NO_CLANG_BUILTIN) && XXH_HAS_BUILTIN(__builtin_rotateleft32) \
    +
    2788 && XXH_HAS_BUILTIN(__builtin_rotateleft64)
    +
    2789# define XXH_rotl32 __builtin_rotateleft32
    +
    2790# define XXH_rotl64 __builtin_rotateleft64
    +
    2791#elif XXH_HAS_BUILTIN(__builtin_stdc_rotate_left)
    +
    2792# define XXH_rotl32 __builtin_stdc_rotate_left
    +
    2793# define XXH_rotl64 __builtin_stdc_rotate_left
    +
    2794/* Note: although _rotl exists for minGW (GCC under windows), performance seems poor */
    +
    2795#elif defined(_MSC_VER)
    +
    2796# define XXH_rotl32(x,r) _rotl(x,r)
    +
    2797# define XXH_rotl64(x,r) _rotl64(x,r)
    +
    2798#else
    +
    2799# define XXH_rotl32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
    +
    2800# define XXH_rotl64(x,r) (((x) << (r)) | ((x) >> (64 - (r))))
    +
    2801#endif
    +
    2802
    +
    2811#if defined(_MSC_VER) /* Visual Studio */
    +
    2812# define XXH_swap32 _byteswap_ulong
    +
    2813#elif XXH_GCC_VERSION >= 403
    +
    2814# define XXH_swap32 __builtin_bswap32
    +
    2815#else
    +
    2816static xxh_u32 XXH_swap32 (xxh_u32 x)
    +
    2817{
    +
    2818 return ((x << 24) & 0xff000000 ) |
    +
    2819 ((x << 8) & 0x00ff0000 ) |
    +
    2820 ((x >> 8) & 0x0000ff00 ) |
    +
    2821 ((x >> 24) & 0x000000ff );
    +
    2822}
    +
    2823#endif
    +
    2824
    +
    2825
    +
    2826/* ***************************
    +
    2827* Memory reads
    +
    2828*****************************/
    +
    2829
    +
    +
    2834typedef enum {
    + + + +
    +
    2838
    +
    2839/*
    +
    2840 * XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load.
    +
    2841 *
    +
    2842 * This is ideal for older compilers which don't inline memcpy.
    +
    2843 */
    +
    2844#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))
    +
    2845
    +
    2846XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* memPtr)
    +
    2847{
    +
    2848 const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;
    +
    2849 return bytePtr[0]
    +
    2850 | ((xxh_u32)bytePtr[1] << 8)
    +
    2851 | ((xxh_u32)bytePtr[2] << 16)
    +
    2852 | ((xxh_u32)bytePtr[3] << 24);
    +
    2853}
    +
    2854
    +
    2855XXH_FORCE_INLINE xxh_u32 XXH_readBE32(const void* memPtr)
    +
    2856{
    +
    2857 const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;
    +
    2858 return bytePtr[3]
    +
    2859 | ((xxh_u32)bytePtr[2] << 8)
    +
    2860 | ((xxh_u32)bytePtr[1] << 16)
    +
    2861 | ((xxh_u32)bytePtr[0] << 24);
    +
    2862}
    +
    2863
    +
    2864#else
    +
    2865XXH_FORCE_INLINE xxh_u32 XXH_readLE32(const void* ptr)
    +
    2866{
    +
    2867 return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
    +
    2868}
    +
    2869
    +
    2870static xxh_u32 XXH_readBE32(const void* ptr)
    +
    2871{
    +
    2872 return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr);
    +
    2873}
    +
    2874#endif
    +
    2875
    +
    2876XXH_FORCE_INLINE xxh_u32
    +
    2877XXH_readLE32_align(const void* ptr, XXH_alignment align)
    +
    2878{
    +
    2879 if (align==XXH_unaligned) {
    +
    2880 return XXH_readLE32(ptr);
    +
    2881 } else {
    +
    2882 return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr);
    +
    2883 }
    +
    2884}
    +
    2885
    +
    2886
    +
    2887/* *************************************
    +
    2888* Misc
    +
    2889***************************************/
    + +
    2892
    +
    2893
    +
    2894/* *******************************************************************
    +
    2895* 32-bit hash functions
    +
    2896*********************************************************************/
    +
    2905 /* #define instead of static const, to be used as initializers */
    +
    2906#define XXH_PRIME32_1 0x9E3779B1U
    +
    2907#define XXH_PRIME32_2 0x85EBCA77U
    +
    2908#define XXH_PRIME32_3 0xC2B2AE3DU
    +
    2909#define XXH_PRIME32_4 0x27D4EB2FU
    +
    2910#define XXH_PRIME32_5 0x165667B1U
    +
    2911
    +
    2912#ifdef XXH_OLD_NAMES
    +
    2913# define PRIME32_1 XXH_PRIME32_1
    +
    2914# define PRIME32_2 XXH_PRIME32_2
    +
    2915# define PRIME32_3 XXH_PRIME32_3
    +
    2916# define PRIME32_4 XXH_PRIME32_4
    +
    2917# define PRIME32_5 XXH_PRIME32_5
    +
    2918#endif
    +
    2919
    +
    2931static xxh_u32 XXH32_round(xxh_u32 acc, xxh_u32 input)
    +
    2932{
    +
    2933 acc += input * XXH_PRIME32_2;
    +
    2934 acc = XXH_rotl32(acc, 13);
    +
    2935 acc *= XXH_PRIME32_1;
    +
    2936#if (defined(__SSE4_1__) || defined(__aarch64__) || defined(__wasm_simd128__)) && !defined(XXH_ENABLE_AUTOVECTORIZE)
    +
    2937 /*
    +
    2938 * UGLY HACK:
    +
    2939 * A compiler fence is used to prevent GCC and Clang from
    +
    2940 * autovectorizing the XXH32 loop (pragmas and attributes don't work for some
    +
    2941 * reason) without globally disabling SSE4.1.
    +
    2942 *
    +
    2943 * The reason we want to avoid vectorization is because despite working on
    +
    2944 * 4 integers at a time, there are multiple factors slowing XXH32 down on
    +
    2945 * SSE4:
    +
    2946 * - There's a ridiculous amount of lag from pmulld (10 cycles of latency on
    +
    2947 * newer chips!) making it slightly slower to multiply four integers at
    +
    2948 * once compared to four integers independently. Even when pmulld was
    +
    2949 * fastest, Sandy/Ivy Bridge, it is still not worth it to go into SSE
    +
    2950 * just to multiply unless doing a long operation.
    +
    2951 *
    +
    2952 * - Four instructions are required to rotate,
    +
    2953 * movqda tmp, v // not required with VEX encoding
    +
    2954 * pslld tmp, 13 // tmp <<= 13
    +
    2955 * psrld v, 19 // x >>= 19
    +
    2956 * por v, tmp // x |= tmp
    +
    2957 * compared to one for scalar:
    +
    2958 * roll v, 13 // reliably fast across the board
    +
    2959 * shldl v, v, 13 // Sandy Bridge and later prefer this for some reason
    +
    2960 *
    +
    2961 * - Instruction level parallelism is actually more beneficial here because
    +
    2962 * the SIMD actually serializes this operation: While v1 is rotating, v2
    +
    2963 * can load data, while v3 can multiply. SSE forces them to operate
    +
    2964 * together.
    +
    2965 *
    +
    2966 * This is also enabled on AArch64, as Clang is *very aggressive* in vectorizing
    +
    2967 * the loop. NEON is only faster on the A53, and with the newer cores, it is less
    +
    2968 * than half the speed.
    +
    2969 *
    +
    2970 * Additionally, this is used on WASM SIMD128 because it JITs to the same
    +
    2971 * SIMD instructions and has the same issue.
    +
    2972 */
    +
    2973 XXH_COMPILER_GUARD(acc);
    +
    2974#endif
    +
    2975 return acc;
    +
    2976}
    +
    2977
    +
    2988static xxh_u32 XXH32_avalanche(xxh_u32 hash)
    +
    2989{
    +
    2990 hash ^= hash >> 15;
    +
    2991 hash *= XXH_PRIME32_2;
    +
    2992 hash ^= hash >> 13;
    +
    2993 hash *= XXH_PRIME32_3;
    +
    2994 hash ^= hash >> 16;
    +
    2995 return hash;
    +
    2996}
    +
    2997
    +
    2998#define XXH_get32bits(p) XXH_readLE32_align(p, align)
    +
    2999
    +
    3004XXH_FORCE_INLINE void
    +
    3005XXH32_initAccs(xxh_u32 *acc, xxh_u32 seed)
    +
    3006{
    +
    3007 XXH_ASSERT(acc != NULL);
    +
    3008 acc[0] = seed + XXH_PRIME32_1 + XXH_PRIME32_2;
    +
    3009 acc[1] = seed + XXH_PRIME32_2;
    +
    3010 acc[2] = seed + 0;
    +
    3011 acc[3] = seed - XXH_PRIME32_1;
    +
    3012}
    +
    3013
    +
    3020XXH_FORCE_INLINE const xxh_u8 *
    +
    3021XXH32_consumeLong(
    +
    3022 xxh_u32 *XXH_RESTRICT acc,
    +
    3023 xxh_u8 const *XXH_RESTRICT input,
    +
    3024 size_t len,
    +
    3025 XXH_alignment align
    +
    3026)
    +
    3027{
    +
    3028 const xxh_u8* const bEnd = input + len;
    +
    3029 const xxh_u8* const limit = bEnd - 15;
    +
    3030 XXH_ASSERT(acc != NULL);
    +
    3031 XXH_ASSERT(input != NULL);
    +
    3032 XXH_ASSERT(len >= 16);
    +
    3033 do {
    +
    3034 acc[0] = XXH32_round(acc[0], XXH_get32bits(input)); input += 4;
    +
    3035 acc[1] = XXH32_round(acc[1], XXH_get32bits(input)); input += 4;
    +
    3036 acc[2] = XXH32_round(acc[2], XXH_get32bits(input)); input += 4;
    +
    3037 acc[3] = XXH32_round(acc[3], XXH_get32bits(input)); input += 4;
    +
    3038 } while (input < limit);
    +
    3039
    +
    3040 return input;
    +
    3041}
    +
    3042
    +
    3047XXH_FORCE_INLINE XXH_PUREF xxh_u32
    +
    3048XXH32_mergeAccs(const xxh_u32 *acc)
    +
    3049{
    +
    3050 XXH_ASSERT(acc != NULL);
    +
    3051 return XXH_rotl32(acc[0], 1) + XXH_rotl32(acc[1], 7)
    +
    3052 + XXH_rotl32(acc[2], 12) + XXH_rotl32(acc[3], 18);
    +
    3053}
    +
    3054
    +
    3070static XXH_PUREF xxh_u32
    +
    3071XXH32_finalize(xxh_u32 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
    +
    3072{
    +
    3073#define XXH_PROCESS1 do { \
    +
    3074 hash += (*ptr++) * XXH_PRIME32_5; \
    +
    3075 hash = XXH_rotl32(hash, 11) * XXH_PRIME32_1; \
    +
    3076} while (0)
    +
    3077
    +
    3078#define XXH_PROCESS4 do { \
    +
    3079 hash += XXH_get32bits(ptr) * XXH_PRIME32_3; \
    +
    3080 ptr += 4; \
    +
    3081 hash = XXH_rotl32(hash, 17) * XXH_PRIME32_4; \
    +
    3082} while (0)
    +
    3083
    +
    3084 if (ptr==NULL) XXH_ASSERT(len == 0);
    +
    3085
    +
    3086 /* Compact rerolled version; generally faster */
    +
    3087 if (!XXH32_ENDJMP) {
    +
    3088 len &= 15;
    +
    3089 while (len >= 4) {
    +
    3090 XXH_PROCESS4;
    +
    3091 len -= 4;
    +
    3092 }
    +
    3093 while (len > 0) {
    +
    3094 XXH_PROCESS1;
    +
    3095 --len;
    +
    3096 }
    +
    3097 return XXH32_avalanche(hash);
    +
    3098 } else {
    +
    3099 switch(len&15) /* or switch(bEnd - p) */ {
    +
    3100 case 12: XXH_PROCESS4;
    +
    3101 XXH_FALLTHROUGH; /* fallthrough */
    +
    3102 case 8: XXH_PROCESS4;
    +
    3103 XXH_FALLTHROUGH; /* fallthrough */
    +
    3104 case 4: XXH_PROCESS4;
    +
    3105 return XXH32_avalanche(hash);
    +
    3106
    +
    3107 case 13: XXH_PROCESS4;
    +
    3108 XXH_FALLTHROUGH; /* fallthrough */
    +
    3109 case 9: XXH_PROCESS4;
    +
    3110 XXH_FALLTHROUGH; /* fallthrough */
    +
    3111 case 5: XXH_PROCESS4;
    +
    3112 XXH_PROCESS1;
    +
    3113 return XXH32_avalanche(hash);
    +
    3114
    +
    3115 case 14: XXH_PROCESS4;
    +
    3116 XXH_FALLTHROUGH; /* fallthrough */
    +
    3117 case 10: XXH_PROCESS4;
    +
    3118 XXH_FALLTHROUGH; /* fallthrough */
    +
    3119 case 6: XXH_PROCESS4;
    +
    3120 XXH_PROCESS1;
    +
    3121 XXH_PROCESS1;
    +
    3122 return XXH32_avalanche(hash);
    +
    3123
    +
    3124 case 15: XXH_PROCESS4;
    +
    3125 XXH_FALLTHROUGH; /* fallthrough */
    +
    3126 case 11: XXH_PROCESS4;
    +
    3127 XXH_FALLTHROUGH; /* fallthrough */
    +
    3128 case 7: XXH_PROCESS4;
    +
    3129 XXH_FALLTHROUGH; /* fallthrough */
    +
    3130 case 3: XXH_PROCESS1;
    +
    3131 XXH_FALLTHROUGH; /* fallthrough */
    +
    3132 case 2: XXH_PROCESS1;
    +
    3133 XXH_FALLTHROUGH; /* fallthrough */
    +
    3134 case 1: XXH_PROCESS1;
    +
    3135 XXH_FALLTHROUGH; /* fallthrough */
    +
    3136 case 0: return XXH32_avalanche(hash);
    +
    3137 }
    +
    3138 XXH_ASSERT(0);
    +
    3139 return hash; /* reaching this point is deemed impossible */
    +
    3140 }
    +
    3141}
    +
    3142
    +
    3143#ifdef XXH_OLD_NAMES
    +
    3144# define PROCESS1 XXH_PROCESS1
    +
    3145# define PROCESS4 XXH_PROCESS4
    +
    3146#else
    +
    3147# undef XXH_PROCESS1
    +
    3148# undef XXH_PROCESS4
    +
    3149#endif
    +
    3150
    +
    3159XXH_FORCE_INLINE XXH_PUREF xxh_u32
    +
    3160XXH32_endian_align(const xxh_u8* input, size_t len, xxh_u32 seed, XXH_alignment align)
    +
    3161{
    +
    3162 xxh_u32 h32;
    +
    3163
    +
    3164 if (input==NULL) XXH_ASSERT(len == 0);
    +
    3165
    +
    3166 if (len>=16) {
    +
    3167 xxh_u32 acc[4];
    +
    3168 XXH32_initAccs(acc, seed);
    +
    3169
    +
    3170 input = XXH32_consumeLong(acc, input, len, align);
    +
    3171
    +
    3172 h32 = XXH32_mergeAccs(acc);
    +
    3173 } else {
    +
    3174 h32 = seed + XXH_PRIME32_5;
    +
    3175 }
    +
    3176
    +
    3177 h32 += (xxh_u32)len;
    +
    3178
    +
    3179 return XXH32_finalize(h32, input, len&15, align);
    +
    3180}
    +
    3181
    +
    +
    3183XXH_PUBLIC_API XXH32_hash_t XXH32 (const void* input, size_t len, XXH32_hash_t seed)
    +
    3184{
    +
    3185#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2
    +
    3186 /* Simple version, good for code maintenance, but unfortunately slow for small inputs */
    +
    3187 XXH32_state_t state;
    +
    3188 XXH32_reset(&state, seed);
    +
    3189 XXH32_update(&state, (const xxh_u8*)input, len);
    +
    3190 return XXH32_digest(&state);
    +
    3191#else
    + +
    3193 if ((((size_t)input) & 3) == 0) { /* Input is 4-bytes aligned, leverage the speed benefit */
    +
    3194 return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);
    +
    3195 } }
    +
    3196
    +
    3197 return XXH32_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);
    +
    3198#endif
    +
    3199}
    +
    +
    3200
    +
    3201
    +
    3202
    +
    3203/******* Hash streaming *******/
    +
    3204#ifndef XXH_NO_STREAM
    +
    + +
    3207{
    +
    3208 return (XXH32_state_t*)XXH_malloc(sizeof(XXH32_state_t));
    +
    3209}
    +
    +
    3210
    +
    + +
    3212{
    +
    3213 XXH_free(statePtr);
    +
    3214 return XXH_OK;
    +
    3215}
    +
    +
    3216
    +
    + +
    3219{
    +
    3220 XXH_memcpy(dstState, srcState, sizeof(*dstState));
    +
    3221}
    +
    +
    3222
    +
    + +
    3225{
    +
    3226 XXH_ASSERT(statePtr != NULL);
    +
    3227 memset(statePtr, 0, sizeof(*statePtr));
    +
    3228 XXH32_initAccs(statePtr->acc, seed);
    +
    3229 return XXH_OK;
    +
    3230}
    +
    +
    3231
    +
    3232
    + +
    +
    3235XXH32_update(XXH32_state_t* state, const void* input, size_t len)
    +
    3236{
    +
    3237 if (input==NULL) {
    +
    3238 XXH_ASSERT(len == 0);
    +
    3239 return XXH_OK;
    +
    3240 }
    +
    3241
    +
    3242 state->total_len_32 += (XXH32_hash_t)len;
    +
    3243 state->large_len |= (XXH32_hash_t)((len>=16) | (state->total_len_32>=16));
    +
    3244
    +
    3245 XXH_ASSERT(state->bufferedSize < sizeof(state->buffer));
    +
    3246 if (len < sizeof(state->buffer) - state->bufferedSize) { /* fill in tmp buffer */
    +
    3247 XXH_memcpy(state->buffer + state->bufferedSize, input, len);
    +
    3248 state->bufferedSize += (XXH32_hash_t)len;
    +
    3249 return XXH_OK;
    +
    3250 }
    +
    3251
    +
    3252 { const xxh_u8* xinput = (const xxh_u8*)input;
    +
    3253 const xxh_u8* const bEnd = xinput + len;
    +
    3254
    +
    3255 if (state->bufferedSize) { /* non-empty buffer: complete first */
    +
    3256 XXH_memcpy(state->buffer + state->bufferedSize, xinput, sizeof(state->buffer) - state->bufferedSize);
    +
    3257 xinput += sizeof(state->buffer) - state->bufferedSize;
    +
    3258 /* then process one round */
    +
    3259 (void)XXH32_consumeLong(state->acc, state->buffer, sizeof(state->buffer), XXH_aligned);
    +
    3260 state->bufferedSize = 0;
    +
    3261 }
    +
    3262
    +
    3263 XXH_ASSERT(xinput <= bEnd);
    +
    3264 if ((size_t)(bEnd - xinput) >= sizeof(state->buffer)) {
    +
    3265 /* Process the remaining data */
    +
    3266 xinput = XXH32_consumeLong(state->acc, xinput, (size_t)(bEnd - xinput), XXH_unaligned);
    +
    3267 }
    +
    3268
    +
    3269 if (xinput < bEnd) {
    +
    3270 /* Copy the leftover to the tmp buffer */
    +
    3271 XXH_memcpy(state->buffer, xinput, (size_t)(bEnd-xinput));
    +
    3272 state->bufferedSize = (unsigned)(bEnd-xinput);
    +
    3273 }
    +
    3274 }
    +
    3275
    +
    3276 return XXH_OK;
    +
    3277}
    +
    +
    3278
    +
    3279
    +
    + +
    3282{
    +
    3283 xxh_u32 h32;
    +
    3284
    +
    3285 if (state->large_len) {
    +
    3286 h32 = XXH32_mergeAccs(state->acc);
    +
    3287 } else {
    +
    3288 h32 = state->acc[2] /* == seed */ + XXH_PRIME32_5;
    +
    3289 }
    +
    3290
    +
    3291 h32 += state->total_len_32;
    +
    3292
    +
    3293 return XXH32_finalize(h32, state->buffer, state->bufferedSize, XXH_aligned);
    +
    3294}
    +
    +
    3295#endif /* !XXH_NO_STREAM */
    +
    3296
    +
    3297/******* Canonical representation *******/
    +
    3298
    +
    + +
    3301{
    +
    3302 XXH_STATIC_ASSERT(sizeof(XXH32_canonical_t) == sizeof(XXH32_hash_t));
    +
    3303 if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap32(hash);
    +
    3304 XXH_memcpy(dst, &hash, sizeof(*dst));
    +
    3305}
    +
    +
    3306
    +
    + +
    3308{
    +
    3309 return XXH_readBE32(src);
    +
    3310}
    +
    +
    3311
    +
    3312
    +
    3313#ifndef XXH_NO_LONG_LONG
    +
    3314
    +
    3315/* *******************************************************************
    +
    3316* 64-bit hash functions
    +
    3317*********************************************************************/
    +
    3323/******* Memory access *******/
    +
    3324
    +
    3325typedef XXH64_hash_t xxh_u64;
    +
    3326
    +
    3327#ifdef XXH_OLD_NAMES
    +
    3328# define U64 xxh_u64
    +
    3329#endif
    +
    3330
    +
    3331#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))
    +
    3332/*
    +
    3333 * Manual byteshift. Best for old compilers which don't inline memcpy.
    +
    3334 * We actually directly use XXH_readLE64 and XXH_readBE64.
    +
    3335 */
    +
    3336#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==2))
    +
    3337
    +
    3338/* Force direct memory access. Only works on CPU which support unaligned memory access in hardware */
    +
    3339static xxh_u64 XXH_read64(const void* memPtr)
    +
    3340{
    +
    3341 return *(const xxh_u64*) memPtr;
    +
    3342}
    +
    3343
    +
    3344#elif (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==1))
    +
    3345
    +
    3346/*
    +
    3347 * __attribute__((aligned(1))) is supported by gcc and clang. Originally the
    +
    3348 * documentation claimed that it only increased the alignment, but actually it
    +
    3349 * can decrease it on gcc, clang, and icc:
    +
    3350 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69502,
    +
    3351 * https://gcc.godbolt.org/z/xYez1j67Y.
    +
    3352 */
    +
    3353#ifdef XXH_OLD_NAMES
    +
    3354typedef union { xxh_u32 u32; xxh_u64 u64; } __attribute__((__packed__)) unalign64;
    +
    3355#endif
    +
    3356static xxh_u64 XXH_read64(const void* ptr)
    +
    3357{
    +
    3358 typedef __attribute__((__aligned__(1))) xxh_u64 xxh_unalign64;
    +
    3359 return *((const xxh_unalign64*)ptr);
    +
    3360}
    +
    3361
    +
    3362#else
    +
    3363
    +
    3364/*
    +
    3365 * Portable and safe solution. Generally efficient.
    +
    3366 * see: https://fastcompression.blogspot.com/2015/08/accessing-unaligned-memory.html
    +
    3367 */
    +
    3368static xxh_u64 XXH_read64(const void* memPtr)
    +
    3369{
    +
    3370 xxh_u64 val;
    +
    3371 XXH_memcpy(&val, memPtr, sizeof(val));
    +
    3372 return val;
    +
    3373}
    +
    3374
    +
    3375#endif /* XXH_FORCE_DIRECT_MEMORY_ACCESS */
    +
    3376
    +
    3377#if defined(_MSC_VER) /* Visual Studio */
    +
    3378# define XXH_swap64 _byteswap_uint64
    +
    3379#elif XXH_GCC_VERSION >= 403
    +
    3380# define XXH_swap64 __builtin_bswap64
    +
    3381#else
    +
    3382static xxh_u64 XXH_swap64(xxh_u64 x)
    +
    3383{
    +
    3384 return ((x << 56) & 0xff00000000000000ULL) |
    +
    3385 ((x << 40) & 0x00ff000000000000ULL) |
    +
    3386 ((x << 24) & 0x0000ff0000000000ULL) |
    +
    3387 ((x << 8) & 0x000000ff00000000ULL) |
    +
    3388 ((x >> 8) & 0x00000000ff000000ULL) |
    +
    3389 ((x >> 24) & 0x0000000000ff0000ULL) |
    +
    3390 ((x >> 40) & 0x000000000000ff00ULL) |
    +
    3391 ((x >> 56) & 0x00000000000000ffULL);
    +
    3392}
    +
    3393#endif
    +
    3394
    +
    3395
    +
    3396/* XXH_FORCE_MEMORY_ACCESS==3 is an endian-independent byteshift load. */
    +
    3397#if (defined(XXH_FORCE_MEMORY_ACCESS) && (XXH_FORCE_MEMORY_ACCESS==3))
    +
    3398
    +
    3399XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* memPtr)
    +
    3400{
    +
    3401 const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;
    +
    3402 return bytePtr[0]
    +
    3403 | ((xxh_u64)bytePtr[1] << 8)
    +
    3404 | ((xxh_u64)bytePtr[2] << 16)
    +
    3405 | ((xxh_u64)bytePtr[3] << 24)
    +
    3406 | ((xxh_u64)bytePtr[4] << 32)
    +
    3407 | ((xxh_u64)bytePtr[5] << 40)
    +
    3408 | ((xxh_u64)bytePtr[6] << 48)
    +
    3409 | ((xxh_u64)bytePtr[7] << 56);
    +
    3410}
    +
    3411
    +
    3412XXH_FORCE_INLINE xxh_u64 XXH_readBE64(const void* memPtr)
    +
    3413{
    +
    3414 const xxh_u8* bytePtr = (const xxh_u8 *)memPtr;
    +
    3415 return bytePtr[7]
    +
    3416 | ((xxh_u64)bytePtr[6] << 8)
    +
    3417 | ((xxh_u64)bytePtr[5] << 16)
    +
    3418 | ((xxh_u64)bytePtr[4] << 24)
    +
    3419 | ((xxh_u64)bytePtr[3] << 32)
    +
    3420 | ((xxh_u64)bytePtr[2] << 40)
    +
    3421 | ((xxh_u64)bytePtr[1] << 48)
    +
    3422 | ((xxh_u64)bytePtr[0] << 56);
    +
    3423}
    +
    3424
    +
    3425#else
    +
    3426XXH_FORCE_INLINE xxh_u64 XXH_readLE64(const void* ptr)
    +
    3427{
    +
    3428 return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
    +
    3429}
    +
    3430
    +
    3431static xxh_u64 XXH_readBE64(const void* ptr)
    +
    3432{
    +
    3433 return XXH_CPU_LITTLE_ENDIAN ? XXH_swap64(XXH_read64(ptr)) : XXH_read64(ptr);
    +
    3434}
    +
    3435#endif
    +
    3436
    +
    3437XXH_FORCE_INLINE xxh_u64
    +
    3438XXH_readLE64_align(const void* ptr, XXH_alignment align)
    +
    3439{
    +
    3440 if (align==XXH_unaligned)
    +
    3441 return XXH_readLE64(ptr);
    +
    3442 else
    +
    3443 return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr);
    +
    3444}
    +
    3445
    +
    3446
    +
    3447/******* xxh64 *******/
    +
    3456/* #define rather that static const, to be used as initializers */
    +
    3457#define XXH_PRIME64_1 0x9E3779B185EBCA87ULL
    +
    3458#define XXH_PRIME64_2 0xC2B2AE3D27D4EB4FULL
    +
    3459#define XXH_PRIME64_3 0x165667B19E3779F9ULL
    +
    3460#define XXH_PRIME64_4 0x85EBCA77C2B2AE63ULL
    +
    3461#define XXH_PRIME64_5 0x27D4EB2F165667C5ULL
    +
    3462
    +
    3463#ifdef XXH_OLD_NAMES
    +
    3464# define PRIME64_1 XXH_PRIME64_1
    +
    3465# define PRIME64_2 XXH_PRIME64_2
    +
    3466# define PRIME64_3 XXH_PRIME64_3
    +
    3467# define PRIME64_4 XXH_PRIME64_4
    +
    3468# define PRIME64_5 XXH_PRIME64_5
    +
    3469#endif
    +
    3470
    +
    3472static xxh_u64 XXH64_round(xxh_u64 acc, xxh_u64 input)
    +
    3473{
    +
    3474 acc += input * XXH_PRIME64_2;
    +
    3475 acc = XXH_rotl64(acc, 31);
    +
    3476 acc *= XXH_PRIME64_1;
    +
    3477#if (defined(__AVX512F__)) && !defined(XXH_ENABLE_AUTOVECTORIZE)
    +
    3478 /*
    +
    3479 * DISABLE AUTOVECTORIZATION:
    +
    3480 * A compiler fence is used to prevent GCC and Clang from
    +
    3481 * autovectorizing the XXH64 loop (pragmas and attributes don't work for some
    +
    3482 * reason) without globally disabling AVX512.
    +
    3483 *
    +
    3484 * Autovectorization of XXH64 tends to be detrimental,
    +
    3485 * though the exact outcome may change depending on exact cpu and compiler version.
    +
    3486 * For information, it has been reported as detrimental for Skylake-X,
    +
    3487 * but possibly beneficial for Zen4.
    +
    3488 *
    +
    3489 * The default is to disable auto-vectorization,
    +
    3490 * but you can select to enable it instead using `XXH_ENABLE_AUTOVECTORIZE` build variable.
    +
    3491 */
    +
    3492 XXH_COMPILER_GUARD(acc);
    +
    3493#endif
    +
    3494 return acc;
    +
    3495}
    +
    3496
    +
    3497static xxh_u64 XXH64_mergeRound(xxh_u64 acc, xxh_u64 val)
    +
    3498{
    +
    3499 val = XXH64_round(0, val);
    +
    3500 acc ^= val;
    +
    3501 acc = acc * XXH_PRIME64_1 + XXH_PRIME64_4;
    +
    3502 return acc;
    +
    3503}
    +
    3504
    +
    3506static xxh_u64 XXH64_avalanche(xxh_u64 hash)
    +
    3507{
    +
    3508 hash ^= hash >> 33;
    +
    3509 hash *= XXH_PRIME64_2;
    +
    3510 hash ^= hash >> 29;
    +
    3511 hash *= XXH_PRIME64_3;
    +
    3512 hash ^= hash >> 32;
    +
    3513 return hash;
    +
    3514}
    +
    3515
    +
    3516
    +
    3517#define XXH_get64bits(p) XXH_readLE64_align(p, align)
    +
    3518
    +
    3523XXH_FORCE_INLINE void
    +
    3524XXH64_initAccs(xxh_u64 *acc, xxh_u64 seed)
    +
    3525{
    +
    3526 XXH_ASSERT(acc != NULL);
    +
    3527 acc[0] = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
    +
    3528 acc[1] = seed + XXH_PRIME64_2;
    +
    3529 acc[2] = seed + 0;
    +
    3530 acc[3] = seed - XXH_PRIME64_1;
    +
    3531}
    +
    3532
    +
    3539XXH_FORCE_INLINE const xxh_u8 *
    +
    3540XXH64_consumeLong(
    +
    3541 xxh_u64 *XXH_RESTRICT acc,
    +
    3542 xxh_u8 const *XXH_RESTRICT input,
    +
    3543 size_t len,
    +
    3544 XXH_alignment align
    +
    3545)
    +
    3546{
    +
    3547 const xxh_u8* const bEnd = input + len;
    +
    3548 const xxh_u8* const limit = bEnd - 31;
    +
    3549 XXH_ASSERT(acc != NULL);
    +
    3550 XXH_ASSERT(input != NULL);
    +
    3551 XXH_ASSERT(len >= 32);
    +
    3552 do {
    +
    3553 /* reroll on 32-bit */
    +
    3554 if (sizeof(void *) < sizeof(xxh_u64)) {
    +
    3555 size_t i;
    +
    3556 for (i = 0; i < 4; i++) {
    +
    3557 acc[i] = XXH64_round(acc[i], XXH_get64bits(input));
    +
    3558 input += 8;
    +
    3559 }
    +
    3560 } else {
    +
    3561 acc[0] = XXH64_round(acc[0], XXH_get64bits(input)); input += 8;
    +
    3562 acc[1] = XXH64_round(acc[1], XXH_get64bits(input)); input += 8;
    +
    3563 acc[2] = XXH64_round(acc[2], XXH_get64bits(input)); input += 8;
    +
    3564 acc[3] = XXH64_round(acc[3], XXH_get64bits(input)); input += 8;
    +
    3565 }
    +
    3566 } while (input < limit);
    +
    3567
    +
    3568 return input;
    +
    3569}
    +
    3570
    +
    3575XXH_FORCE_INLINE XXH_PUREF xxh_u64
    +
    3576XXH64_mergeAccs(const xxh_u64 *acc)
    +
    3577{
    +
    3578 XXH_ASSERT(acc != NULL);
    +
    3579 {
    +
    3580 xxh_u64 h64 = XXH_rotl64(acc[0], 1) + XXH_rotl64(acc[1], 7)
    +
    3581 + XXH_rotl64(acc[2], 12) + XXH_rotl64(acc[3], 18);
    +
    3582 /* reroll on 32-bit */
    +
    3583 if (sizeof(void *) < sizeof(xxh_u64)) {
    +
    3584 size_t i;
    +
    3585 for (i = 0; i < 4; i++) {
    +
    3586 h64 = XXH64_mergeRound(h64, acc[i]);
    +
    3587 }
    +
    3588 } else {
    +
    3589 h64 = XXH64_mergeRound(h64, acc[0]);
    +
    3590 h64 = XXH64_mergeRound(h64, acc[1]);
    +
    3591 h64 = XXH64_mergeRound(h64, acc[2]);
    +
    3592 h64 = XXH64_mergeRound(h64, acc[3]);
    +
    3593 }
    +
    3594 return h64;
    +
    3595 }
    +
    3596}
    +
    3597
    +
    3613XXH_STATIC XXH_PUREF xxh_u64
    +
    3614XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
    +
    3615{
    +
    3616 if (ptr==NULL) XXH_ASSERT(len == 0);
    +
    3617 len &= 31;
    +
    3618 while (len >= 8) {
    +
    3619 xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr));
    +
    3620 ptr += 8;
    +
    3621 hash ^= k1;
    +
    3622 hash = XXH_rotl64(hash,27) * XXH_PRIME64_1 + XXH_PRIME64_4;
    +
    3623 len -= 8;
    +
    3624 }
    +
    3625 if (len >= 4) {
    +
    3626 hash ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;
    +
    3627 ptr += 4;
    +
    3628 hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;
    +
    3629 len -= 4;
    +
    3630 }
    +
    3631 while (len > 0) {
    +
    3632 hash ^= (*ptr++) * XXH_PRIME64_5;
    +
    3633 hash = XXH_rotl64(hash, 11) * XXH_PRIME64_1;
    +
    3634 --len;
    +
    3635 }
    +
    3636 return XXH64_avalanche(hash);
    +
    3637}
    +
    3638
    +
    3639#ifdef XXH_OLD_NAMES
    +
    3640# define PROCESS1_64 XXH_PROCESS1_64
    +
    3641# define PROCESS4_64 XXH_PROCESS4_64
    +
    3642# define PROCESS8_64 XXH_PROCESS8_64
    +
    3643#else
    +
    3644# undef XXH_PROCESS1_64
    +
    3645# undef XXH_PROCESS4_64
    +
    3646# undef XXH_PROCESS8_64
    +
    3647#endif
    +
    3648
    +
    3657XXH_FORCE_INLINE XXH_PUREF xxh_u64
    +
    3658XXH64_endian_align(const xxh_u8* input, size_t len, xxh_u64 seed, XXH_alignment align)
    +
    3659{
    +
    3660 xxh_u64 h64;
    +
    3661 if (input==NULL) XXH_ASSERT(len == 0);
    +
    3662
    +
    3663 if (len>=32) { /* Process a large block of data */
    +
    3664 xxh_u64 acc[4];
    +
    3665 XXH64_initAccs(acc, seed);
    +
    3666
    +
    3667 input = XXH64_consumeLong(acc, input, len, align);
    +
    3668
    +
    3669 h64 = XXH64_mergeAccs(acc);
    +
    3670 } else {
    +
    3671 h64 = seed + XXH_PRIME64_5;
    +
    3672 }
    +
    3673
    +
    3674 h64 += (xxh_u64) len;
    +
    3675
    +
    3676 return XXH64_finalize(h64, input, len, align);
    +
    3677}
    +
    3678
    +
    3679
    +
    +
    3681XXH_PUBLIC_API XXH64_hash_t XXH64 (XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)
    +
    3682{
    +
    3683#if !defined(XXH_NO_STREAM) && XXH_SIZE_OPT >= 2
    +
    3684 /* Simple version, good for code maintenance, but unfortunately slow for small inputs */
    +
    3685 XXH64_state_t state;
    +
    3686 XXH64_reset(&state, seed);
    +
    3687 XXH64_update(&state, (const xxh_u8*)input, len);
    +
    3688 return XXH64_digest(&state);
    +
    3689#else
    + +
    3691 if ((((size_t)input) & 7)==0) { /* Input is aligned, let's leverage the speed advantage */
    +
    3692 return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);
    +
    3693 } }
    +
    3694
    +
    3695 return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);
    +
    3696
    +
    3697#endif
    +
    3698}
    +
    +
    3699
    +
    3700/******* Hash Streaming *******/
    +
    3701#ifndef XXH_NO_STREAM
    +
    + +
    3704{
    +
    3705 return (XXH64_state_t*)XXH_malloc(sizeof(XXH64_state_t));
    +
    3706}
    +
    +
    3707
    +
    + +
    3709{
    +
    3710 XXH_free(statePtr);
    +
    3711 return XXH_OK;
    +
    3712}
    +
    +
    3713
    +
    +
    3715XXH_PUBLIC_API void XXH64_copyState(XXH_NOESCAPE XXH64_state_t* dstState, const XXH64_state_t* srcState)
    +
    3716{
    +
    3717 XXH_memcpy(dstState, srcState, sizeof(*dstState));
    +
    3718}
    +
    +
    3719
    +
    + +
    3722{
    +
    3723 XXH_ASSERT(statePtr != NULL);
    +
    3724 memset(statePtr, 0, sizeof(*statePtr));
    +
    3725 XXH64_initAccs(statePtr->acc, seed);
    +
    3726 return XXH_OK;
    +
    3727}
    +
    +
    3728
    + +
    +
    3731XXH64_update (XXH_NOESCAPE XXH64_state_t* state, XXH_NOESCAPE const void* input, size_t len)
    +
    3732{
    +
    3733 if (input==NULL) {
    +
    3734 XXH_ASSERT(len == 0);
    +
    3735 return XXH_OK;
    +
    3736 }
    +
    3737
    +
    3738 state->total_len += len;
    +
    3739
    +
    3740 XXH_ASSERT(state->bufferedSize <= sizeof(state->buffer));
    +
    3741 if (len < sizeof(state->buffer) - state->bufferedSize) { /* fill in tmp buffer */
    +
    3742 XXH_memcpy(state->buffer + state->bufferedSize, input, len);
    +
    3743 state->bufferedSize += (XXH32_hash_t)len;
    +
    3744 return XXH_OK;
    +
    3745 }
    +
    3746
    +
    3747 { const xxh_u8* xinput = (const xxh_u8*)input;
    +
    3748 const xxh_u8* const bEnd = xinput + len;
    +
    3749
    +
    3750 if (state->bufferedSize) { /* non-empty buffer => complete first */
    +
    3751 XXH_memcpy(state->buffer + state->bufferedSize, xinput, sizeof(state->buffer) - state->bufferedSize);
    +
    3752 xinput += sizeof(state->buffer) - state->bufferedSize;
    +
    3753 /* and process one round */
    +
    3754 (void)XXH64_consumeLong(state->acc, state->buffer, sizeof(state->buffer), XXH_aligned);
    +
    3755 state->bufferedSize = 0;
    +
    3756 }
    +
    3757
    +
    3758 XXH_ASSERT(xinput <= bEnd);
    +
    3759 if ((size_t)(bEnd - xinput) >= sizeof(state->buffer)) {
    +
    3760 /* Process the remaining data */
    +
    3761 xinput = XXH64_consumeLong(state->acc, xinput, (size_t)(bEnd - xinput), XXH_unaligned);
    +
    3762 }
    +
    3763
    +
    3764 if (xinput < bEnd) {
    +
    3765 /* Copy the leftover to the tmp buffer */
    +
    3766 XXH_memcpy(state->buffer, xinput, (size_t)(bEnd-xinput));
    +
    3767 state->bufferedSize = (unsigned)(bEnd-xinput);
    +
    3768 }
    +
    3769 }
    +
    3770
    +
    3771 return XXH_OK;
    +
    3772}
    +
    +
    3773
    +
    3774
    +
    + +
    3777{
    +
    3778 xxh_u64 h64;
    +
    3779
    +
    3780 if (state->total_len >= 32) {
    +
    3781 h64 = XXH64_mergeAccs(state->acc);
    +
    3782 } else {
    +
    3783 h64 = state->acc[2] /*seed*/ + XXH_PRIME64_5;
    +
    3784 }
    +
    3785
    +
    3786 h64 += (xxh_u64) state->total_len;
    +
    3787
    +
    3788 return XXH64_finalize(h64, state->buffer, (size_t)state->total_len, XXH_aligned);
    +
    3789}
    +
    +
    3790#endif /* !XXH_NO_STREAM */
    +
    3791
    +
    3792/******* Canonical representation *******/
    +
    3793
    +
    + +
    3796{
    +
    3797 XXH_STATIC_ASSERT(sizeof(XXH64_canonical_t) == sizeof(XXH64_hash_t));
    +
    3798 if (XXH_CPU_LITTLE_ENDIAN) hash = XXH_swap64(hash);
    +
    3799 XXH_memcpy(dst, &hash, sizeof(*dst));
    +
    3800}
    +
    +
    3801
    +
    + +
    3804{
    +
    3805 return XXH_readBE64(src);
    +
    3806}
    +
    +
    3807
    +
    3808#ifndef XXH_NO_XXH3
    +
    3809
    +
    3810/* *********************************************************************
    +
    3811* XXH3
    +
    3812* New generation hash designed for speed on small keys and vectorization
    +
    3813************************************************************************ */
    +
    3820
    +
    3821/* === Compiler specifics === */
    +
    3822
    +
    3823
    +
    3824#if (defined(__GNUC__) && (__GNUC__ >= 3)) \
    +
    3825 || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) \
    +
    3826 || defined(__clang__)
    +
    3827# define XXH_likely(x) __builtin_expect(x, 1)
    +
    3828# define XXH_unlikely(x) __builtin_expect(x, 0)
    +
    3829#else
    +
    3830# define XXH_likely(x) (x)
    +
    3831# define XXH_unlikely(x) (x)
    +
    3832#endif
    +
    3833
    +
    3834#ifndef XXH_HAS_INCLUDE
    +
    3835# ifdef __has_include
    +
    3836/*
    +
    3837 * Not defined as XXH_HAS_INCLUDE(x) (function-like) because
    +
    3838 * this causes segfaults in Apple Clang 4.2 (on Mac OS X 10.7 Lion)
    +
    3839 */
    +
    3840# define XXH_HAS_INCLUDE __has_include
    +
    3841# else
    +
    3842# define XXH_HAS_INCLUDE(x) 0
    +
    3843# endif
    +
    3844#endif
    +
    3845
    +
    3846#if defined(__GNUC__) || defined(__clang__)
    +
    3847# if defined(__ARM_FEATURE_SVE)
    +
    3848# include <arm_sve.h>
    +
    3849# endif
    +
    3850# if defined(__ARM_NEON__) || defined(__ARM_NEON) \
    +
    3851 || (defined(_M_ARM) && _M_ARM >= 7) \
    +
    3852 || defined(_M_ARM64) || defined(_M_ARM64EC) \
    +
    3853 || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) /* WASM SIMD128 via SIMDe */
    +
    3854# define inline __inline__ /* circumvent a clang bug */
    +
    3855# include <arm_neon.h>
    +
    3856# undef inline
    +
    3857# elif defined(__AVX2__)
    +
    3858# include <immintrin.h>
    +
    3859# elif defined(__SSE2__)
    +
    3860# include <emmintrin.h>
    +
    3861# elif defined(__loongarch_asx)
    +
    3862# include <lasxintrin.h>
    +
    3863# include <lsxintrin.h>
    +
    3864# elif defined(__loongarch_sx)
    +
    3865# include <lsxintrin.h>
    +
    3866# endif
    +
    3867#endif
    +
    3868
    +
    3869#if defined(_MSC_VER)
    +
    3870# include <intrin.h>
    +
    3871#endif
    +
    3872
    +
    3873/*
    +
    3874 * One goal of XXH3 is to make it fast on both 32-bit and 64-bit, while
    +
    3875 * remaining a true 64-bit/128-bit hash function.
    +
    3876 *
    +
    3877 * This is done by prioritizing a subset of 64-bit operations that can be
    +
    3878 * emulated without too many steps on the average 32-bit machine.
    +
    3879 *
    +
    3880 * For example, these two lines seem similar, and run equally fast on 64-bit:
    +
    3881 *
    +
    3882 * xxh_u64 x;
    +
    3883 * x ^= (x >> 47); // good
    +
    3884 * x ^= (x >> 13); // bad
    +
    3885 *
    +
    3886 * However, to a 32-bit machine, there is a major difference.
    +
    3887 *
    +
    3888 * x ^= (x >> 47) looks like this:
    +
    3889 *
    +
    3890 * x.lo ^= (x.hi >> (47 - 32));
    +
    3891 *
    +
    3892 * while x ^= (x >> 13) looks like this:
    +
    3893 *
    +
    3894 * // note: funnel shifts are not usually cheap.
    +
    3895 * x.lo ^= (x.lo >> 13) | (x.hi << (32 - 13));
    +
    3896 * x.hi ^= (x.hi >> 13);
    +
    3897 *
    +
    3898 * The first one is significantly faster than the second, simply because the
    +
    3899 * shift is larger than 32. This means:
    +
    3900 * - All the bits we need are in the upper 32 bits, so we can ignore the lower
    +
    3901 * 32 bits in the shift.
    +
    3902 * - The shift result will always fit in the lower 32 bits, and therefore,
    +
    3903 * we can ignore the upper 32 bits in the xor.
    +
    3904 *
    +
    3905 * Thanks to this optimization, XXH3 only requires these features to be efficient:
    +
    3906 *
    +
    3907 * - Usable unaligned access
    +
    3908 * - A 32-bit or 64-bit ALU
    +
    3909 * - If 32-bit, a decent ADC instruction
    +
    3910 * - A 32 or 64-bit multiply with a 64-bit result
    +
    3911 * - For the 128-bit variant, a decent byteswap helps short inputs.
    +
    3912 *
    +
    3913 * The first two are already required by XXH32, and almost all 32-bit and 64-bit
    +
    3914 * platforms which can run XXH32 can run XXH3 efficiently.
    +
    3915 *
    +
    3916 * Thumb-1, the classic 16-bit only subset of ARM's instruction set, is one
    +
    3917 * notable exception.
    +
    3918 *
    +
    3919 * First of all, Thumb-1 lacks support for the UMULL instruction which
    +
    3920 * performs the important long multiply. This means numerous __aeabi_lmul
    +
    3921 * calls.
    +
    3922 *
    +
    3923 * Second of all, the 8 functional registers are just not enough.
    +
    3924 * Setup for __aeabi_lmul, byteshift loads, pointers, and all arithmetic need
    +
    3925 * Lo registers, and this shuffling results in thousands more MOVs than A32.
    +
    3926 *
    +
    3927 * A32 and T32 don't have this limitation. They can access all 14 registers,
    +
    3928 * do a 32->64 multiply with UMULL, and the flexible operand allowing free
    +
    3929 * shifts is helpful, too.
    +
    3930 *
    +
    3931 * Therefore, we do a quick sanity check.
    +
    3932 *
    +
    3933 * If compiling Thumb-1 for a target which supports ARM instructions, we will
    +
    3934 * emit a warning, as it is not a "sane" platform to compile for.
    +
    3935 *
    +
    3936 * Usually, if this happens, it is because of an accident and you probably need
    +
    3937 * to specify -march, as you likely meant to compile for a newer architecture.
    +
    3938 *
    +
    3939 * Credit: large sections of the vectorial and asm source code paths
    +
    3940 * have been contributed by @easyaspi314
    +
    3941 */
    +
    3942#if defined(__thumb__) && !defined(__thumb2__) && defined(__ARM_ARCH_ISA_ARM)
    +
    3943# warning "XXH3 is highly inefficient without ARM or Thumb-2."
    +
    3944#endif
    +
    3945
    +
    3946/* ==========================================
    +
    3947 * Vectorization detection
    +
    3948 * ========================================== */
    +
    3949
    +
    3950#ifdef XXH_DOXYGEN
    +
    3961# define XXH_VECTOR XXH_SCALAR
    +
    3971# define XXH_ACC_ALIGN 8
    +
    3972#endif
    +
    3973
    +
    3974/* Actual definition */
    +
    3975#ifndef XXH_DOXYGEN
    +
    3976#endif
    +
    3977
    +
    3978#ifndef XXH_VECTOR /* can be defined on command line */
    +
    3979# if defined(__ARM_FEATURE_SVE)
    +
    3980# define XXH_VECTOR XXH_SVE
    +
    3981# elif ( \
    +
    3982 defined(__ARM_NEON__) || defined(__ARM_NEON) /* gcc */ \
    +
    3983 || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC) /* msvc */ \
    +
    3984 || (defined(__wasm_simd128__) && XXH_HAS_INCLUDE(<arm_neon.h>)) /* wasm simd128 via SIMDe */ \
    +
    3985 ) && ( \
    +
    3986 defined(_WIN32) || defined(__LITTLE_ENDIAN__) /* little endian only */ \
    +
    3987 || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) \
    +
    3988 )
    +
    3989# define XXH_VECTOR XXH_NEON
    +
    3990# elif defined(__AVX512F__)
    +
    3991# define XXH_VECTOR XXH_AVX512
    +
    3992# elif defined(__AVX2__)
    +
    3993# define XXH_VECTOR XXH_AVX2
    +
    3994# elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && (_M_IX86_FP == 2))
    +
    3995# define XXH_VECTOR XXH_SSE2
    +
    3996# elif (defined(__PPC64__) && defined(__POWER8_VECTOR__)) \
    +
    3997 || (defined(__s390x__) && defined(__VEC__)) \
    +
    3998 && defined(__GNUC__) /* TODO: IBM XL */
    +
    3999# define XXH_VECTOR XXH_VSX
    +
    4000# elif defined(__loongarch_asx)
    +
    4001# define XXH_VECTOR XXH_LASX
    +
    4002# elif defined(__loongarch_sx)
    +
    4003# define XXH_VECTOR XXH_LSX
    +
    4004# else
    +
    4005# define XXH_VECTOR XXH_SCALAR
    +
    4006# endif
    +
    4007#endif
    +
    4008
    +
    4009/* __ARM_FEATURE_SVE is only supported by GCC & Clang. */
    +
    4010#if (XXH_VECTOR == XXH_SVE) && !defined(__ARM_FEATURE_SVE)
    +
    4011# ifdef _MSC_VER
    +
    4012# pragma warning(once : 4606)
    +
    4013# else
    +
    4014# warning "__ARM_FEATURE_SVE isn't supported. Use SCALAR instead."
    +
    4015# endif
    +
    4016# undef XXH_VECTOR
    +
    4017# define XXH_VECTOR XXH_SCALAR
    +
    4018#endif
    +
    4019
    +
    4020/*
    +
    4021 * Controls the alignment of the accumulator,
    +
    4022 * for compatibility with aligned vector loads, which are usually faster.
    +
    4023 */
    +
    4024#ifndef XXH_ACC_ALIGN
    +
    4025# if defined(XXH_X86DISPATCH)
    +
    4026# define XXH_ACC_ALIGN 64 /* for compatibility with avx512 */
    +
    4027# elif XXH_VECTOR == XXH_SCALAR /* scalar */
    +
    4028# define XXH_ACC_ALIGN 8
    +
    4029# elif XXH_VECTOR == XXH_SSE2 /* sse2 */
    +
    4030# define XXH_ACC_ALIGN 16
    +
    4031# elif XXH_VECTOR == XXH_AVX2 /* avx2 */
    +
    4032# define XXH_ACC_ALIGN 32
    +
    4033# elif XXH_VECTOR == XXH_NEON /* neon */
    +
    4034# define XXH_ACC_ALIGN 16
    +
    4035# elif XXH_VECTOR == XXH_VSX /* vsx */
    +
    4036# define XXH_ACC_ALIGN 16
    +
    4037# elif XXH_VECTOR == XXH_AVX512 /* avx512 */
    +
    4038# define XXH_ACC_ALIGN 64
    +
    4039# elif XXH_VECTOR == XXH_SVE /* sve */
    +
    4040# define XXH_ACC_ALIGN 64
    +
    4041# elif XXH_VECTOR == XXH_LASX /* lasx */
    +
    4042# define XXH_ACC_ALIGN 64
    +
    4043# elif XXH_VECTOR == XXH_LSX /* lsx */
    +
    4044# define XXH_ACC_ALIGN 64
    +
    4045# endif
    +
    4046#endif
    +
    4047
    +
    4048#if defined(XXH_X86DISPATCH) || XXH_VECTOR == XXH_SSE2 \
    +
    4049 || XXH_VECTOR == XXH_AVX2 || XXH_VECTOR == XXH_AVX512
    +
    4050# define XXH_SEC_ALIGN XXH_ACC_ALIGN
    +
    4051#elif XXH_VECTOR == XXH_SVE
    +
    4052# define XXH_SEC_ALIGN XXH_ACC_ALIGN
    +
    4053#else
    +
    4054# define XXH_SEC_ALIGN 8
    +
    4055#endif
    +
    4056
    +
    4057#if defined(__GNUC__) || defined(__clang__)
    +
    4058# define XXH_ALIASING __attribute__((__may_alias__))
    +
    4059#else
    +
    4060# define XXH_ALIASING /* nothing */
    +
    4061#endif
    +
    4062
    +
    4063/*
    +
    4064 * UGLY HACK:
    +
    4065 * GCC usually generates the best code with -O3 for xxHash.
    +
    4066 *
    +
    4067 * However, when targeting AVX2, it is overzealous in its unrolling resulting
    +
    4068 * in code roughly 3/4 the speed of Clang.
    +
    4069 *
    +
    4070 * There are other issues, such as GCC splitting _mm256_loadu_si256 into
    +
    4071 * _mm_loadu_si128 + _mm256_inserti128_si256. This is an optimization which
    +
    4072 * only applies to Sandy and Ivy Bridge... which don't even support AVX2.
    +
    4073 *
    +
    4074 * That is why when compiling the AVX2 version, it is recommended to use either
    +
    4075 * -O2 -mavx2 -march=haswell
    +
    4076 * or
    +
    4077 * -O2 -mavx2 -mno-avx256-split-unaligned-load
    +
    4078 * for decent performance, or to use Clang instead.
    +
    4079 *
    +
    4080 * Fortunately, we can control the first one with a pragma that forces GCC into
    +
    4081 * -O2, but the other one we can't control without "failed to inline always
    +
    4082 * inline function due to target mismatch" warnings.
    +
    4083 */
    +
    4084#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \
    +
    4085 && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
    +
    4086 && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */
    +
    4087# pragma GCC push_options
    +
    4088# pragma GCC optimize("-O2")
    +
    4089#endif
    +
    4090
    +
    4091#if XXH_VECTOR == XXH_NEON
    +
    4092
    +
    4093/*
    +
    4094 * UGLY HACK: While AArch64 GCC on Linux does not seem to care, on macOS, GCC -O3
    +
    4095 * optimizes out the entire hashLong loop because of the aliasing violation.
    +
    4096 *
    +
    4097 * However, GCC is also inefficient at load-store optimization with vld1q/vst1q,
    +
    4098 * so the only option is to mark it as aliasing.
    +
    4099 */
    +
    4100typedef uint64x2_t xxh_aliasing_uint64x2_t XXH_ALIASING;
    +
    4101
    +
    4115#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__)
    +
    4116XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr) /* silence -Wcast-align */
    +
    4117{
    +
    4118 return *(xxh_aliasing_uint64x2_t const *)ptr;
    +
    4119}
    +
    4120#else
    +
    4121XXH_FORCE_INLINE uint64x2_t XXH_vld1q_u64(void const* ptr)
    +
    4122{
    +
    4123 return vreinterpretq_u64_u8(vld1q_u8((uint8_t const*)ptr));
    +
    4124}
    +
    4125#endif
    +
    4126
    +
    4135#if defined(__aarch64__) && defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11
    +
    4136XXH_FORCE_INLINE uint64x2_t
    +
    4137XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
    +
    4138{
    +
    4139 /* Inline assembly is the only way */
    +
    4140 __asm__("umlal %0.2d, %1.2s, %2.2s" : "+w" (acc) : "w" (lhs), "w" (rhs));
    +
    4141 return acc;
    +
    4142}
    +
    4143XXH_FORCE_INLINE uint64x2_t
    +
    4144XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
    +
    4145{
    +
    4146 /* This intrinsic works as expected */
    +
    4147 return vmlal_high_u32(acc, lhs, rhs);
    +
    4148}
    +
    4149#else
    +
    4150/* Portable intrinsic versions */
    +
    4151XXH_FORCE_INLINE uint64x2_t
    +
    4152XXH_vmlal_low_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
    +
    4153{
    +
    4154 return vmlal_u32(acc, vget_low_u32(lhs), vget_low_u32(rhs));
    +
    4155}
    +
    4158XXH_FORCE_INLINE uint64x2_t
    +
    4159XXH_vmlal_high_u32(uint64x2_t acc, uint32x4_t lhs, uint32x4_t rhs)
    +
    4160{
    +
    4161 return vmlal_u32(acc, vget_high_u32(lhs), vget_high_u32(rhs));
    +
    4162}
    +
    4163#endif
    +
    4164
    +
    4203# ifndef XXH3_NEON_LANES
    +
    4204# if (defined(__aarch64__) || defined(__arm64__) || defined(_M_ARM64) || defined(_M_ARM64EC)) \
    +
    4205 && !defined(__APPLE__) && XXH_SIZE_OPT <= 0
    +
    4206# define XXH3_NEON_LANES 6
    +
    4207# else
    +
    4208# define XXH3_NEON_LANES XXH_ACC_NB
    +
    4209# endif
    +
    4210# endif
    +
    4211#endif /* XXH_VECTOR == XXH_NEON */
    +
    4212
    +
    4213/*
    +
    4214 * VSX and Z Vector helpers.
    +
    4215 *
    +
    4216 * This is very messy, and any pull requests to clean this up are welcome.
    +
    4217 *
    +
    4218 * There are a lot of problems with supporting VSX and s390x, due to
    +
    4219 * inconsistent intrinsics, spotty coverage, and multiple endiannesses.
    +
    4220 */
    +
    4221#if XXH_VECTOR == XXH_VSX
    +
    4222/* Annoyingly, these headers _may_ define three macros: `bool`, `vector`,
    +
    4223 * and `pixel`. This is a problem for obvious reasons.
    +
    4224 *
    +
    4225 * These keywords are unnecessary; the spec literally says they are
    +
    4226 * equivalent to `__bool`, `__vector`, and `__pixel` and may be undef'd
    +
    4227 * after including the header.
    +
    4228 *
    +
    4229 * We use pragma push_macro/pop_macro to keep the namespace clean. */
    +
    4230# pragma push_macro("bool")
    +
    4231# pragma push_macro("vector")
    +
    4232# pragma push_macro("pixel")
    +
    4233/* silence potential macro redefined warnings */
    +
    4234# undef bool
    +
    4235# undef vector
    +
    4236# undef pixel
    +
    4237
    +
    4238# if defined(__s390x__)
    +
    4239# include <s390intrin.h>
    +
    4240# else
    +
    4241# include <altivec.h>
    +
    4242# endif
    +
    4243
    +
    4244/* Restore the original macro values, if applicable. */
    +
    4245# pragma pop_macro("pixel")
    +
    4246# pragma pop_macro("vector")
    +
    4247# pragma pop_macro("bool")
    +
    4248
    +
    4249typedef __vector unsigned long long xxh_u64x2;
    +
    4250typedef __vector unsigned char xxh_u8x16;
    +
    4251typedef __vector unsigned xxh_u32x4;
    +
    4252
    +
    4253/*
    +
    4254 * UGLY HACK: Similar to aarch64 macOS GCC, s390x GCC has the same aliasing issue.
    +
    4255 */
    +
    4256typedef xxh_u64x2 xxh_aliasing_u64x2 XXH_ALIASING;
    +
    4257
    +
    4258# ifndef XXH_VSX_BE
    +
    4259# if defined(__BIG_ENDIAN__) \
    +
    4260 || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
    +
    4261# define XXH_VSX_BE 1
    +
    4262# elif defined(__VEC_ELEMENT_REG_ORDER__) && __VEC_ELEMENT_REG_ORDER__ == __ORDER_BIG_ENDIAN__
    +
    4263# warning "-maltivec=be is not recommended. Please use native endianness."
    +
    4264# define XXH_VSX_BE 1
    +
    4265# else
    +
    4266# define XXH_VSX_BE 0
    +
    4267# endif
    +
    4268# endif /* !defined(XXH_VSX_BE) */
    +
    4269
    +
    4270# if XXH_VSX_BE
    +
    4271# if defined(__POWER9_VECTOR__) || (defined(__clang__) && defined(__s390x__))
    +
    4272# define XXH_vec_revb vec_revb
    +
    4273# else
    +
    4277XXH_FORCE_INLINE xxh_u64x2 XXH_vec_revb(xxh_u64x2 val)
    +
    4278{
    +
    4279 xxh_u8x16 const vByteSwap = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
    +
    4280 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08 };
    +
    4281 return vec_perm(val, val, vByteSwap);
    +
    4282}
    +
    4283# endif
    +
    4284# endif /* XXH_VSX_BE */
    +
    4285
    +
    4289XXH_FORCE_INLINE xxh_u64x2 XXH_vec_loadu(const void *ptr)
    +
    4290{
    +
    4291 xxh_u64x2 ret;
    +
    4292 XXH_memcpy(&ret, ptr, sizeof(xxh_u64x2));
    +
    4293# if XXH_VSX_BE
    +
    4294 ret = XXH_vec_revb(ret);
    +
    4295# endif
    +
    4296 return ret;
    +
    4297}
    +
    4298
    +
    4299/*
    +
    4300 * vec_mulo and vec_mule are very problematic intrinsics on PowerPC
    +
    4301 *
    +
    4302 * These intrinsics weren't added until GCC 8, despite existing for a while,
    +
    4303 * and they are endian dependent. Also, their meaning swap depending on version.
    +
    4304 * */
    +
    4305# if defined(__s390x__)
    +
    4306 /* s390x is always big endian, no issue on this platform */
    +
    4307# define XXH_vec_mulo vec_mulo
    +
    4308# define XXH_vec_mule vec_mule
    +
    4309# elif defined(__clang__) && XXH_HAS_BUILTIN(__builtin_altivec_vmuleuw) && !defined(__ibmxl__)
    +
    4310/* Clang has a better way to control this, we can just use the builtin which doesn't swap. */
    +
    4311 /* The IBM XL Compiler (which defined __clang__) only implements the vec_* operations */
    +
    4312# define XXH_vec_mulo __builtin_altivec_vmulouw
    +
    4313# define XXH_vec_mule __builtin_altivec_vmuleuw
    +
    4314# else
    +
    4315/* gcc needs inline assembly */
    +
    4316/* Adapted from https://github.com/google/highwayhash/blob/master/highwayhash/hh_vsx.h. */
    +
    4317XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mulo(xxh_u32x4 a, xxh_u32x4 b)
    +
    4318{
    +
    4319 xxh_u64x2 result;
    +
    4320 __asm__("vmulouw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b));
    +
    4321 return result;
    +
    4322}
    +
    4323XXH_FORCE_INLINE xxh_u64x2 XXH_vec_mule(xxh_u32x4 a, xxh_u32x4 b)
    +
    4324{
    +
    4325 xxh_u64x2 result;
    +
    4326 __asm__("vmuleuw %0, %1, %2" : "=v" (result) : "v" (a), "v" (b));
    +
    4327 return result;
    +
    4328}
    +
    4329# endif /* XXH_vec_mulo, XXH_vec_mule */
    +
    4330#endif /* XXH_VECTOR == XXH_VSX */
    +
    4331
    +
    4332#if XXH_VECTOR == XXH_SVE
    +
    4333#define ACCRND(acc, offset) \
    +
    4334do { \
    +
    4335 svuint64_t input_vec = svld1_u64(mask, xinput + offset); \
    +
    4336 svuint64_t secret_vec = svld1_u64(mask, xsecret + offset); \
    +
    4337 svuint64_t mixed = sveor_u64_x(mask, secret_vec, input_vec); \
    +
    4338 svuint64_t swapped = svtbl_u64(input_vec, kSwap); \
    +
    4339 svuint64_t mixed_lo = svextw_u64_x(mask, mixed); \
    +
    4340 svuint64_t mixed_hi = svlsr_n_u64_x(mask, mixed, 32); \
    +
    4341 svuint64_t mul = svmad_u64_x(mask, mixed_lo, mixed_hi, swapped); \
    +
    4342 acc = svadd_u64_x(mask, acc, mul); \
    +
    4343} while (0)
    +
    4344#endif /* XXH_VECTOR == XXH_SVE */
    +
    4345
    +
    4346/* prefetch
    +
    4347 * can be disabled, by declaring XXH_NO_PREFETCH build macro */
    +
    4348#if defined(XXH_NO_PREFETCH)
    +
    4349# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */
    +
    4350#else
    +
    4351# if XXH_SIZE_OPT >= 1
    +
    4352# define XXH_PREFETCH(ptr) (void)(ptr)
    +
    4353# elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86)) /* _mm_prefetch() not defined outside of x86/x64 */
    +
    4354# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
    +
    4355# define XXH_PREFETCH(ptr) _mm_prefetch((const char*)(ptr), _MM_HINT_T0)
    +
    4356# elif defined(__GNUC__) && ( (__GNUC__ >= 4) || ( (__GNUC__ == 3) && (__GNUC_MINOR__ >= 1) ) )
    +
    4357# define XXH_PREFETCH(ptr) __builtin_prefetch((ptr), 0 /* rw==read */, 3 /* locality */)
    +
    4358# else
    +
    4359# define XXH_PREFETCH(ptr) (void)(ptr) /* disabled */
    +
    4360# endif
    +
    4361#endif /* XXH_NO_PREFETCH */
    +
    4362
    +
    4363
    +
    4364/* ==========================================
    +
    4365 * XXH3 default settings
    +
    4366 * ========================================== */
    +
    4367
    +
    4368#define XXH_SECRET_DEFAULT_SIZE 192 /* minimum XXH3_SECRET_SIZE_MIN */
    +
    4369
    +
    4370#if (XXH_SECRET_DEFAULT_SIZE < XXH3_SECRET_SIZE_MIN)
    +
    4371# error "default keyset is not large enough"
    +
    4372#endif
    +
    4373
    +
    4378XXH_ALIGN(64) static const xxh_u8 XXH3_kSecret[XXH_SECRET_DEFAULT_SIZE] = {
    +
    4379 0xb8, 0xfe, 0x6c, 0x39, 0x23, 0xa4, 0x4b, 0xbe, 0x7c, 0x01, 0x81, 0x2c, 0xf7, 0x21, 0xad, 0x1c,
    +
    4380 0xde, 0xd4, 0x6d, 0xe9, 0x83, 0x90, 0x97, 0xdb, 0x72, 0x40, 0xa4, 0xa4, 0xb7, 0xb3, 0x67, 0x1f,
    +
    4381 0xcb, 0x79, 0xe6, 0x4e, 0xcc, 0xc0, 0xe5, 0x78, 0x82, 0x5a, 0xd0, 0x7d, 0xcc, 0xff, 0x72, 0x21,
    +
    4382 0xb8, 0x08, 0x46, 0x74, 0xf7, 0x43, 0x24, 0x8e, 0xe0, 0x35, 0x90, 0xe6, 0x81, 0x3a, 0x26, 0x4c,
    +
    4383 0x3c, 0x28, 0x52, 0xbb, 0x91, 0xc3, 0x00, 0xcb, 0x88, 0xd0, 0x65, 0x8b, 0x1b, 0x53, 0x2e, 0xa3,
    +
    4384 0x71, 0x64, 0x48, 0x97, 0xa2, 0x0d, 0xf9, 0x4e, 0x38, 0x19, 0xef, 0x46, 0xa9, 0xde, 0xac, 0xd8,
    +
    4385 0xa8, 0xfa, 0x76, 0x3f, 0xe3, 0x9c, 0x34, 0x3f, 0xf9, 0xdc, 0xbb, 0xc7, 0xc7, 0x0b, 0x4f, 0x1d,
    +
    4386 0x8a, 0x51, 0xe0, 0x4b, 0xcd, 0xb4, 0x59, 0x31, 0xc8, 0x9f, 0x7e, 0xc9, 0xd9, 0x78, 0x73, 0x64,
    +
    4387 0xea, 0xc5, 0xac, 0x83, 0x34, 0xd3, 0xeb, 0xc3, 0xc5, 0x81, 0xa0, 0xff, 0xfa, 0x13, 0x63, 0xeb,
    +
    4388 0x17, 0x0d, 0xdd, 0x51, 0xb7, 0xf0, 0xda, 0x49, 0xd3, 0x16, 0x55, 0x26, 0x29, 0xd4, 0x68, 0x9e,
    +
    4389 0x2b, 0x16, 0xbe, 0x58, 0x7d, 0x47, 0xa1, 0xfc, 0x8f, 0xf8, 0xb8, 0xd1, 0x7a, 0xd0, 0x31, 0xce,
    +
    4390 0x45, 0xcb, 0x3a, 0x8f, 0x95, 0x16, 0x04, 0x28, 0xaf, 0xd7, 0xfb, 0xca, 0xbb, 0x4b, 0x40, 0x7e,
    +
    4391};
    +
    4392
    +
    4393static const xxh_u64 PRIME_MX1 = 0x165667919E3779F9ULL;
    +
    4394static const xxh_u64 PRIME_MX2 = 0x9FB21C651E98DF25ULL;
    +
    4395
    +
    4396#ifdef XXH_OLD_NAMES
    +
    4397# define kSecret XXH3_kSecret
    +
    4398#endif
    +
    4399
    +
    4400#ifdef XXH_DOXYGEN
    +
    4417XXH_FORCE_INLINE xxh_u64
    +
    4418XXH_mult32to64(xxh_u64 x, xxh_u64 y)
    +
    4419{
    +
    4420 return (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF);
    +
    4421}
    +
    4422#elif defined(_MSC_VER) && defined(_M_IX86)
    +
    4423# define XXH_mult32to64(x, y) __emulu((unsigned)(x), (unsigned)(y))
    +
    4424#else
    +
    4425/*
    +
    4426 * Downcast + upcast is usually better than masking on older compilers like
    +
    4427 * GCC 4.2 (especially 32-bit ones), all without affecting newer compilers.
    +
    4428 *
    +
    4429 * The other method, (x & 0xFFFFFFFF) * (y & 0xFFFFFFFF), will AND both operands
    +
    4430 * and perform a full 64x64 multiply -- entirely redundant on 32-bit.
    +
    4431 */
    +
    4432# define XXH_mult32to64(x, y) ((xxh_u64)(xxh_u32)(x) * (xxh_u64)(xxh_u32)(y))
    +
    4433#endif
    +
    4434
    +
    4444static XXH128_hash_t
    +
    4445XXH_mult64to128(xxh_u64 lhs, xxh_u64 rhs)
    +
    4446{
    +
    4447 /*
    +
    4448 * GCC/Clang __uint128_t method.
    +
    4449 *
    +
    4450 * On most 64-bit targets, GCC and Clang define a __uint128_t type.
    +
    4451 * This is usually the best way as it usually uses a native long 64-bit
    +
    4452 * multiply, such as MULQ on x86_64 or MUL + UMULH on aarch64.
    +
    4453 *
    +
    4454 * Usually.
    +
    4455 *
    +
    4456 * Despite being a 32-bit platform, Clang (and emscripten) define this type
    +
    4457 * despite not having the arithmetic for it. This results in a laggy
    +
    4458 * compiler builtin call which calculates a full 128-bit multiply.
    +
    4459 * In that case it is best to use the portable one.
    +
    4460 * https://github.com/Cyan4973/xxHash/issues/211#issuecomment-515575677
    +
    4461 */
    +
    4462#if (defined(__GNUC__) || defined(__clang__)) && !defined(__wasm__) \
    +
    4463 && defined(__SIZEOF_INT128__) \
    +
    4464 || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 128)
    +
    4465
    +
    4466 __uint128_t const product = (__uint128_t)lhs * (__uint128_t)rhs;
    +
    4467 XXH128_hash_t r128;
    +
    4468 r128.low64 = (xxh_u64)(product);
    +
    4469 r128.high64 = (xxh_u64)(product >> 64);
    +
    4470 return r128;
    +
    4471
    +
    4472 /*
    +
    4473 * MSVC for x64's _umul128 method.
    +
    4474 *
    +
    4475 * xxh_u64 _umul128(xxh_u64 Multiplier, xxh_u64 Multiplicand, xxh_u64 *HighProduct);
    +
    4476 *
    +
    4477 * This compiles to single operand MUL on x64.
    +
    4478 */
    +
    4479#elif (defined(_M_X64) || defined(_M_IA64)) && !defined(_M_ARM64EC)
    +
    4480
    +
    4481#ifndef _MSC_VER
    +
    4482# pragma intrinsic(_umul128)
    +
    4483#endif
    +
    4484 xxh_u64 product_high;
    +
    4485 xxh_u64 const product_low = _umul128(lhs, rhs, &product_high);
    +
    4486 XXH128_hash_t r128;
    +
    4487 r128.low64 = product_low;
    +
    4488 r128.high64 = product_high;
    +
    4489 return r128;
    +
    4490
    +
    4491 /*
    +
    4492 * MSVC for ARM64's __umulh method.
    +
    4493 *
    +
    4494 * This compiles to the same MUL + UMULH as GCC/Clang's __uint128_t method.
    +
    4495 */
    +
    4496#elif defined(_M_ARM64) || defined(_M_ARM64EC)
    +
    4497
    +
    4498#ifndef _MSC_VER
    +
    4499# pragma intrinsic(__umulh)
    +
    4500#endif
    +
    4501 XXH128_hash_t r128;
    +
    4502 r128.low64 = lhs * rhs;
    +
    4503 r128.high64 = __umulh(lhs, rhs);
    +
    4504 return r128;
    +
    4505
    +
    4506#else
    +
    4507 /*
    +
    4508 * Portable scalar method. Optimized for 32-bit and 64-bit ALUs.
    +
    4509 *
    +
    4510 * This is a fast and simple grade school multiply, which is shown below
    +
    4511 * with base 10 arithmetic instead of base 0x100000000.
    +
    4512 *
    +
    4513 * 9 3 // D2 lhs = 93
    +
    4514 * x 7 5 // D2 rhs = 75
    +
    4515 * ----------
    +
    4516 * 1 5 // D2 lo_lo = (93 % 10) * (75 % 10) = 15
    +
    4517 * 4 5 | // D2 hi_lo = (93 / 10) * (75 % 10) = 45
    +
    4518 * 2 1 | // D2 lo_hi = (93 % 10) * (75 / 10) = 21
    +
    4519 * + 6 3 | | // D2 hi_hi = (93 / 10) * (75 / 10) = 63
    +
    4520 * ---------
    +
    4521 * 2 7 | // D2 cross = (15 / 10) + (45 % 10) + 21 = 27
    +
    4522 * + 6 7 | | // D2 upper = (27 / 10) + (45 / 10) + 63 = 67
    +
    4523 * ---------
    +
    4524 * 6 9 7 5 // D4 res = (27 * 10) + (15 % 10) + (67 * 100) = 6975
    +
    4525 *
    +
    4526 * The reasons for adding the products like this are:
    +
    4527 * 1. It avoids manual carry tracking. Just like how
    +
    4528 * (9 * 9) + 9 + 9 = 99, the same applies with this for UINT64_MAX.
    +
    4529 * This avoids a lot of complexity.
    +
    4530 *
    +
    4531 * 2. It hints for, and on Clang, compiles to, the powerful UMAAL
    +
    4532 * instruction available in ARM's Digital Signal Processing extension
    +
    4533 * in 32-bit ARMv6 and later, which is shown below:
    +
    4534 *
    +
    4535 * void UMAAL(xxh_u32 *RdLo, xxh_u32 *RdHi, xxh_u32 Rn, xxh_u32 Rm)
    +
    4536 * {
    +
    4537 * xxh_u64 product = (xxh_u64)*RdLo * (xxh_u64)*RdHi + Rn + Rm;
    +
    4538 * *RdLo = (xxh_u32)(product & 0xFFFFFFFF);
    +
    4539 * *RdHi = (xxh_u32)(product >> 32);
    +
    4540 * }
    +
    4541 *
    +
    4542 * This instruction was designed for efficient long multiplication, and
    +
    4543 * allows this to be calculated in only 4 instructions at speeds
    +
    4544 * comparable to some 64-bit ALUs.
    +
    4545 *
    +
    4546 * 3. It isn't terrible on other platforms. Usually this will be a couple
    +
    4547 * of 32-bit ADD/ADCs.
    +
    4548 */
    +
    4549
    +
    4550 /* First calculate all of the cross products. */
    +
    4551 xxh_u64 const lo_lo = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs & 0xFFFFFFFF);
    +
    4552 xxh_u64 const hi_lo = XXH_mult32to64(lhs >> 32, rhs & 0xFFFFFFFF);
    +
    4553 xxh_u64 const lo_hi = XXH_mult32to64(lhs & 0xFFFFFFFF, rhs >> 32);
    +
    4554 xxh_u64 const hi_hi = XXH_mult32to64(lhs >> 32, rhs >> 32);
    +
    4555
    +
    4556 /* Now add the products together. These will never overflow. */
    +
    4557 xxh_u64 const cross = (lo_lo >> 32) + (hi_lo & 0xFFFFFFFF) + lo_hi;
    +
    4558 xxh_u64 const upper = (hi_lo >> 32) + (cross >> 32) + hi_hi;
    +
    4559 xxh_u64 const lower = (cross << 32) | (lo_lo & 0xFFFFFFFF);
    +
    4560
    +
    4561 XXH128_hash_t r128;
    +
    4562 r128.low64 = lower;
    +
    4563 r128.high64 = upper;
    +
    4564 return r128;
    +
    4565#endif
    +
    4566}
    +
    4567
    +
    4578static xxh_u64
    +
    4579XXH3_mul128_fold64(xxh_u64 lhs, xxh_u64 rhs)
    +
    4580{
    +
    4581 XXH128_hash_t product = XXH_mult64to128(lhs, rhs);
    +
    4582 return product.low64 ^ product.high64;
    +
    4583}
    +
    4584
    +
    4586XXH_FORCE_INLINE XXH_CONSTF xxh_u64 XXH_xorshift64(xxh_u64 v64, int shift)
    +
    4587{
    +
    4588 XXH_ASSERT(0 <= shift && shift < 64);
    +
    4589 return v64 ^ (v64 >> shift);
    +
    4590}
    +
    4591
    +
    4592/*
    +
    4593 * This is a fast avalanche stage,
    +
    4594 * suitable when input bits are already partially mixed
    +
    4595 */
    +
    4596static XXH64_hash_t XXH3_avalanche(xxh_u64 h64)
    +
    4597{
    +
    4598 h64 = XXH_xorshift64(h64, 37);
    +
    4599 h64 *= PRIME_MX1;
    +
    4600 h64 = XXH_xorshift64(h64, 32);
    +
    4601 return h64;
    +
    4602}
    +
    4603
    +
    4604/*
    +
    4605 * This is a stronger avalanche,
    +
    4606 * inspired by Pelle Evensen's rrmxmx
    +
    4607 * preferable when input has not been previously mixed
    +
    4608 */
    +
    4609static XXH64_hash_t XXH3_rrmxmx(xxh_u64 h64, xxh_u64 len)
    +
    4610{
    +
    4611 /* this mix is inspired by Pelle Evensen's rrmxmx */
    +
    4612 h64 ^= XXH_rotl64(h64, 49) ^ XXH_rotl64(h64, 24);
    +
    4613 h64 *= PRIME_MX2;
    +
    4614 h64 ^= (h64 >> 35) + len ;
    +
    4615 h64 *= PRIME_MX2;
    +
    4616 return XXH_xorshift64(h64, 28);
    +
    4617}
    +
    4618
    +
    4619
    +
    4620/* ==========================================
    +
    4621 * Short keys
    +
    4622 * ==========================================
    +
    4623 * One of the shortcomings of XXH32 and XXH64 was that their performance was
    +
    4624 * sub-optimal on short lengths. It used an iterative algorithm which strongly
    +
    4625 * favored lengths that were a multiple of 4 or 8.
    +
    4626 *
    +
    4627 * Instead of iterating over individual inputs, we use a set of single shot
    +
    4628 * functions which piece together a range of lengths and operate in constant time.
    +
    4629 *
    +
    4630 * Additionally, the number of multiplies has been significantly reduced. This
    +
    4631 * reduces latency, especially when emulating 64-bit multiplies on 32-bit.
    +
    4632 *
    +
    4633 * Depending on the platform, this may or may not be faster than XXH32, but it
    +
    4634 * is almost guaranteed to be faster than XXH64.
    +
    4635 */
    +
    4636
    +
    4637/*
    +
    4638 * At very short lengths, there isn't enough input to fully hide secrets, or use
    +
    4639 * the entire secret.
    +
    4640 *
    +
    4641 * There is also only a limited amount of mixing we can do before significantly
    +
    4642 * impacting performance.
    +
    4643 *
    +
    4644 * Therefore, we use different sections of the secret and always mix two secret
    +
    4645 * samples with an XOR. This should have no effect on performance on the
    +
    4646 * seedless or withSeed variants because everything _should_ be constant folded
    +
    4647 * by modern compilers.
    +
    4648 *
    +
    4649 * The XOR mixing hides individual parts of the secret and increases entropy.
    +
    4650 *
    +
    4651 * This adds an extra layer of strength for custom secrets.
    +
    4652 */
    +
    4653XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
    +
    4654XXH3_len_1to3_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    4655{
    +
    4656 XXH_ASSERT(input != NULL);
    +
    4657 XXH_ASSERT(1 <= len && len <= 3);
    +
    4658 XXH_ASSERT(secret != NULL);
    +
    4659 /*
    +
    4660 * len = 1: combined = { input[0], 0x01, input[0], input[0] }
    +
    4661 * len = 2: combined = { input[1], 0x02, input[0], input[1] }
    +
    4662 * len = 3: combined = { input[2], 0x03, input[0], input[1] }
    +
    4663 */
    +
    4664 { xxh_u8 const c1 = input[0];
    +
    4665 xxh_u8 const c2 = input[len >> 1];
    +
    4666 xxh_u8 const c3 = input[len - 1];
    +
    4667 xxh_u32 const combined = ((xxh_u32)c1 << 16) | ((xxh_u32)c2 << 24)
    +
    4668 | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8);
    +
    4669 xxh_u64 const bitflip = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed;
    +
    4670 xxh_u64 const keyed = (xxh_u64)combined ^ bitflip;
    +
    4671 return XXH64_avalanche(keyed);
    +
    4672 }
    +
    4673}
    +
    4674
    +
    4675XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
    +
    4676XXH3_len_4to8_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    4677{
    +
    4678 XXH_ASSERT(input != NULL);
    +
    4679 XXH_ASSERT(secret != NULL);
    +
    4680 XXH_ASSERT(4 <= len && len <= 8);
    +
    4681 seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32;
    +
    4682 { xxh_u32 const input1 = XXH_readLE32(input);
    +
    4683 xxh_u32 const input2 = XXH_readLE32(input + len - 4);
    +
    4684 xxh_u64 const bitflip = (XXH_readLE64(secret+8) ^ XXH_readLE64(secret+16)) - seed;
    +
    4685 xxh_u64 const input64 = input2 + (((xxh_u64)input1) << 32);
    +
    4686 xxh_u64 const keyed = input64 ^ bitflip;
    +
    4687 return XXH3_rrmxmx(keyed, len);
    +
    4688 }
    +
    4689}
    +
    4690
    +
    4691XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
    +
    4692XXH3_len_9to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    4693{
    +
    4694 XXH_ASSERT(input != NULL);
    +
    4695 XXH_ASSERT(secret != NULL);
    +
    4696 XXH_ASSERT(9 <= len && len <= 16);
    +
    4697 { xxh_u64 const bitflip1 = (XXH_readLE64(secret+24) ^ XXH_readLE64(secret+32)) + seed;
    +
    4698 xxh_u64 const bitflip2 = (XXH_readLE64(secret+40) ^ XXH_readLE64(secret+48)) - seed;
    +
    4699 xxh_u64 const input_lo = XXH_readLE64(input) ^ bitflip1;
    +
    4700 xxh_u64 const input_hi = XXH_readLE64(input + len - 8) ^ bitflip2;
    +
    4701 xxh_u64 const acc = len
    +
    4702 + XXH_swap64(input_lo) + input_hi
    +
    4703 + XXH3_mul128_fold64(input_lo, input_hi);
    +
    4704 return XXH3_avalanche(acc);
    +
    4705 }
    +
    4706}
    +
    4707
    +
    4708XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
    +
    4709XXH3_len_0to16_64b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    4710{
    +
    4711 XXH_ASSERT(len <= 16);
    +
    4712 { if (XXH_likely(len > 8)) return XXH3_len_9to16_64b(input, len, secret, seed);
    +
    4713 if (XXH_likely(len >= 4)) return XXH3_len_4to8_64b(input, len, secret, seed);
    +
    4714 if (len) return XXH3_len_1to3_64b(input, len, secret, seed);
    +
    4715 return XXH64_avalanche(seed ^ (XXH_readLE64(secret+56) ^ XXH_readLE64(secret+64)));
    +
    4716 }
    +
    4717}
    +
    4718
    +
    4719/*
    +
    4720 * DISCLAIMER: There are known *seed-dependent* multicollisions here due to
    +
    4721 * multiplication by zero, affecting hashes of lengths 17 to 240.
    +
    4722 *
    +
    4723 * However, they are very unlikely.
    +
    4724 *
    +
    4725 * Keep this in mind when using the unseeded XXH3_64bits() variant: As with all
    +
    4726 * unseeded non-cryptographic hashes, it does not attempt to defend itself
    +
    4727 * against specially crafted inputs, only random inputs.
    +
    4728 *
    +
    4729 * Compared to classic UMAC where a 1 in 2^31 chance of 4 consecutive bytes
    +
    4730 * cancelling out the secret is taken an arbitrary number of times (addressed
    +
    4731 * in XXH3_accumulate_512), this collision is very unlikely with random inputs
    +
    4732 * and/or proper seeding:
    +
    4733 *
    +
    4734 * This only has a 1 in 2^63 chance of 8 consecutive bytes cancelling out, in a
    +
    4735 * function that is only called up to 16 times per hash with up to 240 bytes of
    +
    4736 * input.
    +
    4737 *
    +
    4738 * This is not too bad for a non-cryptographic hash function, especially with
    +
    4739 * only 64 bit outputs.
    +
    4740 *
    +
    4741 * The 128-bit variant (which trades some speed for strength) is NOT affected
    +
    4742 * by this, although it is always a good idea to use a proper seed if you care
    +
    4743 * about strength.
    +
    4744 */
    +
    4745XXH_FORCE_INLINE xxh_u64 XXH3_mix16B(const xxh_u8* XXH_RESTRICT input,
    +
    4746 const xxh_u8* XXH_RESTRICT secret, xxh_u64 seed64)
    +
    4747{
    +
    4748#if defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
    +
    4749 && defined(__i386__) && defined(__SSE2__) /* x86 + SSE2 */ \
    +
    4750 && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable like XXH32 hack */
    +
    4751 /*
    +
    4752 * UGLY HACK:
    +
    4753 * GCC for x86 tends to autovectorize the 128-bit multiply, resulting in
    +
    4754 * slower code.
    +
    4755 *
    +
    4756 * By forcing seed64 into a register, we disrupt the cost model and
    +
    4757 * cause it to scalarize. See `XXH32_round()`
    +
    4758 *
    +
    4759 * FIXME: Clang's output is still _much_ faster -- On an AMD Ryzen 3600,
    +
    4760 * XXH3_64bits @ len=240 runs at 4.6 GB/s with Clang 9, but 3.3 GB/s on
    +
    4761 * GCC 9.2, despite both emitting scalar code.
    +
    4762 *
    +
    4763 * GCC generates much better scalar code than Clang for the rest of XXH3,
    +
    4764 * which is why finding a more optimal codepath is an interest.
    +
    4765 */
    +
    4766 XXH_COMPILER_GUARD(seed64);
    +
    4767#endif
    +
    4768 { xxh_u64 const input_lo = XXH_readLE64(input);
    +
    4769 xxh_u64 const input_hi = XXH_readLE64(input+8);
    +
    4770 return XXH3_mul128_fold64(
    +
    4771 input_lo ^ (XXH_readLE64(secret) + seed64),
    +
    4772 input_hi ^ (XXH_readLE64(secret+8) - seed64)
    +
    4773 );
    +
    4774 }
    +
    4775}
    +
    4776
    +
    4777/* For mid range keys, XXH3 uses a Mum-hash variant. */
    +
    4778XXH_FORCE_INLINE XXH_PUREF XXH64_hash_t
    +
    4779XXH3_len_17to128_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
    +
    4780 const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
    +
    4781 XXH64_hash_t seed)
    +
    4782{
    +
    4783 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;
    +
    4784 XXH_ASSERT(16 < len && len <= 128);
    +
    4785
    +
    4786 { xxh_u64 acc = len * XXH_PRIME64_1;
    +
    4787#if XXH_SIZE_OPT >= 1
    +
    4788 /* Smaller and cleaner, but slightly slower. */
    +
    4789 unsigned int i = (unsigned int)(len - 1) / 32;
    +
    4790 do {
    +
    4791 acc += XXH3_mix16B(input+16 * i, secret+32*i, seed);
    +
    4792 acc += XXH3_mix16B(input+len-16*(i+1), secret+32*i+16, seed);
    +
    4793 } while (i-- != 0);
    +
    4794#else
    +
    4795 if (len > 32) {
    +
    4796 if (len > 64) {
    +
    4797 if (len > 96) {
    +
    4798 acc += XXH3_mix16B(input+48, secret+96, seed);
    +
    4799 acc += XXH3_mix16B(input+len-64, secret+112, seed);
    +
    4800 }
    +
    4801 acc += XXH3_mix16B(input+32, secret+64, seed);
    +
    4802 acc += XXH3_mix16B(input+len-48, secret+80, seed);
    +
    4803 }
    +
    4804 acc += XXH3_mix16B(input+16, secret+32, seed);
    +
    4805 acc += XXH3_mix16B(input+len-32, secret+48, seed);
    +
    4806 }
    +
    4807 acc += XXH3_mix16B(input+0, secret+0, seed);
    +
    4808 acc += XXH3_mix16B(input+len-16, secret+16, seed);
    +
    4809#endif
    +
    4810 return XXH3_avalanche(acc);
    +
    4811 }
    +
    4812}
    +
    4813
    +
    4814XXH_NO_INLINE XXH_PUREF XXH64_hash_t
    +
    4815XXH3_len_129to240_64b(const xxh_u8* XXH_RESTRICT input, size_t len,
    +
    4816 const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
    +
    4817 XXH64_hash_t seed)
    +
    4818{
    +
    4819 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;
    +
    4820 XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);
    +
    4821
    +
    4822 #define XXH3_MIDSIZE_STARTOFFSET 3
    +
    4823 #define XXH3_MIDSIZE_LASTOFFSET 17
    +
    4824
    +
    4825 { xxh_u64 acc = len * XXH_PRIME64_1;
    +
    4826 xxh_u64 acc_end;
    +
    4827 unsigned int const nbRounds = (unsigned int)len / 16;
    +
    4828 unsigned int i;
    +
    4829 XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);
    +
    4830 for (i=0; i<8; i++) {
    +
    4831 acc += XXH3_mix16B(input+(16*i), secret+(16*i), seed);
    +
    4832 }
    +
    4833 /* last bytes */
    +
    4834 acc_end = XXH3_mix16B(input + len - 16, secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET, seed);
    +
    4835 XXH_ASSERT(nbRounds >= 8);
    +
    4836 acc = XXH3_avalanche(acc);
    +
    4837#if defined(__clang__) /* Clang */ \
    +
    4838 && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \
    +
    4839 && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */
    +
    4840 /*
    +
    4841 * UGLY HACK:
    +
    4842 * Clang for ARMv7-A tries to vectorize this loop, similar to GCC x86.
    +
    4843 * In everywhere else, it uses scalar code.
    +
    4844 *
    +
    4845 * For 64->128-bit multiplies, even if the NEON was 100% optimal, it
    +
    4846 * would still be slower than UMAAL (see XXH_mult64to128).
    +
    4847 *
    +
    4848 * Unfortunately, Clang doesn't handle the long multiplies properly and
    +
    4849 * converts them to the nonexistent "vmulq_u64" intrinsic, which is then
    +
    4850 * scalarized into an ugly mess of VMOV.32 instructions.
    +
    4851 *
    +
    4852 * This mess is difficult to avoid without turning autovectorization
    +
    4853 * off completely, but they are usually relatively minor and/or not
    +
    4854 * worth it to fix.
    +
    4855 *
    +
    4856 * This loop is the easiest to fix, as unlike XXH32, this pragma
    +
    4857 * _actually works_ because it is a loop vectorization instead of an
    +
    4858 * SLP vectorization.
    +
    4859 */
    +
    4860 #pragma clang loop vectorize(disable)
    +
    4861#endif
    +
    4862 for (i=8 ; i < nbRounds; i++) {
    +
    4863 /*
    +
    4864 * Prevents clang for unrolling the acc loop and interleaving with this one.
    +
    4865 */
    +
    4866 XXH_COMPILER_GUARD(acc);
    +
    4867 acc_end += XXH3_mix16B(input+(16*i), secret+(16*(i-8)) + XXH3_MIDSIZE_STARTOFFSET, seed);
    +
    4868 }
    +
    4869 return XXH3_avalanche(acc + acc_end);
    +
    4870 }
    +
    4871}
    +
    4872
    +
    4873
    +
    4874/* ======= Long Keys ======= */
    +
    4875
    +
    4876#define XXH_STRIPE_LEN 64
    +
    4877#define XXH_SECRET_CONSUME_RATE 8 /* nb of secret bytes consumed at each accumulation */
    +
    4878#define XXH_ACC_NB (XXH_STRIPE_LEN / sizeof(xxh_u64))
    +
    4879
    +
    4880#ifdef XXH_OLD_NAMES
    +
    4881# define STRIPE_LEN XXH_STRIPE_LEN
    +
    4882# define ACC_NB XXH_ACC_NB
    +
    4883#endif
    +
    4884
    +
    4885#ifndef XXH_PREFETCH_DIST
    +
    4886# ifdef __clang__
    +
    4887# define XXH_PREFETCH_DIST 320
    +
    4888# else
    +
    4889# if (XXH_VECTOR == XXH_AVX512)
    +
    4890# define XXH_PREFETCH_DIST 512
    +
    4891# else
    +
    4892# define XXH_PREFETCH_DIST 384
    +
    4893# endif
    +
    4894# endif /* __clang__ */
    +
    4895#endif /* XXH_PREFETCH_DIST */
    +
    4896
    +
    4897/*
    +
    4898 * These macros are to generate an XXH3_accumulate() function.
    +
    4899 * The two arguments select the name suffix and target attribute.
    +
    4900 *
    +
    4901 * The name of this symbol is XXH3_accumulate_<name>() and it calls
    +
    4902 * XXH3_accumulate_512_<name>().
    +
    4903 *
    +
    4904 * It may be useful to hand implement this function if the compiler fails to
    +
    4905 * optimize the inline function.
    +
    4906 */
    +
    4907#define XXH3_ACCUMULATE_TEMPLATE(name) \
    +
    4908void \
    +
    4909XXH3_accumulate_##name(xxh_u64* XXH_RESTRICT acc, \
    +
    4910 const xxh_u8* XXH_RESTRICT input, \
    +
    4911 const xxh_u8* XXH_RESTRICT secret, \
    +
    4912 size_t nbStripes) \
    +
    4913{ \
    +
    4914 size_t n; \
    +
    4915 for (n = 0; n < nbStripes; n++ ) { \
    +
    4916 const xxh_u8* const in = input + n*XXH_STRIPE_LEN; \
    +
    4917 XXH_PREFETCH(in + XXH_PREFETCH_DIST); \
    +
    4918 XXH3_accumulate_512_##name( \
    +
    4919 acc, \
    +
    4920 in, \
    +
    4921 secret + n*XXH_SECRET_CONSUME_RATE); \
    +
    4922 } \
    +
    4923}
    +
    4924
    +
    4925
    +
    4926XXH_FORCE_INLINE void XXH_writeLE64(void* dst, xxh_u64 v64)
    +
    4927{
    +
    4928 if (!XXH_CPU_LITTLE_ENDIAN) v64 = XXH_swap64(v64);
    +
    4929 XXH_memcpy(dst, &v64, sizeof(v64));
    +
    4930}
    +
    4931
    +
    4932/* Several intrinsic functions below are supposed to accept __int64 as argument,
    +
    4933 * as documented in https://software.intel.com/sites/landingpage/IntrinsicsGuide/ .
    +
    4934 * However, several environments do not define __int64 type,
    +
    4935 * requiring a workaround.
    +
    4936 */
    +
    4937#if !defined (__VMS) \
    +
    4938 && (defined (__cplusplus) \
    +
    4939 || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) )
    +
    4940 typedef int64_t xxh_i64;
    +
    4941#else
    +
    4942 /* the following type must have a width of 64-bit */
    +
    4943 typedef long long xxh_i64;
    +
    4944#endif
    +
    4945
    +
    4946
    +
    4947/*
    +
    4948 * XXH3_accumulate_512 is the tightest loop for long inputs, and it is the most optimized.
    +
    4949 *
    +
    4950 * It is a hardened version of UMAC, based off of FARSH's implementation.
    +
    4951 *
    +
    4952 * This was chosen because it adapts quite well to 32-bit, 64-bit, and SIMD
    +
    4953 * implementations, and it is ridiculously fast.
    +
    4954 *
    +
    4955 * We harden it by mixing the original input to the accumulators as well as the product.
    +
    4956 *
    +
    4957 * This means that in the (relatively likely) case of a multiply by zero, the
    +
    4958 * original input is preserved.
    +
    4959 *
    +
    4960 * On 128-bit inputs, we swap 64-bit pairs when we add the input to improve
    +
    4961 * cross-pollination, as otherwise the upper and lower halves would be
    +
    4962 * essentially independent.
    +
    4963 *
    +
    4964 * This doesn't matter on 64-bit hashes since they all get merged together in
    +
    4965 * the end, so we skip the extra step.
    +
    4966 *
    +
    4967 * Both XXH3_64bits and XXH3_128bits use this subroutine.
    +
    4968 */
    +
    4969
    +
    4970#if (XXH_VECTOR == XXH_AVX512) \
    +
    4971 || (defined(XXH_DISPATCH_AVX512) && XXH_DISPATCH_AVX512 != 0)
    +
    4972
    +
    4973#ifndef XXH_TARGET_AVX512
    +
    4974# define XXH_TARGET_AVX512 /* disable attribute target */
    +
    4975#endif
    +
    4976
    +
    4977XXH_FORCE_INLINE XXH_TARGET_AVX512 void
    +
    4978XXH3_accumulate_512_avx512(void* XXH_RESTRICT acc,
    +
    4979 const void* XXH_RESTRICT input,
    +
    4980 const void* XXH_RESTRICT secret)
    +
    4981{
    +
    4982 __m512i* const xacc = (__m512i *) acc;
    +
    4983 XXH_ASSERT((((size_t)acc) & 63) == 0);
    +
    4984 XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i));
    +
    4985
    +
    4986 {
    +
    4987 /* data_vec = input[0]; */
    +
    4988 __m512i const data_vec = _mm512_loadu_si512 (input);
    +
    4989 /* key_vec = secret[0]; */
    +
    4990 __m512i const key_vec = _mm512_loadu_si512 (secret);
    +
    4991 /* data_key = data_vec ^ key_vec; */
    +
    4992 __m512i const data_key = _mm512_xor_si512 (data_vec, key_vec);
    +
    4993 /* data_key_lo = data_key >> 32; */
    +
    4994 __m512i const data_key_lo = _mm512_srli_epi64 (data_key, 32);
    +
    4995 /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
    +
    4996 __m512i const product = _mm512_mul_epu32 (data_key, data_key_lo);
    +
    4997 /* xacc[0] += swap(data_vec); */
    +
    4998 __m512i const data_swap = _mm512_shuffle_epi32(data_vec, (_MM_PERM_ENUM)_MM_SHUFFLE(1, 0, 3, 2));
    +
    4999 __m512i const sum = _mm512_add_epi64(*xacc, data_swap);
    +
    5000 /* xacc[0] += product; */
    +
    5001 *xacc = _mm512_add_epi64(product, sum);
    +
    5002 }
    +
    5003}
    +
    5004XXH_FORCE_INLINE XXH_TARGET_AVX512 XXH3_ACCUMULATE_TEMPLATE(avx512)
    +
    5005
    +
    5006/*
    +
    5007 * XXH3_scrambleAcc: Scrambles the accumulators to improve mixing.
    +
    5008 *
    +
    5009 * Multiplication isn't perfect, as explained by Google in HighwayHash:
    +
    5010 *
    +
    5011 * // Multiplication mixes/scrambles bytes 0-7 of the 64-bit result to
    +
    5012 * // varying degrees. In descending order of goodness, bytes
    +
    5013 * // 3 4 2 5 1 6 0 7 have quality 228 224 164 160 100 96 36 32.
    +
    5014 * // As expected, the upper and lower bytes are much worse.
    +
    5015 *
    +
    5016 * Source: https://github.com/google/highwayhash/blob/0aaf66b/highwayhash/hh_avx2.h#L291
    +
    5017 *
    +
    5018 * Since our algorithm uses a pseudorandom secret to add some variance into the
    +
    5019 * mix, we don't need to (or want to) mix as often or as much as HighwayHash does.
    +
    5020 *
    +
    5021 * This isn't as tight as XXH3_accumulate, but still written in SIMD to avoid
    +
    5022 * extraction.
    +
    5023 *
    +
    5024 * Both XXH3_64bits and XXH3_128bits use this subroutine.
    +
    5025 */
    +
    5026
    +
    5027XXH_FORCE_INLINE XXH_TARGET_AVX512 void
    +
    5028XXH3_scrambleAcc_avx512(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5029{
    +
    5030 XXH_ASSERT((((size_t)acc) & 63) == 0);
    +
    5031 XXH_STATIC_ASSERT(XXH_STRIPE_LEN == sizeof(__m512i));
    +
    5032 { __m512i* const xacc = (__m512i*) acc;
    +
    5033 const __m512i prime32 = _mm512_set1_epi32((int)XXH_PRIME32_1);
    +
    5034
    +
    5035 /* xacc[0] ^= (xacc[0] >> 47) */
    +
    5036 __m512i const acc_vec = *xacc;
    +
    5037 __m512i const shifted = _mm512_srli_epi64 (acc_vec, 47);
    +
    5038 /* xacc[0] ^= secret; */
    +
    5039 __m512i const key_vec = _mm512_loadu_si512 (secret);
    +
    5040 __m512i const data_key = _mm512_ternarylogic_epi32(key_vec, acc_vec, shifted, 0x96 /* key_vec ^ acc_vec ^ shifted */);
    +
    5041
    +
    5042 /* xacc[0] *= XXH_PRIME32_1; */
    +
    5043 __m512i const data_key_hi = _mm512_srli_epi64 (data_key, 32);
    +
    5044 __m512i const prod_lo = _mm512_mul_epu32 (data_key, prime32);
    +
    5045 __m512i const prod_hi = _mm512_mul_epu32 (data_key_hi, prime32);
    +
    5046 *xacc = _mm512_add_epi64(prod_lo, _mm512_slli_epi64(prod_hi, 32));
    +
    5047 }
    +
    5048}
    +
    5049
    +
    5050XXH_FORCE_INLINE XXH_TARGET_AVX512 void
    +
    5051XXH3_initCustomSecret_avx512(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
    +
    5052{
    +
    5053 XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 63) == 0);
    +
    5054 XXH_STATIC_ASSERT(XXH_SEC_ALIGN == 64);
    +
    5055 XXH_ASSERT(((size_t)customSecret & 63) == 0);
    +
    5056 (void)(&XXH_writeLE64);
    +
    5057 { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m512i);
    +
    5058 __m512i const seed_pos = _mm512_set1_epi64((xxh_i64)seed64);
    +
    5059 __m512i const seed = _mm512_mask_sub_epi64(seed_pos, 0xAA, _mm512_set1_epi8(0), seed_pos);
    +
    5060
    +
    5061 const __m512i* const src = (const __m512i*) ((const void*) XXH3_kSecret);
    +
    5062 __m512i* const dest = ( __m512i*) customSecret;
    +
    5063 int i;
    +
    5064 XXH_ASSERT(((size_t)src & 63) == 0); /* control alignment */
    +
    5065 XXH_ASSERT(((size_t)dest & 63) == 0);
    +
    5066 for (i=0; i < nbRounds; ++i) {
    +
    5067 dest[i] = _mm512_add_epi64(_mm512_load_si512(src + i), seed);
    +
    5068 } }
    +
    5069}
    +
    5070
    +
    5071#endif
    +
    5072
    +
    5073#if (XXH_VECTOR == XXH_AVX2) \
    +
    5074 || (defined(XXH_DISPATCH_AVX2) && XXH_DISPATCH_AVX2 != 0)
    +
    5075
    +
    5076#ifndef XXH_TARGET_AVX2
    +
    5077# define XXH_TARGET_AVX2 /* disable attribute target */
    +
    5078#endif
    +
    5079
    +
    5080XXH_FORCE_INLINE XXH_TARGET_AVX2 void
    +
    5081XXH3_accumulate_512_avx2( void* XXH_RESTRICT acc,
    +
    5082 const void* XXH_RESTRICT input,
    +
    5083 const void* XXH_RESTRICT secret)
    +
    5084{
    +
    5085 XXH_ASSERT((((size_t)acc) & 31) == 0);
    +
    5086 { __m256i* const xacc = (__m256i *) acc;
    +
    5087 /* Unaligned. This is mainly for pointer arithmetic, and because
    +
    5088 * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */
    +
    5089 const __m256i* const xinput = (const __m256i *) input;
    +
    5090 /* Unaligned. This is mainly for pointer arithmetic, and because
    +
    5091 * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */
    +
    5092 const __m256i* const xsecret = (const __m256i *) secret;
    +
    5093
    +
    5094 size_t i;
    +
    5095 for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) {
    +
    5096 /* data_vec = xinput[i]; */
    +
    5097 __m256i const data_vec = _mm256_loadu_si256 (xinput+i);
    +
    5098 /* key_vec = xsecret[i]; */
    +
    5099 __m256i const key_vec = _mm256_loadu_si256 (xsecret+i);
    +
    5100 /* data_key = data_vec ^ key_vec; */
    +
    5101 __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec);
    +
    5102 /* data_key_lo = data_key >> 32; */
    +
    5103 __m256i const data_key_lo = _mm256_srli_epi64 (data_key, 32);
    +
    5104 /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
    +
    5105 __m256i const product = _mm256_mul_epu32 (data_key, data_key_lo);
    +
    5106 /* xacc[i] += swap(data_vec); */
    +
    5107 __m256i const data_swap = _mm256_shuffle_epi32(data_vec, _MM_SHUFFLE(1, 0, 3, 2));
    +
    5108 __m256i const sum = _mm256_add_epi64(xacc[i], data_swap);
    +
    5109 /* xacc[i] += product; */
    +
    5110 xacc[i] = _mm256_add_epi64(product, sum);
    +
    5111 } }
    +
    5112}
    +
    5113XXH_FORCE_INLINE XXH_TARGET_AVX2 XXH3_ACCUMULATE_TEMPLATE(avx2)
    +
    5114
    +
    5115XXH_FORCE_INLINE XXH_TARGET_AVX2 void
    +
    5116XXH3_scrambleAcc_avx2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5117{
    +
    5118 XXH_ASSERT((((size_t)acc) & 31) == 0);
    +
    5119 { __m256i* const xacc = (__m256i*) acc;
    +
    5120 /* Unaligned. This is mainly for pointer arithmetic, and because
    +
    5121 * _mm256_loadu_si256 requires a const __m256i * pointer for some reason. */
    +
    5122 const __m256i* const xsecret = (const __m256i *) secret;
    +
    5123 const __m256i prime32 = _mm256_set1_epi32((int)XXH_PRIME32_1);
    +
    5124
    +
    5125 size_t i;
    +
    5126 for (i=0; i < XXH_STRIPE_LEN/sizeof(__m256i); i++) {
    +
    5127 /* xacc[i] ^= (xacc[i] >> 47) */
    +
    5128 __m256i const acc_vec = xacc[i];
    +
    5129 __m256i const shifted = _mm256_srli_epi64 (acc_vec, 47);
    +
    5130 __m256i const data_vec = _mm256_xor_si256 (acc_vec, shifted);
    +
    5131 /* xacc[i] ^= xsecret; */
    +
    5132 __m256i const key_vec = _mm256_loadu_si256 (xsecret+i);
    +
    5133 __m256i const data_key = _mm256_xor_si256 (data_vec, key_vec);
    +
    5134
    +
    5135 /* xacc[i] *= XXH_PRIME32_1; */
    +
    5136 __m256i const data_key_hi = _mm256_srli_epi64 (data_key, 32);
    +
    5137 __m256i const prod_lo = _mm256_mul_epu32 (data_key, prime32);
    +
    5138 __m256i const prod_hi = _mm256_mul_epu32 (data_key_hi, prime32);
    +
    5139 xacc[i] = _mm256_add_epi64(prod_lo, _mm256_slli_epi64(prod_hi, 32));
    +
    5140 }
    +
    5141 }
    +
    5142}
    +
    5143
    +
    5144XXH_FORCE_INLINE XXH_TARGET_AVX2 void XXH3_initCustomSecret_avx2(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
    +
    5145{
    +
    5146 XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 31) == 0);
    +
    5147 XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE / sizeof(__m256i)) == 6);
    +
    5148 XXH_STATIC_ASSERT(XXH_SEC_ALIGN <= 64);
    +
    5149 (void)(&XXH_writeLE64);
    +
    5150 XXH_PREFETCH(customSecret);
    +
    5151 { __m256i const seed = _mm256_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64, (xxh_i64)(0U - seed64), (xxh_i64)seed64);
    +
    5152
    +
    5153 const __m256i* const src = (const __m256i*) ((const void*) XXH3_kSecret);
    +
    5154 __m256i* dest = ( __m256i*) customSecret;
    +
    5155
    +
    5156# if defined(__GNUC__) || defined(__clang__)
    +
    5157 /*
    +
    5158 * On GCC & Clang, marking 'dest' as modified will cause the compiler:
    +
    5159 * - do not extract the secret from sse registers in the internal loop
    +
    5160 * - use less common registers, and avoid pushing these reg into stack
    +
    5161 */
    +
    5162 XXH_COMPILER_GUARD(dest);
    +
    5163# endif
    +
    5164 XXH_ASSERT(((size_t)src & 31) == 0); /* control alignment */
    +
    5165 XXH_ASSERT(((size_t)dest & 31) == 0);
    +
    5166
    +
    5167 /* GCC -O2 need unroll loop manually */
    +
    5168 dest[0] = _mm256_add_epi64(_mm256_load_si256(src+0), seed);
    +
    5169 dest[1] = _mm256_add_epi64(_mm256_load_si256(src+1), seed);
    +
    5170 dest[2] = _mm256_add_epi64(_mm256_load_si256(src+2), seed);
    +
    5171 dest[3] = _mm256_add_epi64(_mm256_load_si256(src+3), seed);
    +
    5172 dest[4] = _mm256_add_epi64(_mm256_load_si256(src+4), seed);
    +
    5173 dest[5] = _mm256_add_epi64(_mm256_load_si256(src+5), seed);
    +
    5174 }
    +
    5175}
    +
    5176
    +
    5177#endif
    +
    5178
    +
    5179/* x86dispatch always generates SSE2 */
    +
    5180#if (XXH_VECTOR == XXH_SSE2) || defined(XXH_X86DISPATCH)
    +
    5181
    +
    5182#ifndef XXH_TARGET_SSE2
    +
    5183# define XXH_TARGET_SSE2 /* disable attribute target */
    +
    5184#endif
    +
    5185
    +
    5186XXH_FORCE_INLINE XXH_TARGET_SSE2 void
    +
    5187XXH3_accumulate_512_sse2( void* XXH_RESTRICT acc,
    +
    5188 const void* XXH_RESTRICT input,
    +
    5189 const void* XXH_RESTRICT secret)
    +
    5190{
    +
    5191 /* SSE2 is just a half-scale version of the AVX2 version. */
    +
    5192 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5193 { __m128i* const xacc = (__m128i *) acc;
    +
    5194 /* Unaligned. This is mainly for pointer arithmetic, and because
    +
    5195 * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */
    +
    5196 const __m128i* const xinput = (const __m128i *) input;
    +
    5197 /* Unaligned. This is mainly for pointer arithmetic, and because
    +
    5198 * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */
    +
    5199 const __m128i* const xsecret = (const __m128i *) secret;
    +
    5200
    +
    5201 size_t i;
    +
    5202 for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) {
    +
    5203 /* data_vec = xinput[i]; */
    +
    5204 __m128i const data_vec = _mm_loadu_si128 (xinput+i);
    +
    5205 /* key_vec = xsecret[i]; */
    +
    5206 __m128i const key_vec = _mm_loadu_si128 (xsecret+i);
    +
    5207 /* data_key = data_vec ^ key_vec; */
    +
    5208 __m128i const data_key = _mm_xor_si128 (data_vec, key_vec);
    +
    5209 /* data_key_lo = data_key >> 32; */
    +
    5210 __m128i const data_key_lo = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1));
    +
    5211 /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
    +
    5212 __m128i const product = _mm_mul_epu32 (data_key, data_key_lo);
    +
    5213 /* xacc[i] += swap(data_vec); */
    +
    5214 __m128i const data_swap = _mm_shuffle_epi32(data_vec, _MM_SHUFFLE(1,0,3,2));
    +
    5215 __m128i const sum = _mm_add_epi64(xacc[i], data_swap);
    +
    5216 /* xacc[i] += product; */
    +
    5217 xacc[i] = _mm_add_epi64(product, sum);
    +
    5218 } }
    +
    5219}
    +
    5220XXH_FORCE_INLINE XXH_TARGET_SSE2 XXH3_ACCUMULATE_TEMPLATE(sse2)
    +
    5221
    +
    5222XXH_FORCE_INLINE XXH_TARGET_SSE2 void
    +
    5223XXH3_scrambleAcc_sse2(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5224{
    +
    5225 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5226 { __m128i* const xacc = (__m128i*) acc;
    +
    5227 /* Unaligned. This is mainly for pointer arithmetic, and because
    +
    5228 * _mm_loadu_si128 requires a const __m128i * pointer for some reason. */
    +
    5229 const __m128i* const xsecret = (const __m128i *) secret;
    +
    5230 const __m128i prime32 = _mm_set1_epi32((int)XXH_PRIME32_1);
    +
    5231
    +
    5232 size_t i;
    +
    5233 for (i=0; i < XXH_STRIPE_LEN/sizeof(__m128i); i++) {
    +
    5234 /* xacc[i] ^= (xacc[i] >> 47) */
    +
    5235 __m128i const acc_vec = xacc[i];
    +
    5236 __m128i const shifted = _mm_srli_epi64 (acc_vec, 47);
    +
    5237 __m128i const data_vec = _mm_xor_si128 (acc_vec, shifted);
    +
    5238 /* xacc[i] ^= xsecret[i]; */
    +
    5239 __m128i const key_vec = _mm_loadu_si128 (xsecret+i);
    +
    5240 __m128i const data_key = _mm_xor_si128 (data_vec, key_vec);
    +
    5241
    +
    5242 /* xacc[i] *= XXH_PRIME32_1; */
    +
    5243 __m128i const data_key_hi = _mm_shuffle_epi32 (data_key, _MM_SHUFFLE(0, 3, 0, 1));
    +
    5244 __m128i const prod_lo = _mm_mul_epu32 (data_key, prime32);
    +
    5245 __m128i const prod_hi = _mm_mul_epu32 (data_key_hi, prime32);
    +
    5246 xacc[i] = _mm_add_epi64(prod_lo, _mm_slli_epi64(prod_hi, 32));
    +
    5247 }
    +
    5248 }
    +
    5249}
    +
    5250
    +
    5251XXH_FORCE_INLINE XXH_TARGET_SSE2 void XXH3_initCustomSecret_sse2(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
    +
    5252{
    +
    5253 XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0);
    +
    5254 (void)(&XXH_writeLE64);
    +
    5255 { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / sizeof(__m128i);
    +
    5256
    +
    5257# if defined(_MSC_VER) && defined(_M_IX86) && _MSC_VER < 1900
    +
    5258 /* MSVC 32bit mode does not support _mm_set_epi64x before 2015 */
    +
    5259 XXH_ALIGN(16) const xxh_i64 seed64x2[2] = { (xxh_i64)seed64, (xxh_i64)(0U - seed64) };
    +
    5260 __m128i const seed = _mm_load_si128((__m128i const*)seed64x2);
    +
    5261# else
    +
    5262 __m128i const seed = _mm_set_epi64x((xxh_i64)(0U - seed64), (xxh_i64)seed64);
    +
    5263# endif
    +
    5264 int i;
    +
    5265
    +
    5266 const void* const src16 = XXH3_kSecret;
    +
    5267 __m128i* dst16 = (__m128i*) customSecret;
    +
    5268# if defined(__GNUC__) || defined(__clang__)
    +
    5269 /*
    +
    5270 * On GCC & Clang, marking 'dest' as modified will cause the compiler:
    +
    5271 * - do not extract the secret from sse registers in the internal loop
    +
    5272 * - use less common registers, and avoid pushing these reg into stack
    +
    5273 */
    +
    5274 XXH_COMPILER_GUARD(dst16);
    +
    5275# endif
    +
    5276 XXH_ASSERT(((size_t)src16 & 15) == 0); /* control alignment */
    +
    5277 XXH_ASSERT(((size_t)dst16 & 15) == 0);
    +
    5278
    +
    5279 for (i=0; i < nbRounds; ++i) {
    +
    5280 dst16[i] = _mm_add_epi64(_mm_load_si128((const __m128i *)src16+i), seed);
    +
    5281 } }
    +
    5282}
    +
    5283
    +
    5284#endif
    +
    5285
    +
    5286#if (XXH_VECTOR == XXH_NEON)
    +
    5287
    +
    5288/* forward declarations for the scalar routines */
    +
    5289XXH_FORCE_INLINE void
    +
    5290XXH3_scalarRound(void* XXH_RESTRICT acc, void const* XXH_RESTRICT input,
    +
    5291 void const* XXH_RESTRICT secret, size_t lane);
    +
    5292
    +
    5293XXH_FORCE_INLINE void
    +
    5294XXH3_scalarScrambleRound(void* XXH_RESTRICT acc,
    +
    5295 void const* XXH_RESTRICT secret, size_t lane);
    +
    5296
    +
    5320
    +
    5321XXH_FORCE_INLINE void
    +
    5322XXH3_accumulate_512_neon( void* XXH_RESTRICT acc,
    +
    5323 const void* XXH_RESTRICT input,
    +
    5324 const void* XXH_RESTRICT secret)
    +
    5325{
    +
    5326 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5327 XXH_STATIC_ASSERT(XXH3_NEON_LANES > 0 && XXH3_NEON_LANES <= XXH_ACC_NB && XXH3_NEON_LANES % 2 == 0);
    +
    5328 { /* GCC for darwin arm64 does not like aliasing here */
    +
    5329 xxh_aliasing_uint64x2_t* const xacc = (xxh_aliasing_uint64x2_t*) acc;
    +
    5330 /* We don't use a uint32x4_t pointer because it causes bus errors on ARMv7. */
    +
    5331 uint8_t const* xinput = (const uint8_t *) input;
    +
    5332 uint8_t const* xsecret = (const uint8_t *) secret;
    +
    5333
    +
    5334 size_t i;
    +
    5335#ifdef __wasm_simd128__
    +
    5336 /*
    +
    5337 * On WASM SIMD128, Clang emits direct address loads when XXH3_kSecret
    +
    5338 * is constant propagated, which results in it converting it to this
    +
    5339 * inside the loop:
    +
    5340 *
    +
    5341 * a = v128.load(XXH3_kSecret + 0 + $secret_offset, offset = 0)
    +
    5342 * b = v128.load(XXH3_kSecret + 16 + $secret_offset, offset = 0)
    +
    5343 * ...
    +
    5344 *
    +
    5345 * This requires a full 32-bit address immediate (and therefore a 6 byte
    +
    5346 * instruction) as well as an add for each offset.
    +
    5347 *
    +
    5348 * Putting an asm guard prevents it from folding (at the cost of losing
    +
    5349 * the alignment hint), and uses the free offset in `v128.load` instead
    +
    5350 * of adding secret_offset each time which overall reduces code size by
    +
    5351 * about a kilobyte and improves performance.
    +
    5352 */
    +
    5353 XXH_COMPILER_GUARD(xsecret);
    +
    5354#endif
    +
    5355 /* Scalar lanes use the normal scalarRound routine */
    +
    5356 for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) {
    +
    5357 XXH3_scalarRound(acc, input, secret, i);
    +
    5358 }
    +
    5359 i = 0;
    +
    5360 /* 4 NEON lanes at a time. */
    +
    5361 for (; i+1 < XXH3_NEON_LANES / 2; i+=2) {
    +
    5362 /* data_vec = xinput[i]; */
    +
    5363 uint64x2_t data_vec_1 = XXH_vld1q_u64(xinput + (i * 16));
    +
    5364 uint64x2_t data_vec_2 = XXH_vld1q_u64(xinput + ((i+1) * 16));
    +
    5365 /* key_vec = xsecret[i]; */
    +
    5366 uint64x2_t key_vec_1 = XXH_vld1q_u64(xsecret + (i * 16));
    +
    5367 uint64x2_t key_vec_2 = XXH_vld1q_u64(xsecret + ((i+1) * 16));
    +
    5368 /* data_swap = swap(data_vec) */
    +
    5369 uint64x2_t data_swap_1 = vextq_u64(data_vec_1, data_vec_1, 1);
    +
    5370 uint64x2_t data_swap_2 = vextq_u64(data_vec_2, data_vec_2, 1);
    +
    5371 /* data_key = data_vec ^ key_vec; */
    +
    5372 uint64x2_t data_key_1 = veorq_u64(data_vec_1, key_vec_1);
    +
    5373 uint64x2_t data_key_2 = veorq_u64(data_vec_2, key_vec_2);
    +
    5374
    +
    5375 /*
    +
    5376 * If we reinterpret the 64x2 vectors as 32x4 vectors, we can use a
    +
    5377 * de-interleave operation for 4 lanes in 1 step with `vuzpq_u32` to
    +
    5378 * get one vector with the low 32 bits of each lane, and one vector
    +
    5379 * with the high 32 bits of each lane.
    +
    5380 *
    +
    5381 * The intrinsic returns a double vector because the original ARMv7-a
    +
    5382 * instruction modified both arguments in place. AArch64 and SIMD128 emit
    +
    5383 * two instructions from this intrinsic.
    +
    5384 *
    +
    5385 * [ dk11L | dk11H | dk12L | dk12H ] -> [ dk11L | dk12L | dk21L | dk22L ]
    +
    5386 * [ dk21L | dk21H | dk22L | dk22H ] -> [ dk11H | dk12H | dk21H | dk22H ]
    +
    5387 */
    +
    5388 uint32x4x2_t unzipped = vuzpq_u32(
    +
    5389 vreinterpretq_u32_u64(data_key_1),
    +
    5390 vreinterpretq_u32_u64(data_key_2)
    +
    5391 );
    +
    5392 /* data_key_lo = data_key & 0xFFFFFFFF */
    +
    5393 uint32x4_t data_key_lo = unzipped.val[0];
    +
    5394 /* data_key_hi = data_key >> 32 */
    +
    5395 uint32x4_t data_key_hi = unzipped.val[1];
    +
    5396 /*
    +
    5397 * Then, we can split the vectors horizontally and multiply which, as for most
    +
    5398 * widening intrinsics, have a variant that works on both high half vectors
    +
    5399 * for free on AArch64. A similar instruction is available on SIMD128.
    +
    5400 *
    +
    5401 * sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi
    +
    5402 */
    +
    5403 uint64x2_t sum_1 = XXH_vmlal_low_u32(data_swap_1, data_key_lo, data_key_hi);
    +
    5404 uint64x2_t sum_2 = XXH_vmlal_high_u32(data_swap_2, data_key_lo, data_key_hi);
    +
    5405 /*
    +
    5406 * Clang reorders
    +
    5407 * a += b * c; // umlal swap.2d, dkl.2s, dkh.2s
    +
    5408 * c += a; // add acc.2d, acc.2d, swap.2d
    +
    5409 * to
    +
    5410 * c += a; // add acc.2d, acc.2d, swap.2d
    +
    5411 * c += b * c; // umlal acc.2d, dkl.2s, dkh.2s
    +
    5412 *
    +
    5413 * While it would make sense in theory since the addition is faster,
    +
    5414 * for reasons likely related to umlal being limited to certain NEON
    +
    5415 * pipelines, this is worse. A compiler guard fixes this.
    +
    5416 */
    +
    5417 XXH_COMPILER_GUARD_CLANG_NEON(sum_1);
    +
    5418 XXH_COMPILER_GUARD_CLANG_NEON(sum_2);
    +
    5419 /* xacc[i] = acc_vec + sum; */
    +
    5420 xacc[i] = vaddq_u64(xacc[i], sum_1);
    +
    5421 xacc[i+1] = vaddq_u64(xacc[i+1], sum_2);
    +
    5422 }
    +
    5423 /* Operate on the remaining NEON lanes 2 at a time. */
    +
    5424 for (; i < XXH3_NEON_LANES / 2; i++) {
    +
    5425 /* data_vec = xinput[i]; */
    +
    5426 uint64x2_t data_vec = XXH_vld1q_u64(xinput + (i * 16));
    +
    5427 /* key_vec = xsecret[i]; */
    +
    5428 uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16));
    +
    5429 /* acc_vec_2 = swap(data_vec) */
    +
    5430 uint64x2_t data_swap = vextq_u64(data_vec, data_vec, 1);
    +
    5431 /* data_key = data_vec ^ key_vec; */
    +
    5432 uint64x2_t data_key = veorq_u64(data_vec, key_vec);
    +
    5433 /* For two lanes, just use VMOVN and VSHRN. */
    +
    5434 /* data_key_lo = data_key & 0xFFFFFFFF; */
    +
    5435 uint32x2_t data_key_lo = vmovn_u64(data_key);
    +
    5436 /* data_key_hi = data_key >> 32; */
    +
    5437 uint32x2_t data_key_hi = vshrn_n_u64(data_key, 32);
    +
    5438 /* sum = data_swap + (u64x2) data_key_lo * (u64x2) data_key_hi; */
    +
    5439 uint64x2_t sum = vmlal_u32(data_swap, data_key_lo, data_key_hi);
    +
    5440 /* Same Clang workaround as before */
    +
    5441 XXH_COMPILER_GUARD_CLANG_NEON(sum);
    +
    5442 /* xacc[i] = acc_vec + sum; */
    +
    5443 xacc[i] = vaddq_u64 (xacc[i], sum);
    +
    5444 }
    +
    5445 }
    +
    5446}
    +
    5447XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(neon)
    +
    5448
    +
    5449XXH_FORCE_INLINE void
    +
    5450XXH3_scrambleAcc_neon(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5451{
    +
    5452 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5453
    +
    5454 { xxh_aliasing_uint64x2_t* xacc = (xxh_aliasing_uint64x2_t*) acc;
    +
    5455 uint8_t const* xsecret = (uint8_t const*) secret;
    +
    5456
    +
    5457 size_t i;
    +
    5458 /* WASM uses operator overloads and doesn't need these. */
    +
    5459#ifndef __wasm_simd128__
    +
    5460 /* { prime32_1, prime32_1 } */
    +
    5461 uint32x2_t const kPrimeLo = vdup_n_u32(XXH_PRIME32_1);
    +
    5462 /* { 0, prime32_1, 0, prime32_1 } */
    +
    5463 uint32x4_t const kPrimeHi = vreinterpretq_u32_u64(vdupq_n_u64((xxh_u64)XXH_PRIME32_1 << 32));
    +
    5464#endif
    +
    5465
    +
    5466 /* AArch64 uses both scalar and neon at the same time */
    +
    5467 for (i = XXH3_NEON_LANES; i < XXH_ACC_NB; i++) {
    +
    5468 XXH3_scalarScrambleRound(acc, secret, i);
    +
    5469 }
    +
    5470 for (i=0; i < XXH3_NEON_LANES / 2; i++) {
    +
    5471 /* xacc[i] ^= (xacc[i] >> 47); */
    +
    5472 uint64x2_t acc_vec = xacc[i];
    +
    5473 uint64x2_t shifted = vshrq_n_u64(acc_vec, 47);
    +
    5474 uint64x2_t data_vec = veorq_u64(acc_vec, shifted);
    +
    5475
    +
    5476 /* xacc[i] ^= xsecret[i]; */
    +
    5477 uint64x2_t key_vec = XXH_vld1q_u64(xsecret + (i * 16));
    +
    5478 uint64x2_t data_key = veorq_u64(data_vec, key_vec);
    +
    5479 /* xacc[i] *= XXH_PRIME32_1 */
    +
    5480#ifdef __wasm_simd128__
    +
    5481 /* SIMD128 has multiply by u64x2, use it instead of expanding and scalarizing */
    +
    5482 xacc[i] = data_key * XXH_PRIME32_1;
    +
    5483#else
    +
    5484 /*
    +
    5485 * Expanded version with portable NEON intrinsics
    +
    5486 *
    +
    5487 * lo(x) * lo(y) + (hi(x) * lo(y) << 32)
    +
    5488 *
    +
    5489 * prod_hi = hi(data_key) * lo(prime) << 32
    +
    5490 *
    +
    5491 * Since we only need 32 bits of this multiply a trick can be used, reinterpreting the vector
    +
    5492 * as a uint32x4_t and multiplying by { 0, prime, 0, prime } to cancel out the unwanted bits
    +
    5493 * and avoid the shift.
    +
    5494 */
    +
    5495 uint32x4_t prod_hi = vmulq_u32 (vreinterpretq_u32_u64(data_key), kPrimeHi);
    +
    5496 /* Extract low bits for vmlal_u32 */
    +
    5497 uint32x2_t data_key_lo = vmovn_u64(data_key);
    +
    5498 /* xacc[i] = prod_hi + lo(data_key) * XXH_PRIME32_1; */
    +
    5499 xacc[i] = vmlal_u32(vreinterpretq_u64_u32(prod_hi), data_key_lo, kPrimeLo);
    +
    5500#endif
    +
    5501 }
    +
    5502 }
    +
    5503}
    +
    5504#endif
    +
    5505
    +
    5506#if (XXH_VECTOR == XXH_VSX)
    +
    5507
    +
    5508XXH_FORCE_INLINE void
    +
    5509XXH3_accumulate_512_vsx( void* XXH_RESTRICT acc,
    +
    5510 const void* XXH_RESTRICT input,
    +
    5511 const void* XXH_RESTRICT secret)
    +
    5512{
    +
    5513 /* presumed aligned */
    +
    5514 xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc;
    +
    5515 xxh_u8 const* const xinput = (xxh_u8 const*) input; /* no alignment restriction */
    +
    5516 xxh_u8 const* const xsecret = (xxh_u8 const*) secret; /* no alignment restriction */
    +
    5517 xxh_u64x2 const v32 = { 32, 32 };
    +
    5518 size_t i;
    +
    5519 for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) {
    +
    5520 /* data_vec = xinput[i]; */
    +
    5521 xxh_u64x2 const data_vec = XXH_vec_loadu(xinput + 16*i);
    +
    5522 /* key_vec = xsecret[i]; */
    +
    5523 xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i);
    +
    5524 xxh_u64x2 const data_key = data_vec ^ key_vec;
    +
    5525 /* shuffled = (data_key << 32) | (data_key >> 32); */
    +
    5526 xxh_u32x4 const shuffled = (xxh_u32x4)vec_rl(data_key, v32);
    +
    5527 /* product = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)shuffled & 0xFFFFFFFF); */
    +
    5528 xxh_u64x2 const product = XXH_vec_mulo((xxh_u32x4)data_key, shuffled);
    +
    5529 /* acc_vec = xacc[i]; */
    +
    5530 xxh_u64x2 acc_vec = xacc[i];
    +
    5531 acc_vec += product;
    +
    5532
    +
    5533 /* swap high and low halves */
    +
    5534#ifdef __s390x__
    +
    5535 acc_vec += vec_permi(data_vec, data_vec, 2);
    +
    5536#else
    +
    5537 acc_vec += vec_xxpermdi(data_vec, data_vec, 2);
    +
    5538#endif
    +
    5539 xacc[i] = acc_vec;
    +
    5540 }
    +
    5541}
    +
    5542XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(vsx)
    +
    5543
    +
    5544XXH_FORCE_INLINE void
    +
    5545XXH3_scrambleAcc_vsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5546{
    +
    5547 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5548
    +
    5549 { xxh_aliasing_u64x2* const xacc = (xxh_aliasing_u64x2*) acc;
    +
    5550 const xxh_u8* const xsecret = (const xxh_u8*) secret;
    +
    5551 /* constants */
    +
    5552 xxh_u64x2 const v32 = { 32, 32 };
    +
    5553 xxh_u64x2 const v47 = { 47, 47 };
    +
    5554 xxh_u32x4 const prime = { XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1, XXH_PRIME32_1 };
    +
    5555 size_t i;
    +
    5556 for (i = 0; i < XXH_STRIPE_LEN / sizeof(xxh_u64x2); i++) {
    +
    5557 /* xacc[i] ^= (xacc[i] >> 47); */
    +
    5558 xxh_u64x2 const acc_vec = xacc[i];
    +
    5559 xxh_u64x2 const data_vec = acc_vec ^ (acc_vec >> v47);
    +
    5560
    +
    5561 /* xacc[i] ^= xsecret[i]; */
    +
    5562 xxh_u64x2 const key_vec = XXH_vec_loadu(xsecret + 16*i);
    +
    5563 xxh_u64x2 const data_key = data_vec ^ key_vec;
    +
    5564
    +
    5565 /* xacc[i] *= XXH_PRIME32_1 */
    +
    5566 /* prod_lo = ((xxh_u64x2)data_key & 0xFFFFFFFF) * ((xxh_u64x2)prime & 0xFFFFFFFF); */
    +
    5567 xxh_u64x2 const prod_even = XXH_vec_mule((xxh_u32x4)data_key, prime);
    +
    5568 /* prod_hi = ((xxh_u64x2)data_key >> 32) * ((xxh_u64x2)prime >> 32); */
    +
    5569 xxh_u64x2 const prod_odd = XXH_vec_mulo((xxh_u32x4)data_key, prime);
    +
    5570 xacc[i] = prod_odd + (prod_even << v32);
    +
    5571 } }
    +
    5572}
    +
    5573
    +
    5574#endif
    +
    5575
    +
    5576#if (XXH_VECTOR == XXH_SVE)
    +
    5577
    +
    5578XXH_FORCE_INLINE void
    +
    5579XXH3_accumulate_512_sve( void* XXH_RESTRICT acc,
    +
    5580 const void* XXH_RESTRICT input,
    +
    5581 const void* XXH_RESTRICT secret)
    +
    5582{
    +
    5583 uint64_t *xacc = (uint64_t *)acc;
    +
    5584 const uint64_t *xinput = (const uint64_t *)(const void *)input;
    +
    5585 const uint64_t *xsecret = (const uint64_t *)(const void *)secret;
    +
    5586 svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1);
    +
    5587 uint64_t element_count = svcntd();
    +
    5588 if (element_count >= 8) {
    +
    5589 svbool_t mask = svptrue_pat_b64(SV_VL8);
    +
    5590 svuint64_t vacc = svld1_u64(mask, xacc);
    +
    5591 ACCRND(vacc, 0);
    +
    5592 svst1_u64(mask, xacc, vacc);
    +
    5593 } else if (element_count == 2) { /* sve128 */
    +
    5594 svbool_t mask = svptrue_pat_b64(SV_VL2);
    +
    5595 svuint64_t acc0 = svld1_u64(mask, xacc + 0);
    +
    5596 svuint64_t acc1 = svld1_u64(mask, xacc + 2);
    +
    5597 svuint64_t acc2 = svld1_u64(mask, xacc + 4);
    +
    5598 svuint64_t acc3 = svld1_u64(mask, xacc + 6);
    +
    5599 ACCRND(acc0, 0);
    +
    5600 ACCRND(acc1, 2);
    +
    5601 ACCRND(acc2, 4);
    +
    5602 ACCRND(acc3, 6);
    +
    5603 svst1_u64(mask, xacc + 0, acc0);
    +
    5604 svst1_u64(mask, xacc + 2, acc1);
    +
    5605 svst1_u64(mask, xacc + 4, acc2);
    +
    5606 svst1_u64(mask, xacc + 6, acc3);
    +
    5607 } else {
    +
    5608 svbool_t mask = svptrue_pat_b64(SV_VL4);
    +
    5609 svuint64_t acc0 = svld1_u64(mask, xacc + 0);
    +
    5610 svuint64_t acc1 = svld1_u64(mask, xacc + 4);
    +
    5611 ACCRND(acc0, 0);
    +
    5612 ACCRND(acc1, 4);
    +
    5613 svst1_u64(mask, xacc + 0, acc0);
    +
    5614 svst1_u64(mask, xacc + 4, acc1);
    +
    5615 }
    +
    5616}
    +
    5617
    +
    5618XXH_FORCE_INLINE void
    +
    5619XXH3_accumulate_sve(xxh_u64* XXH_RESTRICT acc,
    +
    5620 const xxh_u8* XXH_RESTRICT input,
    +
    5621 const xxh_u8* XXH_RESTRICT secret,
    +
    5622 size_t nbStripes)
    +
    5623{
    +
    5624 if (nbStripes != 0) {
    +
    5625 uint64_t *xacc = (uint64_t *)acc;
    +
    5626 const uint64_t *xinput = (const uint64_t *)(const void *)input;
    +
    5627 const uint64_t *xsecret = (const uint64_t *)(const void *)secret;
    +
    5628 svuint64_t kSwap = sveor_n_u64_z(svptrue_b64(), svindex_u64(0, 1), 1);
    +
    5629 uint64_t element_count = svcntd();
    +
    5630 if (element_count >= 8) {
    +
    5631 svbool_t mask = svptrue_pat_b64(SV_VL8);
    +
    5632 svuint64_t vacc = svld1_u64(mask, xacc + 0);
    +
    5633 do {
    +
    5634 /* svprfd(svbool_t, void *, enum svfprop); */
    +
    5635 svprfd(mask, xinput + 128, SV_PLDL1STRM);
    +
    5636 ACCRND(vacc, 0);
    +
    5637 xinput += 8;
    +
    5638 xsecret += 1;
    +
    5639 nbStripes--;
    +
    5640 } while (nbStripes != 0);
    +
    5641
    +
    5642 svst1_u64(mask, xacc + 0, vacc);
    +
    5643 } else if (element_count == 2) { /* sve128 */
    +
    5644 svbool_t mask = svptrue_pat_b64(SV_VL2);
    +
    5645 svuint64_t acc0 = svld1_u64(mask, xacc + 0);
    +
    5646 svuint64_t acc1 = svld1_u64(mask, xacc + 2);
    +
    5647 svuint64_t acc2 = svld1_u64(mask, xacc + 4);
    +
    5648 svuint64_t acc3 = svld1_u64(mask, xacc + 6);
    +
    5649 do {
    +
    5650 svprfd(mask, xinput + 128, SV_PLDL1STRM);
    +
    5651 ACCRND(acc0, 0);
    +
    5652 ACCRND(acc1, 2);
    +
    5653 ACCRND(acc2, 4);
    +
    5654 ACCRND(acc3, 6);
    +
    5655 xinput += 8;
    +
    5656 xsecret += 1;
    +
    5657 nbStripes--;
    +
    5658 } while (nbStripes != 0);
    +
    5659
    +
    5660 svst1_u64(mask, xacc + 0, acc0);
    +
    5661 svst1_u64(mask, xacc + 2, acc1);
    +
    5662 svst1_u64(mask, xacc + 4, acc2);
    +
    5663 svst1_u64(mask, xacc + 6, acc3);
    +
    5664 } else {
    +
    5665 svbool_t mask = svptrue_pat_b64(SV_VL4);
    +
    5666 svuint64_t acc0 = svld1_u64(mask, xacc + 0);
    +
    5667 svuint64_t acc1 = svld1_u64(mask, xacc + 4);
    +
    5668 do {
    +
    5669 svprfd(mask, xinput + 128, SV_PLDL1STRM);
    +
    5670 ACCRND(acc0, 0);
    +
    5671 ACCRND(acc1, 4);
    +
    5672 xinput += 8;
    +
    5673 xsecret += 1;
    +
    5674 nbStripes--;
    +
    5675 } while (nbStripes != 0);
    +
    5676
    +
    5677 svst1_u64(mask, xacc + 0, acc0);
    +
    5678 svst1_u64(mask, xacc + 4, acc1);
    +
    5679 }
    +
    5680 }
    +
    5681}
    +
    5682
    +
    5683#endif
    +
    5684
    +
    5685#if (XXH_VECTOR == XXH_LSX)
    +
    5686#define _LSX_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
    +
    5687
    +
    5688XXH_FORCE_INLINE void
    +
    5689XXH3_accumulate_512_lsx( void* XXH_RESTRICT acc,
    +
    5690 const void* XXH_RESTRICT input,
    +
    5691 const void* XXH_RESTRICT secret)
    +
    5692{
    +
    5693 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5694 {
    +
    5695 __m128i* const xacc = (__m128i *) acc;
    +
    5696 const __m128i* const xinput = (const __m128i *) input;
    +
    5697 const __m128i* const xsecret = (const __m128i *) secret;
    +
    5698
    +
    5699 for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m128i); i++) {
    +
    5700 /* data_vec = xinput[i]; */
    +
    5701 __m128i const data_vec = __lsx_vld(xinput + i, 0);
    +
    5702 /* key_vec = xsecret[i]; */
    +
    5703 __m128i const key_vec = __lsx_vld(xsecret + i, 0);
    +
    5704 /* data_key = data_vec ^ key_vec; */
    +
    5705 __m128i const data_key = __lsx_vxor_v(data_vec, key_vec);
    +
    5706 /* data_key_lo = data_key >> 32; */
    +
    5707 __m128i const data_key_lo = __lsx_vsrli_d(data_key, 32);
    +
    5708 // __m128i const data_key_lo = __lsx_vsrli_d(data_key, 32);
    +
    5709 /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
    +
    5710 __m128i const product = __lsx_vmulwev_d_wu(data_key, data_key_lo);
    +
    5711 /* xacc[i] += swap(data_vec); */
    +
    5712 __m128i const data_swap = __lsx_vshuf4i_w(data_vec, _LSX_SHUFFLE(1, 0, 3, 2));
    +
    5713 __m128i const sum = __lsx_vadd_d(xacc[i], data_swap);
    +
    5714 /* xacc[i] += product; */
    +
    5715 xacc[i] = __lsx_vadd_d(product, sum);
    +
    5716 }
    +
    5717 }
    +
    5718}
    +
    5719XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(lsx)
    +
    5720
    +
    5721XXH_FORCE_INLINE void
    +
    5722XXH3_scrambleAcc_lsx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5723{
    +
    5724 XXH_ASSERT((((size_t)acc) & 15) == 0);
    +
    5725 {
    +
    5726 __m128i* const xacc = (__m128i*) acc;
    +
    5727 const __m128i* const xsecret = (const __m128i *) secret;
    +
    5728 const __m128i prime32 = __lsx_vreplgr2vr_d(XXH_PRIME32_1);
    +
    5729
    +
    5730 for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m128i); i++) {
    +
    5731 /* xacc[i] ^= (xacc[i] >> 47) */
    +
    5732 __m128i const acc_vec = xacc[i];
    +
    5733 __m128i const shifted = __lsx_vsrli_d(acc_vec, 47);
    +
    5734 __m128i const data_vec = __lsx_vxor_v(acc_vec, shifted);
    +
    5735 /* xacc[i] ^= xsecret[i]; */
    +
    5736 __m128i const key_vec = __lsx_vld(xsecret + i, 0);
    +
    5737 __m128i const data_key = __lsx_vxor_v(data_vec, key_vec);
    +
    5738
    +
    5739 /* xacc[i] *= XXH_PRIME32_1; */
    +
    5740 xacc[i] = __lsx_vmul_d(data_key, prime32);
    +
    5741 }
    +
    5742 }
    +
    5743}
    +
    5744
    +
    5745#endif
    +
    5746
    +
    5747#if (XXH_VECTOR == XXH_LASX)
    +
    5748#define _LASX_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w))
    +
    5749
    +
    5750XXH_FORCE_INLINE void
    +
    5751XXH3_accumulate_512_lasx( void* XXH_RESTRICT acc,
    +
    5752 const void* XXH_RESTRICT input,
    +
    5753 const void* XXH_RESTRICT secret)
    +
    5754{
    +
    5755 XXH_ASSERT((((size_t)acc) & 31) == 0);
    +
    5756 {
    +
    5757 __m256i* const xacc = (__m256i *) acc;
    +
    5758 const __m256i* const xinput = (const __m256i *) input;
    +
    5759 const __m256i* const xsecret = (const __m256i *) secret;
    +
    5760
    +
    5761 for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m256i); i++) {
    +
    5762 /* data_vec = xinput[i]; */
    +
    5763 __m256i const data_vec = __lasx_xvld(xinput + i, 0);
    +
    5764 /* key_vec = xsecret[i]; */
    +
    5765 __m256i const key_vec = __lasx_xvld(xsecret + i, 0);
    +
    5766 /* data_key = data_vec ^ key_vec; */
    +
    5767 __m256i const data_key = __lasx_xvxor_v(data_vec, key_vec);
    +
    5768 /* data_key_lo = data_key >> 32; */
    +
    5769 __m256i const data_key_lo = __lasx_xvsrli_d(data_key, 32);
    +
    5770 // __m256i const data_key_lo = __lasx_xvsrli_d(data_key, 32);
    +
    5771 /* product = (data_key & 0xffffffff) * (data_key_lo & 0xffffffff); */
    +
    5772 __m256i const product = __lasx_xvmulwev_d_wu(data_key, data_key_lo);
    +
    5773 /* xacc[i] += swap(data_vec); */
    +
    5774 __m256i const data_swap = __lasx_xvshuf4i_w(data_vec, _LASX_SHUFFLE(1, 0, 3, 2));
    +
    5775 __m256i const sum = __lasx_xvadd_d(xacc[i], data_swap);
    +
    5776 /* xacc[i] += product; */
    +
    5777 xacc[i] = __lasx_xvadd_d(product, sum);
    +
    5778 }
    +
    5779 }
    +
    5780}
    +
    5781XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(lasx)
    +
    5782
    +
    5783XXH_FORCE_INLINE void
    +
    5784XXH3_scrambleAcc_lasx(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5785{
    +
    5786 XXH_ASSERT((((size_t)acc) & 31) == 0);
    +
    5787 {
    +
    5788 __m256i* const xacc = (__m256i*) acc;
    +
    5789 const __m256i* const xsecret = (const __m256i *) secret;
    +
    5790 const __m256i prime32 = __lasx_xvreplgr2vr_d(XXH_PRIME32_1);
    +
    5791
    +
    5792 for (size_t i = 0; i < XXH_STRIPE_LEN / sizeof(__m256i); i++) {
    +
    5793 /* xacc[i] ^= (xacc[i] >> 47) */
    +
    5794 __m256i const acc_vec = xacc[i];
    +
    5795 __m256i const shifted = __lasx_xvsrli_d(acc_vec, 47);
    +
    5796 __m256i const data_vec = __lasx_xvxor_v(acc_vec, shifted);
    +
    5797 /* xacc[i] ^= xsecret[i]; */
    +
    5798 __m256i const key_vec = __lasx_xvld(xsecret + i, 0);
    +
    5799 __m256i const data_key = __lasx_xvxor_v(data_vec, key_vec);
    +
    5800
    +
    5801 /* xacc[i] *= XXH_PRIME32_1; */
    +
    5802 xacc[i] = __lasx_xvmul_d(data_key, prime32);
    +
    5803 }
    +
    5804 }
    +
    5805}
    +
    5806
    +
    5807#endif
    +
    5808
    +
    5809/* scalar variants - universal */
    +
    5810
    +
    5811#if defined(__aarch64__) && (defined(__GNUC__) || defined(__clang__))
    +
    5812/*
    +
    5813 * In XXH3_scalarRound(), GCC and Clang have a similar codegen issue, where they
    +
    5814 * emit an excess mask and a full 64-bit multiply-add (MADD X-form).
    +
    5815 *
    +
    5816 * While this might not seem like much, as AArch64 is a 64-bit architecture, only
    +
    5817 * big Cortex designs have a full 64-bit multiplier.
    +
    5818 *
    +
    5819 * On the little cores, the smaller 32-bit multiplier is used, and full 64-bit
    +
    5820 * multiplies expand to 2-3 multiplies in microcode. This has a major penalty
    +
    5821 * of up to 4 latency cycles and 2 stall cycles in the multiply pipeline.
    +
    5822 *
    +
    5823 * Thankfully, AArch64 still provides the 32-bit long multiply-add (UMADDL) which does
    +
    5824 * not have this penalty and does the mask automatically.
    +
    5825 */
    +
    5826XXH_FORCE_INLINE xxh_u64
    +
    5827XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc)
    +
    5828{
    +
    5829 xxh_u64 ret;
    +
    5830 /* note: %x = 64-bit register, %w = 32-bit register */
    +
    5831 __asm__("umaddl %x0, %w1, %w2, %x3" : "=r" (ret) : "r" (lhs), "r" (rhs), "r" (acc));
    +
    5832 return ret;
    +
    5833}
    +
    5834#else
    +
    5835XXH_FORCE_INLINE xxh_u64
    +
    5836XXH_mult32to64_add64(xxh_u64 lhs, xxh_u64 rhs, xxh_u64 acc)
    +
    5837{
    +
    5838 return XXH_mult32to64((xxh_u32)lhs, (xxh_u32)rhs) + acc;
    +
    5839}
    +
    5840#endif
    +
    5841
    +
    5849XXH_FORCE_INLINE void
    +
    5850XXH3_scalarRound(void* XXH_RESTRICT acc,
    +
    5851 void const* XXH_RESTRICT input,
    +
    5852 void const* XXH_RESTRICT secret,
    +
    5853 size_t lane)
    +
    5854{
    +
    5855 xxh_u64* xacc = (xxh_u64*) acc;
    +
    5856 xxh_u8 const* xinput = (xxh_u8 const*) input;
    +
    5857 xxh_u8 const* xsecret = (xxh_u8 const*) secret;
    +
    5858 XXH_ASSERT(lane < XXH_ACC_NB);
    +
    5859 XXH_ASSERT(((size_t)acc & (XXH_ACC_ALIGN-1)) == 0);
    +
    5860 {
    +
    5861 xxh_u64 const data_val = XXH_readLE64(xinput + lane * 8);
    +
    5862 xxh_u64 const data_key = data_val ^ XXH_readLE64(xsecret + lane * 8);
    +
    5863 xacc[lane ^ 1] += data_val; /* swap adjacent lanes */
    +
    5864 xacc[lane] = XXH_mult32to64_add64(data_key /* & 0xFFFFFFFF */, data_key >> 32, xacc[lane]);
    +
    5865 }
    +
    5866}
    +
    5867
    +
    5872XXH_FORCE_INLINE void
    +
    5873XXH3_accumulate_512_scalar(void* XXH_RESTRICT acc,
    +
    5874 const void* XXH_RESTRICT input,
    +
    5875 const void* XXH_RESTRICT secret)
    +
    5876{
    +
    5877 size_t i;
    +
    5878 /* ARM GCC refuses to unroll this loop, resulting in a 24% slowdown on ARMv6. */
    +
    5879#if defined(__GNUC__) && !defined(__clang__) \
    +
    5880 && (defined(__arm__) || defined(__thumb2__)) \
    +
    5881 && defined(__ARM_FEATURE_UNALIGNED) /* no unaligned access just wastes bytes */ \
    +
    5882 && XXH_SIZE_OPT <= 0
    +
    5883# pragma GCC unroll 8
    +
    5884#endif
    +
    5885 for (i=0; i < XXH_ACC_NB; i++) {
    +
    5886 XXH3_scalarRound(acc, input, secret, i);
    +
    5887 }
    +
    5888}
    +
    5889XXH_FORCE_INLINE XXH3_ACCUMULATE_TEMPLATE(scalar)
    +
    5890
    +
    5891
    +
    5898XXH_FORCE_INLINE void
    +
    5899XXH3_scalarScrambleRound(void* XXH_RESTRICT acc,
    +
    5900 void const* XXH_RESTRICT secret,
    +
    5901 size_t lane)
    +
    5902{
    +
    5903 xxh_u64* const xacc = (xxh_u64*) acc; /* presumed aligned */
    +
    5904 const xxh_u8* const xsecret = (const xxh_u8*) secret; /* no alignment restriction */
    +
    5905 XXH_ASSERT((((size_t)acc) & (XXH_ACC_ALIGN-1)) == 0);
    +
    5906 XXH_ASSERT(lane < XXH_ACC_NB);
    +
    5907 {
    +
    5908 xxh_u64 const key64 = XXH_readLE64(xsecret + lane * 8);
    +
    5909 xxh_u64 acc64 = xacc[lane];
    +
    5910 acc64 = XXH_xorshift64(acc64, 47);
    +
    5911 acc64 ^= key64;
    +
    5912 acc64 *= XXH_PRIME32_1;
    +
    5913 xacc[lane] = acc64;
    +
    5914 }
    +
    5915}
    +
    5916
    +
    5921XXH_FORCE_INLINE void
    +
    5922XXH3_scrambleAcc_scalar(void* XXH_RESTRICT acc, const void* XXH_RESTRICT secret)
    +
    5923{
    +
    5924 size_t i;
    +
    5925 for (i=0; i < XXH_ACC_NB; i++) {
    +
    5926 XXH3_scalarScrambleRound(acc, secret, i);
    +
    5927 }
    +
    5928}
    +
    5929
    +
    5930XXH_FORCE_INLINE void
    +
    5931XXH3_initCustomSecret_scalar(void* XXH_RESTRICT customSecret, xxh_u64 seed64)
    +
    5932{
    +
    5933 /*
    +
    5934 * We need a separate pointer for the hack below,
    +
    5935 * which requires a non-const pointer.
    +
    5936 * Any decent compiler will optimize this out otherwise.
    +
    5937 */
    +
    5938 const xxh_u8* kSecretPtr = XXH3_kSecret;
    +
    5939 XXH_STATIC_ASSERT((XXH_SECRET_DEFAULT_SIZE & 15) == 0);
    +
    5940
    +
    5941#if defined(__GNUC__) && defined(__aarch64__)
    +
    5942 /*
    +
    5943 * UGLY HACK:
    +
    5944 * GCC and Clang generate a bunch of MOV/MOVK pairs for aarch64, and they are
    +
    5945 * placed sequentially, in order, at the top of the unrolled loop.
    +
    5946 *
    +
    5947 * While MOVK is great for generating constants (2 cycles for a 64-bit
    +
    5948 * constant compared to 4 cycles for LDR), it fights for bandwidth with
    +
    5949 * the arithmetic instructions.
    +
    5950 *
    +
    5951 * I L S
    +
    5952 * MOVK
    +
    5953 * MOVK
    +
    5954 * MOVK
    +
    5955 * MOVK
    +
    5956 * ADD
    +
    5957 * SUB STR
    +
    5958 * STR
    +
    5959 * By forcing loads from memory (as the asm line causes the compiler to assume
    +
    5960 * that XXH3_kSecretPtr has been changed), the pipelines are used more
    +
    5961 * efficiently:
    +
    5962 * I L S
    +
    5963 * LDR
    +
    5964 * ADD LDR
    +
    5965 * SUB STR
    +
    5966 * STR
    +
    5967 *
    +
    5968 * See XXH3_NEON_LANES for details on the pipsline.
    +
    5969 *
    +
    5970 * XXH3_64bits_withSeed, len == 256, Snapdragon 835
    +
    5971 * without hack: 2654.4 MB/s
    +
    5972 * with hack: 3202.9 MB/s
    +
    5973 */
    +
    5974 XXH_COMPILER_GUARD(kSecretPtr);
    +
    5975#endif
    +
    5976 { int const nbRounds = XXH_SECRET_DEFAULT_SIZE / 16;
    +
    5977 int i;
    +
    5978 for (i=0; i < nbRounds; i++) {
    +
    5979 /*
    +
    5980 * The asm hack causes the compiler to assume that kSecretPtr aliases with
    +
    5981 * customSecret, and on aarch64, this prevented LDP from merging two
    +
    5982 * loads together for free. Putting the loads together before the stores
    +
    5983 * properly generates LDP.
    +
    5984 */
    +
    5985 xxh_u64 lo = XXH_readLE64(kSecretPtr + 16*i) + seed64;
    +
    5986 xxh_u64 hi = XXH_readLE64(kSecretPtr + 16*i + 8) - seed64;
    +
    5987 XXH_writeLE64((xxh_u8*)customSecret + 16*i, lo);
    +
    5988 XXH_writeLE64((xxh_u8*)customSecret + 16*i + 8, hi);
    +
    5989 } }
    +
    5990}
    +
    5991
    +
    5992
    +
    5993typedef void (*XXH3_f_accumulate)(xxh_u64* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, const xxh_u8* XXH_RESTRICT, size_t);
    +
    5994typedef void (*XXH3_f_scrambleAcc)(void* XXH_RESTRICT, const void*);
    +
    5995typedef void (*XXH3_f_initCustomSecret)(void* XXH_RESTRICT, xxh_u64);
    +
    5996
    +
    5997
    +
    5998#if (XXH_VECTOR == XXH_AVX512)
    +
    5999
    +
    6000#define XXH3_accumulate_512 XXH3_accumulate_512_avx512
    +
    6001#define XXH3_accumulate XXH3_accumulate_avx512
    +
    6002#define XXH3_scrambleAcc XXH3_scrambleAcc_avx512
    +
    6003#define XXH3_initCustomSecret XXH3_initCustomSecret_avx512
    +
    6004
    +
    6005#elif (XXH_VECTOR == XXH_AVX2)
    +
    6006
    +
    6007#define XXH3_accumulate_512 XXH3_accumulate_512_avx2
    +
    6008#define XXH3_accumulate XXH3_accumulate_avx2
    +
    6009#define XXH3_scrambleAcc XXH3_scrambleAcc_avx2
    +
    6010#define XXH3_initCustomSecret XXH3_initCustomSecret_avx2
    +
    6011
    +
    6012#elif (XXH_VECTOR == XXH_SSE2)
    +
    6013
    +
    6014#define XXH3_accumulate_512 XXH3_accumulate_512_sse2
    +
    6015#define XXH3_accumulate XXH3_accumulate_sse2
    +
    6016#define XXH3_scrambleAcc XXH3_scrambleAcc_sse2
    +
    6017#define XXH3_initCustomSecret XXH3_initCustomSecret_sse2
    +
    6018
    +
    6019#elif (XXH_VECTOR == XXH_NEON)
    +
    6020
    +
    6021#define XXH3_accumulate_512 XXH3_accumulate_512_neon
    +
    6022#define XXH3_accumulate XXH3_accumulate_neon
    +
    6023#define XXH3_scrambleAcc XXH3_scrambleAcc_neon
    +
    6024#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6025
    +
    6026#elif (XXH_VECTOR == XXH_VSX)
    +
    6027
    +
    6028#define XXH3_accumulate_512 XXH3_accumulate_512_vsx
    +
    6029#define XXH3_accumulate XXH3_accumulate_vsx
    +
    6030#define XXH3_scrambleAcc XXH3_scrambleAcc_vsx
    +
    6031#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6032
    +
    6033#elif (XXH_VECTOR == XXH_SVE)
    +
    6034#define XXH3_accumulate_512 XXH3_accumulate_512_sve
    +
    6035#define XXH3_accumulate XXH3_accumulate_sve
    +
    6036#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar
    +
    6037#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6038
    +
    6039#elif (XXH_VECTOR == XXH_LASX)
    +
    6040#define XXH3_accumulate_512 XXH3_accumulate_512_lasx
    +
    6041#define XXH3_accumulate XXH3_accumulate_lasx
    +
    6042#define XXH3_scrambleAcc XXH3_scrambleAcc_lasx
    +
    6043#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6044
    +
    6045#elif (XXH_VECTOR == XXH_LSX)
    +
    6046#define XXH3_accumulate_512 XXH3_accumulate_512_lsx
    +
    6047#define XXH3_accumulate XXH3_accumulate_lsx
    +
    6048#define XXH3_scrambleAcc XXH3_scrambleAcc_lsx
    +
    6049#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6050
    +
    6051#else /* scalar */
    +
    6052
    +
    6053#define XXH3_accumulate_512 XXH3_accumulate_512_scalar
    +
    6054#define XXH3_accumulate XXH3_accumulate_scalar
    +
    6055#define XXH3_scrambleAcc XXH3_scrambleAcc_scalar
    +
    6056#define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6057
    +
    6058#endif
    +
    6059
    +
    6060#if XXH_SIZE_OPT >= 1 /* don't do SIMD for initialization */
    +
    6061# undef XXH3_initCustomSecret
    +
    6062# define XXH3_initCustomSecret XXH3_initCustomSecret_scalar
    +
    6063#endif
    +
    6064
    +
    6065XXH_FORCE_INLINE void
    +
    6066XXH3_hashLong_internal_loop(xxh_u64* XXH_RESTRICT acc,
    +
    6067 const xxh_u8* XXH_RESTRICT input, size_t len,
    +
    6068 const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
    +
    6069 XXH3_f_accumulate f_acc,
    +
    6070 XXH3_f_scrambleAcc f_scramble)
    +
    6071{
    +
    6072 size_t const nbStripesPerBlock = (secretSize - XXH_STRIPE_LEN) / XXH_SECRET_CONSUME_RATE;
    +
    6073 size_t const block_len = XXH_STRIPE_LEN * nbStripesPerBlock;
    +
    6074 size_t const nb_blocks = (len - 1) / block_len;
    +
    6075
    +
    6076 size_t n;
    +
    6077
    +
    6078 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);
    +
    6079
    +
    6080 for (n = 0; n < nb_blocks; n++) {
    +
    6081 f_acc(acc, input + n*block_len, secret, nbStripesPerBlock);
    +
    6082 f_scramble(acc, secret + secretSize - XXH_STRIPE_LEN);
    +
    6083 }
    +
    6084
    +
    6085 /* last partial block */
    +
    6086 XXH_ASSERT(len > XXH_STRIPE_LEN);
    +
    6087 { size_t const nbStripes = ((len - 1) - (block_len * nb_blocks)) / XXH_STRIPE_LEN;
    +
    6088 XXH_ASSERT(nbStripes <= (secretSize / XXH_SECRET_CONSUME_RATE));
    +
    6089 f_acc(acc, input + nb_blocks*block_len, secret, nbStripes);
    +
    6090
    +
    6091 /* last stripe */
    +
    6092 { const xxh_u8* const p = input + len - XXH_STRIPE_LEN;
    +
    6093#define XXH_SECRET_LASTACC_START 7 /* not aligned on 8, last secret is different from acc & scrambler */
    +
    6094 XXH3_accumulate_512(acc, p, secret + secretSize - XXH_STRIPE_LEN - XXH_SECRET_LASTACC_START);
    +
    6095 } }
    +
    6096}
    +
    6097
    +
    6098XXH_FORCE_INLINE xxh_u64
    +
    6099XXH3_mix2Accs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret)
    +
    6100{
    +
    6101 return XXH3_mul128_fold64(
    +
    6102 acc[0] ^ XXH_readLE64(secret),
    +
    6103 acc[1] ^ XXH_readLE64(secret+8) );
    +
    6104}
    +
    6105
    +
    6106static XXH_PUREF XXH64_hash_t
    +
    6107XXH3_mergeAccs(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 start)
    +
    6108{
    +
    6109 xxh_u64 result64 = start;
    +
    6110 size_t i = 0;
    +
    6111
    +
    6112 for (i = 0; i < 4; i++) {
    +
    6113 result64 += XXH3_mix2Accs(acc+2*i, secret + 16*i);
    +
    6114#if defined(__clang__) /* Clang */ \
    +
    6115 && (defined(__arm__) || defined(__thumb__)) /* ARMv7 */ \
    +
    6116 && (defined(__ARM_NEON) || defined(__ARM_NEON__)) /* NEON */ \
    +
    6117 && !defined(XXH_ENABLE_AUTOVECTORIZE) /* Define to disable */
    +
    6118 /*
    +
    6119 * UGLY HACK:
    +
    6120 * Prevent autovectorization on Clang ARMv7-a. Exact same problem as
    +
    6121 * the one in XXH3_len_129to240_64b. Speeds up shorter keys > 240b.
    +
    6122 * XXH3_64bits, len == 256, Snapdragon 835:
    +
    6123 * without hack: 2063.7 MB/s
    +
    6124 * with hack: 2560.7 MB/s
    +
    6125 */
    +
    6126 XXH_COMPILER_GUARD(result64);
    +
    6127#endif
    +
    6128 }
    +
    6129
    +
    6130 return XXH3_avalanche(result64);
    +
    6131}
    +
    6132
    +
    6133/* do not align on 8, so that the secret is different from the accumulator */
    +
    6134#define XXH_SECRET_MERGEACCS_START 11
    +
    6135
    +
    6136static XXH_PUREF XXH64_hash_t
    +
    6137XXH3_finalizeLong_64b(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, xxh_u64 len)
    +
    6138{
    +
    6139 return XXH3_mergeAccs(acc, secret + XXH_SECRET_MERGEACCS_START, len * XXH_PRIME64_1);
    +
    6140}
    +
    6141
    +
    6142#define XXH3_INIT_ACC { XXH_PRIME32_3, XXH_PRIME64_1, XXH_PRIME64_2, XXH_PRIME64_3, \
    +
    6143 XXH_PRIME64_4, XXH_PRIME32_2, XXH_PRIME64_5, XXH_PRIME32_1 }
    +
    6144
    +
    6145XXH_FORCE_INLINE XXH64_hash_t
    +
    6146XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len,
    +
    6147 const void* XXH_RESTRICT secret, size_t secretSize,
    +
    6148 XXH3_f_accumulate f_acc,
    +
    6149 XXH3_f_scrambleAcc f_scramble)
    +
    6150{
    +
    6151 XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;
    +
    6152
    +
    6153 XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, (const xxh_u8*)secret, secretSize, f_acc, f_scramble);
    +
    6154
    +
    6155 /* converge into final hash */
    +
    6156 XXH_STATIC_ASSERT(sizeof(acc) == 64);
    +
    6157 XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START);
    +
    6158 return XXH3_finalizeLong_64b(acc, (const xxh_u8*)secret, (xxh_u64)len);
    +
    6159}
    +
    6160
    +
    6161/*
    +
    6162 * It's important for performance to transmit secret's size (when it's static)
    +
    6163 * so that the compiler can properly optimize the vectorized loop.
    +
    6164 * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set.
    +
    6165 * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE
    +
    6166 * breaks -Og, this is XXH_NO_INLINE.
    +
    6167 */
    +
    6168XXH3_WITH_SECRET_INLINE XXH64_hash_t
    +
    6169XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len,
    +
    6170 XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
    +
    6171{
    +
    6172 (void)seed64;
    +
    6173 return XXH3_hashLong_64b_internal(input, len, secret, secretLen, XXH3_accumulate, XXH3_scrambleAcc);
    +
    6174}
    +
    6175
    +
    6176/*
    +
    6177 * It's preferable for performance that XXH3_hashLong is not inlined,
    +
    6178 * as it results in a smaller function for small data, easier to the instruction cache.
    +
    6179 * Note that inside this no_inline function, we do inline the internal loop,
    +
    6180 * and provide a statically defined secret size to allow optimization of vector loop.
    +
    6181 */
    +
    6182XXH_NO_INLINE XXH_PUREF XXH64_hash_t
    +
    6183XXH3_hashLong_64b_default(const void* XXH_RESTRICT input, size_t len,
    +
    6184 XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
    +
    6185{
    +
    6186 (void)seed64; (void)secret; (void)secretLen;
    +
    6187 return XXH3_hashLong_64b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_accumulate, XXH3_scrambleAcc);
    +
    6188}
    +
    6189
    +
    6190/*
    +
    6191 * XXH3_hashLong_64b_withSeed():
    +
    6192 * Generate a custom key based on alteration of default XXH3_kSecret with the seed,
    +
    6193 * and then use this key for long mode hashing.
    +
    6194 *
    +
    6195 * This operation is decently fast but nonetheless costs a little bit of time.
    +
    6196 * Try to avoid it whenever possible (typically when seed==0).
    +
    6197 *
    +
    6198 * It's important for performance that XXH3_hashLong is not inlined. Not sure
    +
    6199 * why (uop cache maybe?), but the difference is large and easily measurable.
    +
    6200 */
    +
    6201XXH_FORCE_INLINE XXH64_hash_t
    +
    6202XXH3_hashLong_64b_withSeed_internal(const void* input, size_t len,
    +
    6203 XXH64_hash_t seed,
    +
    6204 XXH3_f_accumulate f_acc,
    +
    6205 XXH3_f_scrambleAcc f_scramble,
    +
    6206 XXH3_f_initCustomSecret f_initSec)
    +
    6207{
    +
    6208#if XXH_SIZE_OPT <= 0
    +
    6209 if (seed == 0)
    +
    6210 return XXH3_hashLong_64b_internal(input, len,
    +
    6211 XXH3_kSecret, sizeof(XXH3_kSecret),
    +
    6212 f_acc, f_scramble);
    +
    6213#endif
    +
    6214 { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];
    +
    6215 f_initSec(secret, seed);
    +
    6216 return XXH3_hashLong_64b_internal(input, len, secret, sizeof(secret),
    +
    6217 f_acc, f_scramble);
    +
    6218 }
    +
    6219}
    +
    6220
    +
    6221/*
    +
    6222 * It's important for performance that XXH3_hashLong is not inlined.
    +
    6223 */
    +
    6224XXH_NO_INLINE XXH64_hash_t
    +
    6225XXH3_hashLong_64b_withSeed(const void* XXH_RESTRICT input, size_t len,
    +
    6226 XXH64_hash_t seed, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
    +
    6227{
    +
    6228 (void)secret; (void)secretLen;
    +
    6229 return XXH3_hashLong_64b_withSeed_internal(input, len, seed,
    +
    6230 XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret);
    +
    6231}
    +
    6232
    +
    6233
    +
    6234typedef XXH64_hash_t (*XXH3_hashLong64_f)(const void* XXH_RESTRICT, size_t,
    +
    6235 XXH64_hash_t, const xxh_u8* XXH_RESTRICT, size_t);
    +
    6236
    +
    6237XXH_FORCE_INLINE XXH64_hash_t
    +
    6238XXH3_64bits_internal(const void* XXH_RESTRICT input, size_t len,
    +
    6239 XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen,
    +
    6240 XXH3_hashLong64_f f_hashLong)
    +
    6241{
    +
    6242 XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN);
    +
    6243 /*
    +
    6244 * If an action is to be taken if `secretLen` condition is not respected,
    +
    6245 * it should be done here.
    +
    6246 * For now, it's a contract pre-condition.
    +
    6247 * Adding a check and a branch here would cost performance at every hash.
    +
    6248 * Also, note that function signature doesn't offer room to return an error.
    +
    6249 */
    +
    6250 if (len <= 16)
    +
    6251 return XXH3_len_0to16_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64);
    +
    6252 if (len <= 128)
    +
    6253 return XXH3_len_17to128_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
    +
    6254 if (len <= XXH3_MIDSIZE_MAX)
    +
    6255 return XXH3_len_129to240_64b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
    +
    6256 return f_hashLong(input, len, seed64, (const xxh_u8*)secret, secretLen);
    +
    6257}
    +
    6258
    +
    6259
    +
    6260/* === Public entry point === */
    +
    6261
    +
    +
    6263XXH_PUBLIC_API XXH64_hash_t XXH3_64bits(XXH_NOESCAPE const void* input, size_t length)
    +
    6264{
    +
    6265 return XXH3_64bits_internal(input, length, 0, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_default);
    +
    6266}
    +
    +
    6267
    + +
    +
    6270XXH3_64bits_withSecret(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize)
    +
    6271{
    +
    6272 return XXH3_64bits_internal(input, length, 0, secret, secretSize, XXH3_hashLong_64b_withSecret);
    +
    6273}
    +
    +
    6274
    + +
    +
    6277XXH3_64bits_withSeed(XXH_NOESCAPE const void* input, size_t length, XXH64_hash_t seed)
    +
    6278{
    +
    6279 return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), XXH3_hashLong_64b_withSeed);
    +
    6280}
    +
    +
    6281
    + +
    +
    6283XXH3_64bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t length, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
    +
    6284{
    +
    6285 if (length <= XXH3_MIDSIZE_MAX)
    +
    6286 return XXH3_64bits_internal(input, length, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);
    +
    6287 return XXH3_hashLong_64b_withSecret(input, length, seed, (const xxh_u8*)secret, secretSize);
    +
    6288}
    +
    +
    6289
    +
    6290
    +
    6291/* === XXH3 streaming === */
    +
    6292#ifndef XXH_NO_STREAM
    +
    6293/*
    +
    6294 * Malloc's a pointer that is always aligned to @align.
    +
    6295 *
    +
    6296 * This must be freed with `XXH_alignedFree()`.
    +
    6297 *
    +
    6298 * malloc typically guarantees 16 byte alignment on 64-bit systems and 8 byte
    +
    6299 * alignment on 32-bit. This isn't enough for the 32 byte aligned loads in AVX2
    +
    6300 * or on 32-bit, the 16 byte aligned loads in SSE2 and NEON.
    +
    6301 *
    +
    6302 * This underalignment previously caused a rather obvious crash which went
    +
    6303 * completely unnoticed due to XXH3_createState() not actually being tested.
    +
    6304 * Credit to RedSpah for noticing this bug.
    +
    6305 *
    +
    6306 * The alignment is done manually: Functions like posix_memalign or _mm_malloc
    +
    6307 * are avoided: To maintain portability, we would have to write a fallback
    +
    6308 * like this anyways, and besides, testing for the existence of library
    +
    6309 * functions without relying on external build tools is impossible.
    +
    6310 *
    +
    6311 * The method is simple: Overallocate, manually align, and store the offset
    +
    6312 * to the original behind the returned pointer.
    +
    6313 *
    +
    6314 * Align must be a power of 2 and 8 <= align <= 128.
    +
    6315 */
    +
    6316static XXH_MALLOCF void* XXH_alignedMalloc(size_t s, size_t align)
    +
    6317{
    +
    6318 XXH_ASSERT(align <= 128 && align >= 8); /* range check */
    +
    6319 XXH_ASSERT((align & (align-1)) == 0); /* power of 2 */
    +
    6320 XXH_ASSERT(s != 0 && s < (s + align)); /* empty/overflow */
    +
    6321 { /* Overallocate to make room for manual realignment and an offset byte */
    +
    6322 xxh_u8* base = (xxh_u8*)XXH_malloc(s + align);
    +
    6323 if (base != NULL) {
    +
    6324 /*
    +
    6325 * Get the offset needed to align this pointer.
    +
    6326 *
    +
    6327 * Even if the returned pointer is aligned, there will always be
    +
    6328 * at least one byte to store the offset to the original pointer.
    +
    6329 */
    +
    6330 size_t offset = align - ((size_t)base & (align - 1)); /* base % align */
    +
    6331 /* Add the offset for the now-aligned pointer */
    +
    6332 xxh_u8* ptr = base + offset;
    +
    6333
    +
    6334 XXH_ASSERT((size_t)ptr % align == 0);
    +
    6335
    +
    6336 /* Store the offset immediately before the returned pointer. */
    +
    6337 ptr[-1] = (xxh_u8)offset;
    +
    6338 return ptr;
    +
    6339 }
    +
    6340 return NULL;
    +
    6341 }
    +
    6342}
    +
    6343/*
    +
    6344 * Frees an aligned pointer allocated by XXH_alignedMalloc(). Don't pass
    +
    6345 * normal malloc'd pointers, XXH_alignedMalloc has a specific data layout.
    +
    6346 */
    +
    6347static void XXH_alignedFree(void* p)
    +
    6348{
    +
    6349 if (p != NULL) {
    +
    6350 xxh_u8* ptr = (xxh_u8*)p;
    +
    6351 /* Get the offset byte we added in XXH_malloc. */
    +
    6352 xxh_u8 offset = ptr[-1];
    +
    6353 /* Free the original malloc'd pointer */
    +
    6354 xxh_u8* base = ptr - offset;
    +
    6355 XXH_free(base);
    +
    6356 }
    +
    6357}
    +
    + +
    6370{
    +
    6371 XXH3_state_t* const state = (XXH3_state_t*)XXH_alignedMalloc(sizeof(XXH3_state_t), 64);
    +
    6372 if (state==NULL) return NULL;
    +
    6373 XXH3_INITSTATE(state);
    +
    6374 return state;
    +
    6375}
    +
    +
    6376
    +
    + +
    6390{
    +
    6391 XXH_alignedFree(statePtr);
    +
    6392 return XXH_OK;
    +
    6393}
    +
    +
    6394
    +
    6396XXH_PUBLIC_API void
    +
    +
    6397XXH3_copyState(XXH_NOESCAPE XXH3_state_t* dst_state, XXH_NOESCAPE const XXH3_state_t* src_state)
    +
    6398{
    +
    6399 XXH_memcpy(dst_state, src_state, sizeof(*dst_state));
    +
    6400}
    +
    +
    6401
    +
    6402static void
    +
    6403XXH3_reset_internal(XXH3_state_t* statePtr,
    +
    6404 XXH64_hash_t seed,
    +
    6405 const void* secret, size_t secretSize)
    +
    6406{
    +
    6407 size_t const initStart = offsetof(XXH3_state_t, bufferedSize);
    +
    6408 size_t const initLength = offsetof(XXH3_state_t, nbStripesPerBlock) - initStart;
    +
    6409 XXH_ASSERT(offsetof(XXH3_state_t, nbStripesPerBlock) > initStart);
    +
    6410 XXH_ASSERT(statePtr != NULL);
    +
    6411 /* set members from bufferedSize to nbStripesPerBlock (excluded) to 0 */
    +
    6412 memset((char*)statePtr + initStart, 0, initLength);
    +
    6413 statePtr->acc[0] = XXH_PRIME32_3;
    +
    6414 statePtr->acc[1] = XXH_PRIME64_1;
    +
    6415 statePtr->acc[2] = XXH_PRIME64_2;
    +
    6416 statePtr->acc[3] = XXH_PRIME64_3;
    +
    6417 statePtr->acc[4] = XXH_PRIME64_4;
    +
    6418 statePtr->acc[5] = XXH_PRIME32_2;
    +
    6419 statePtr->acc[6] = XXH_PRIME64_5;
    +
    6420 statePtr->acc[7] = XXH_PRIME32_1;
    +
    6421 statePtr->seed = seed;
    +
    6422 statePtr->useSeed = (seed != 0);
    +
    6423 statePtr->extSecret = (const unsigned char*)secret;
    +
    6424 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);
    +
    6425 statePtr->secretLimit = secretSize - XXH_STRIPE_LEN;
    +
    6426 statePtr->nbStripesPerBlock = statePtr->secretLimit / XXH_SECRET_CONSUME_RATE;
    +
    6427}
    +
    6428
    + +
    +
    6431XXH3_64bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr)
    +
    6432{
    +
    6433 if (statePtr == NULL) return XXH_ERROR;
    +
    6434 XXH3_reset_internal(statePtr, 0, XXH3_kSecret, XXH_SECRET_DEFAULT_SIZE);
    +
    6435 return XXH_OK;
    +
    6436}
    +
    +
    6437
    + +
    +
    6440XXH3_64bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize)
    +
    6441{
    +
    6442 if (statePtr == NULL) return XXH_ERROR;
    +
    6443 XXH3_reset_internal(statePtr, 0, secret, secretSize);
    +
    6444 if (secret == NULL) return XXH_ERROR;
    +
    6445 if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;
    +
    6446 return XXH_OK;
    +
    6447}
    +
    +
    6448
    + +
    + +
    6452{
    +
    6453 if (statePtr == NULL) return XXH_ERROR;
    +
    6454 if (seed==0) return XXH3_64bits_reset(statePtr);
    +
    6455 if ((seed != statePtr->seed) || (statePtr->extSecret != NULL))
    +
    6456 XXH3_initCustomSecret(statePtr->customSecret, seed);
    +
    6457 XXH3_reset_internal(statePtr, seed, NULL, XXH_SECRET_DEFAULT_SIZE);
    +
    6458 return XXH_OK;
    +
    6459}
    +
    +
    6460
    + +
    +
    6463XXH3_64bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed64)
    +
    6464{
    +
    6465 if (statePtr == NULL) return XXH_ERROR;
    +
    6466 if (secret == NULL) return XXH_ERROR;
    +
    6467 if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;
    +
    6468 XXH3_reset_internal(statePtr, seed64, secret, secretSize);
    +
    6469 statePtr->useSeed = 1; /* always, even if seed64==0 */
    +
    6470 return XXH_OK;
    +
    6471}
    +
    +
    6472
    +
    6490XXH_FORCE_INLINE const xxh_u8 *
    +
    6491XXH3_consumeStripes(xxh_u64* XXH_RESTRICT acc,
    +
    6492 size_t* XXH_RESTRICT nbStripesSoFarPtr, size_t nbStripesPerBlock,
    +
    6493 const xxh_u8* XXH_RESTRICT input, size_t nbStripes,
    +
    6494 const xxh_u8* XXH_RESTRICT secret, size_t secretLimit,
    +
    6495 XXH3_f_accumulate f_acc,
    +
    6496 XXH3_f_scrambleAcc f_scramble)
    +
    6497{
    +
    6498 const xxh_u8* initialSecret = secret + *nbStripesSoFarPtr * XXH_SECRET_CONSUME_RATE;
    +
    6499 /* Process full blocks */
    +
    6500 if (nbStripes >= (nbStripesPerBlock - *nbStripesSoFarPtr)) {
    +
    6501 /* Process the initial partial block... */
    +
    6502 size_t nbStripesThisIter = nbStripesPerBlock - *nbStripesSoFarPtr;
    +
    6503
    +
    6504 do {
    +
    6505 /* Accumulate and scramble */
    +
    6506 f_acc(acc, input, initialSecret, nbStripesThisIter);
    +
    6507 f_scramble(acc, secret + secretLimit);
    +
    6508 input += nbStripesThisIter * XXH_STRIPE_LEN;
    +
    6509 nbStripes -= nbStripesThisIter;
    +
    6510 /* Then continue the loop with the full block size */
    +
    6511 nbStripesThisIter = nbStripesPerBlock;
    +
    6512 initialSecret = secret;
    +
    6513 } while (nbStripes >= nbStripesPerBlock);
    +
    6514 *nbStripesSoFarPtr = 0;
    +
    6515 }
    +
    6516 /* Process a partial block */
    +
    6517 if (nbStripes > 0) {
    +
    6518 f_acc(acc, input, initialSecret, nbStripes);
    +
    6519 input += nbStripes * XXH_STRIPE_LEN;
    +
    6520 *nbStripesSoFarPtr += nbStripes;
    +
    6521 }
    +
    6522 /* Return end pointer */
    +
    6523 return input;
    +
    6524}
    +
    6525
    +
    6526#ifndef XXH3_STREAM_USE_STACK
    +
    6527# if XXH_SIZE_OPT <= 0 && !defined(__clang__) /* clang doesn't need additional stack space */
    +
    6528# define XXH3_STREAM_USE_STACK 1
    +
    6529# endif
    +
    6530#endif
    +
    6531/*
    +
    6532 * Both XXH3_64bits_update and XXH3_128bits_update use this routine.
    +
    6533 */
    +
    6534XXH_FORCE_INLINE XXH_errorcode
    +
    6535XXH3_update(XXH3_state_t* XXH_RESTRICT const state,
    +
    6536 const xxh_u8* XXH_RESTRICT input, size_t len,
    +
    6537 XXH3_f_accumulate f_acc,
    +
    6538 XXH3_f_scrambleAcc f_scramble)
    +
    6539{
    +
    6540 if (input==NULL) {
    +
    6541 XXH_ASSERT(len == 0);
    +
    6542 return XXH_OK;
    +
    6543 }
    +
    6544
    +
    6545 XXH_ASSERT(state != NULL);
    +
    6546 { const xxh_u8* const bEnd = input + len;
    +
    6547 const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;
    +
    6548#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1
    +
    6549 /* For some reason, gcc and MSVC seem to suffer greatly
    +
    6550 * when operating accumulators directly into state.
    +
    6551 * Operating into stack space seems to enable proper optimization.
    +
    6552 * clang, on the other hand, doesn't seem to need this trick */
    +
    6553 XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[8];
    +
    6554 XXH_memcpy(acc, state->acc, sizeof(acc));
    +
    6555#else
    +
    6556 xxh_u64* XXH_RESTRICT const acc = state->acc;
    +
    6557#endif
    +
    6558 state->totalLen += len;
    +
    6559 XXH_ASSERT(state->bufferedSize <= XXH3_INTERNALBUFFER_SIZE);
    +
    6560
    +
    6561 /* small input : just fill in tmp buffer */
    +
    6562 if (len <= XXH3_INTERNALBUFFER_SIZE - state->bufferedSize) {
    +
    6563 XXH_memcpy(state->buffer + state->bufferedSize, input, len);
    +
    6564 state->bufferedSize += (XXH32_hash_t)len;
    +
    6565 return XXH_OK;
    +
    6566 }
    +
    6567
    +
    6568 /* total input is now > XXH3_INTERNALBUFFER_SIZE */
    +
    6569 #define XXH3_INTERNALBUFFER_STRIPES (XXH3_INTERNALBUFFER_SIZE / XXH_STRIPE_LEN)
    +
    6570 XXH_STATIC_ASSERT(XXH3_INTERNALBUFFER_SIZE % XXH_STRIPE_LEN == 0); /* clean multiple */
    +
    6571
    +
    6572 /*
    +
    6573 * Internal buffer is partially filled (always, except at beginning)
    +
    6574 * Complete it, then consume it.
    +
    6575 */
    +
    6576 if (state->bufferedSize) {
    +
    6577 size_t const loadSize = XXH3_INTERNALBUFFER_SIZE - state->bufferedSize;
    +
    6578 XXH_memcpy(state->buffer + state->bufferedSize, input, loadSize);
    +
    6579 input += loadSize;
    +
    6580 XXH3_consumeStripes(acc,
    +
    6581 &state->nbStripesSoFar, state->nbStripesPerBlock,
    +
    6582 state->buffer, XXH3_INTERNALBUFFER_STRIPES,
    +
    6583 secret, state->secretLimit,
    +
    6584 f_acc, f_scramble);
    +
    6585 state->bufferedSize = 0;
    +
    6586 }
    +
    6587 XXH_ASSERT(input < bEnd);
    +
    6588 if (bEnd - input > XXH3_INTERNALBUFFER_SIZE) {
    +
    6589 size_t nbStripes = (size_t)(bEnd - 1 - input) / XXH_STRIPE_LEN;
    +
    6590 input = XXH3_consumeStripes(acc,
    +
    6591 &state->nbStripesSoFar, state->nbStripesPerBlock,
    +
    6592 input, nbStripes,
    +
    6593 secret, state->secretLimit,
    +
    6594 f_acc, f_scramble);
    +
    6595 XXH_memcpy(state->buffer + sizeof(state->buffer) - XXH_STRIPE_LEN, input - XXH_STRIPE_LEN, XXH_STRIPE_LEN);
    +
    6596
    +
    6597 }
    +
    6598 /* Some remaining input (always) : buffer it */
    +
    6599 XXH_ASSERT(input < bEnd);
    +
    6600 XXH_ASSERT(bEnd - input <= XXH3_INTERNALBUFFER_SIZE);
    +
    6601 XXH_ASSERT(state->bufferedSize == 0);
    +
    6602 XXH_memcpy(state->buffer, input, (size_t)(bEnd-input));
    +
    6603 state->bufferedSize = (XXH32_hash_t)(bEnd-input);
    +
    6604#if defined(XXH3_STREAM_USE_STACK) && XXH3_STREAM_USE_STACK >= 1
    +
    6605 /* save stack accumulators into state */
    +
    6606 XXH_memcpy(state->acc, acc, sizeof(acc));
    +
    6607#endif
    +
    6608 }
    +
    6609
    +
    6610 return XXH_OK;
    +
    6611}
    +
    6612
    + +
    +
    6615XXH3_64bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)
    +
    6616{
    +
    6617 return XXH3_update(state, (const xxh_u8*)input, len,
    +
    6618 XXH3_accumulate, XXH3_scrambleAcc);
    +
    6619}
    +
    +
    6620
    +
    6621
    +
    6622XXH_FORCE_INLINE void
    +
    6623XXH3_digest_long (XXH64_hash_t* acc,
    +
    6624 const XXH3_state_t* state,
    +
    6625 const unsigned char* secret)
    +
    6626{
    +
    6627 xxh_u8 lastStripe[XXH_STRIPE_LEN];
    +
    6628 const xxh_u8* lastStripePtr;
    +
    6629
    +
    6630 /*
    +
    6631 * Digest on a local copy. This way, the state remains unaltered, and it can
    +
    6632 * continue ingesting more input afterwards.
    +
    6633 */
    +
    6634 XXH_memcpy(acc, state->acc, sizeof(state->acc));
    +
    6635 if (state->bufferedSize >= XXH_STRIPE_LEN) {
    +
    6636 /* Consume remaining stripes then point to remaining data in buffer */
    +
    6637 size_t const nbStripes = (state->bufferedSize - 1) / XXH_STRIPE_LEN;
    +
    6638 size_t nbStripesSoFar = state->nbStripesSoFar;
    +
    6639 XXH3_consumeStripes(acc,
    +
    6640 &nbStripesSoFar, state->nbStripesPerBlock,
    +
    6641 state->buffer, nbStripes,
    +
    6642 secret, state->secretLimit,
    +
    6643 XXH3_accumulate, XXH3_scrambleAcc);
    +
    6644 lastStripePtr = state->buffer + state->bufferedSize - XXH_STRIPE_LEN;
    +
    6645 } else { /* bufferedSize < XXH_STRIPE_LEN */
    +
    6646 /* Copy to temp buffer */
    +
    6647 size_t const catchupSize = XXH_STRIPE_LEN - state->bufferedSize;
    +
    6648 XXH_ASSERT(state->bufferedSize > 0); /* there is always some input buffered */
    +
    6649 XXH_memcpy(lastStripe, state->buffer + sizeof(state->buffer) - catchupSize, catchupSize);
    +
    6650 XXH_memcpy(lastStripe + catchupSize, state->buffer, state->bufferedSize);
    +
    6651 lastStripePtr = lastStripe;
    +
    6652 }
    +
    6653 /* Last stripe */
    +
    6654 XXH3_accumulate_512(acc,
    +
    6655 lastStripePtr,
    +
    6656 secret + state->secretLimit - XXH_SECRET_LASTACC_START);
    +
    6657}
    +
    6658
    +
    + +
    6661{
    +
    6662 const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;
    +
    6663 if (state->totalLen > XXH3_MIDSIZE_MAX) {
    +
    6664 XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB];
    +
    6665 XXH3_digest_long(acc, state, secret);
    +
    6666 return XXH3_finalizeLong_64b(acc, secret, (xxh_u64)state->totalLen);
    +
    6667 }
    +
    6668 /* totalLen <= XXH3_MIDSIZE_MAX: digesting a short input */
    +
    6669 if (state->useSeed)
    +
    6670 return XXH3_64bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed);
    +
    6671 return XXH3_64bits_withSecret(state->buffer, (size_t)(state->totalLen),
    +
    6672 secret, state->secretLimit + XXH_STRIPE_LEN);
    +
    6673}
    +
    +
    6674#endif /* !XXH_NO_STREAM */
    +
    6675
    +
    6676
    +
    6677/* ==========================================
    +
    6678 * XXH3 128 bits (a.k.a XXH128)
    +
    6679 * ==========================================
    +
    6680 * XXH3's 128-bit variant has better mixing and strength than the 64-bit variant,
    +
    6681 * even without counting the significantly larger output size.
    +
    6682 *
    +
    6683 * For example, extra steps are taken to avoid the seed-dependent collisions
    +
    6684 * in 17-240 byte inputs (See XXH3_mix16B and XXH128_mix32B).
    +
    6685 *
    +
    6686 * This strength naturally comes at the cost of some speed, especially on short
    +
    6687 * lengths. Note that longer hashes are about as fast as the 64-bit version
    +
    6688 * due to it using only a slight modification of the 64-bit loop.
    +
    6689 *
    +
    6690 * XXH128 is also more oriented towards 64-bit machines. It is still extremely
    +
    6691 * fast for a _128-bit_ hash on 32-bit (it usually clears XXH64).
    +
    6692 */
    +
    6693
    +
    6694XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
    +
    6695XXH3_len_1to3_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    6696{
    +
    6697 /* A doubled version of 1to3_64b with different constants. */
    +
    6698 XXH_ASSERT(input != NULL);
    +
    6699 XXH_ASSERT(1 <= len && len <= 3);
    +
    6700 XXH_ASSERT(secret != NULL);
    +
    6701 /*
    +
    6702 * len = 1: combinedl = { input[0], 0x01, input[0], input[0] }
    +
    6703 * len = 2: combinedl = { input[1], 0x02, input[0], input[1] }
    +
    6704 * len = 3: combinedl = { input[2], 0x03, input[0], input[1] }
    +
    6705 */
    +
    6706 { xxh_u8 const c1 = input[0];
    +
    6707 xxh_u8 const c2 = input[len >> 1];
    +
    6708 xxh_u8 const c3 = input[len - 1];
    +
    6709 xxh_u32 const combinedl = ((xxh_u32)c1 <<16) | ((xxh_u32)c2 << 24)
    +
    6710 | ((xxh_u32)c3 << 0) | ((xxh_u32)len << 8);
    +
    6711 xxh_u32 const combinedh = XXH_rotl32(XXH_swap32(combinedl), 13);
    +
    6712 xxh_u64 const bitflipl = (XXH_readLE32(secret) ^ XXH_readLE32(secret+4)) + seed;
    +
    6713 xxh_u64 const bitfliph = (XXH_readLE32(secret+8) ^ XXH_readLE32(secret+12)) - seed;
    +
    6714 xxh_u64 const keyed_lo = (xxh_u64)combinedl ^ bitflipl;
    +
    6715 xxh_u64 const keyed_hi = (xxh_u64)combinedh ^ bitfliph;
    +
    6716 XXH128_hash_t h128;
    +
    6717 h128.low64 = XXH64_avalanche(keyed_lo);
    +
    6718 h128.high64 = XXH64_avalanche(keyed_hi);
    +
    6719 return h128;
    +
    6720 }
    +
    6721}
    +
    6722
    +
    6723XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
    +
    6724XXH3_len_4to8_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    6725{
    +
    6726 XXH_ASSERT(input != NULL);
    +
    6727 XXH_ASSERT(secret != NULL);
    +
    6728 XXH_ASSERT(4 <= len && len <= 8);
    +
    6729 seed ^= (xxh_u64)XXH_swap32((xxh_u32)seed) << 32;
    +
    6730 { xxh_u32 const input_lo = XXH_readLE32(input);
    +
    6731 xxh_u32 const input_hi = XXH_readLE32(input + len - 4);
    +
    6732 xxh_u64 const input_64 = input_lo + ((xxh_u64)input_hi << 32);
    +
    6733 xxh_u64 const bitflip = (XXH_readLE64(secret+16) ^ XXH_readLE64(secret+24)) + seed;
    +
    6734 xxh_u64 const keyed = input_64 ^ bitflip;
    +
    6735
    +
    6736 /* Shift len to the left to ensure it is even, this avoids even multiplies. */
    +
    6737 XXH128_hash_t m128 = XXH_mult64to128(keyed, XXH_PRIME64_1 + (len << 2));
    +
    6738
    +
    6739 m128.high64 += (m128.low64 << 1);
    +
    6740 m128.low64 ^= (m128.high64 >> 3);
    +
    6741
    +
    6742 m128.low64 = XXH_xorshift64(m128.low64, 35);
    +
    6743 m128.low64 *= PRIME_MX2;
    +
    6744 m128.low64 = XXH_xorshift64(m128.low64, 28);
    +
    6745 m128.high64 = XXH3_avalanche(m128.high64);
    +
    6746 return m128;
    +
    6747 }
    +
    6748}
    +
    6749
    +
    6750XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
    +
    6751XXH3_len_9to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    6752{
    +
    6753 XXH_ASSERT(input != NULL);
    +
    6754 XXH_ASSERT(secret != NULL);
    +
    6755 XXH_ASSERT(9 <= len && len <= 16);
    +
    6756 { xxh_u64 const bitflipl = (XXH_readLE64(secret+32) ^ XXH_readLE64(secret+40)) - seed;
    +
    6757 xxh_u64 const bitfliph = (XXH_readLE64(secret+48) ^ XXH_readLE64(secret+56)) + seed;
    +
    6758 xxh_u64 const input_lo = XXH_readLE64(input);
    +
    6759 xxh_u64 input_hi = XXH_readLE64(input + len - 8);
    +
    6760 XXH128_hash_t m128 = XXH_mult64to128(input_lo ^ input_hi ^ bitflipl, XXH_PRIME64_1);
    +
    6761 /*
    +
    6762 * Put len in the middle of m128 to ensure that the length gets mixed to
    +
    6763 * both the low and high bits in the 128x64 multiply below.
    +
    6764 */
    +
    6765 m128.low64 += (xxh_u64)(len - 1) << 54;
    +
    6766 input_hi ^= bitfliph;
    +
    6767 /*
    +
    6768 * Add the high 32 bits of input_hi to the high 32 bits of m128, then
    +
    6769 * add the long product of the low 32 bits of input_hi and XXH_PRIME32_2 to
    +
    6770 * the high 64 bits of m128.
    +
    6771 *
    +
    6772 * The best approach to this operation is different on 32-bit and 64-bit.
    +
    6773 */
    +
    6774 if (sizeof(void *) < sizeof(xxh_u64)) { /* 32-bit */
    +
    6775 /*
    +
    6776 * 32-bit optimized version, which is more readable.
    +
    6777 *
    +
    6778 * On 32-bit, it removes an ADC and delays a dependency between the two
    +
    6779 * halves of m128.high64, but it generates an extra mask on 64-bit.
    +
    6780 */
    +
    6781 m128.high64 += (input_hi & 0xFFFFFFFF00000000ULL) + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2);
    +
    6782 } else {
    +
    6783 /*
    +
    6784 * 64-bit optimized (albeit more confusing) version.
    +
    6785 *
    +
    6786 * Uses some properties of addition and multiplication to remove the mask:
    +
    6787 *
    +
    6788 * Let:
    +
    6789 * a = input_hi.lo = (input_hi & 0x00000000FFFFFFFF)
    +
    6790 * b = input_hi.hi = (input_hi & 0xFFFFFFFF00000000)
    +
    6791 * c = XXH_PRIME32_2
    +
    6792 *
    +
    6793 * a + (b * c)
    +
    6794 * Inverse Property: x + y - x == y
    +
    6795 * a + (b * (1 + c - 1))
    +
    6796 * Distributive Property: x * (y + z) == (x * y) + (x * z)
    +
    6797 * a + (b * 1) + (b * (c - 1))
    +
    6798 * Identity Property: x * 1 == x
    +
    6799 * a + b + (b * (c - 1))
    +
    6800 *
    +
    6801 * Substitute a, b, and c:
    +
    6802 * input_hi.hi + input_hi.lo + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1))
    +
    6803 *
    +
    6804 * Since input_hi.hi + input_hi.lo == input_hi, we get this:
    +
    6805 * input_hi + ((xxh_u64)input_hi.lo * (XXH_PRIME32_2 - 1))
    +
    6806 */
    +
    6807 m128.high64 += input_hi + XXH_mult32to64((xxh_u32)input_hi, XXH_PRIME32_2 - 1);
    +
    6808 }
    +
    6809 /* m128 ^= XXH_swap64(m128 >> 64); */
    +
    6810 m128.low64 ^= XXH_swap64(m128.high64);
    +
    6811
    +
    6812 { /* 128x64 multiply: h128 = m128 * XXH_PRIME64_2; */
    +
    6813 XXH128_hash_t h128 = XXH_mult64to128(m128.low64, XXH_PRIME64_2);
    +
    6814 h128.high64 += m128.high64 * XXH_PRIME64_2;
    +
    6815
    +
    6816 h128.low64 = XXH3_avalanche(h128.low64);
    +
    6817 h128.high64 = XXH3_avalanche(h128.high64);
    +
    6818 return h128;
    +
    6819 } }
    +
    6820}
    +
    6821
    +
    6822/*
    +
    6823 * Assumption: `secret` size is >= XXH3_SECRET_SIZE_MIN
    +
    6824 */
    +
    6825XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
    +
    6826XXH3_len_0to16_128b(const xxh_u8* input, size_t len, const xxh_u8* secret, XXH64_hash_t seed)
    +
    6827{
    +
    6828 XXH_ASSERT(len <= 16);
    +
    6829 { if (len > 8) return XXH3_len_9to16_128b(input, len, secret, seed);
    +
    6830 if (len >= 4) return XXH3_len_4to8_128b(input, len, secret, seed);
    +
    6831 if (len) return XXH3_len_1to3_128b(input, len, secret, seed);
    +
    6832 { XXH128_hash_t h128;
    +
    6833 xxh_u64 const bitflipl = XXH_readLE64(secret+64) ^ XXH_readLE64(secret+72);
    +
    6834 xxh_u64 const bitfliph = XXH_readLE64(secret+80) ^ XXH_readLE64(secret+88);
    +
    6835 h128.low64 = XXH64_avalanche(seed ^ bitflipl);
    +
    6836 h128.high64 = XXH64_avalanche( seed ^ bitfliph);
    +
    6837 return h128;
    +
    6838 } }
    +
    6839}
    +
    6840
    +
    6841/*
    +
    6842 * A bit slower than XXH3_mix16B, but handles multiply by zero better.
    +
    6843 */
    +
    6844XXH_FORCE_INLINE XXH128_hash_t
    +
    6845XXH128_mix32B(XXH128_hash_t acc, const xxh_u8* input_1, const xxh_u8* input_2,
    +
    6846 const xxh_u8* secret, XXH64_hash_t seed)
    +
    6847{
    +
    6848 acc.low64 += XXH3_mix16B (input_1, secret+0, seed);
    +
    6849 acc.low64 ^= XXH_readLE64(input_2) + XXH_readLE64(input_2 + 8);
    +
    6850 acc.high64 += XXH3_mix16B (input_2, secret+16, seed);
    +
    6851 acc.high64 ^= XXH_readLE64(input_1) + XXH_readLE64(input_1 + 8);
    +
    6852 return acc;
    +
    6853}
    +
    6854
    +
    6855
    +
    6856XXH_FORCE_INLINE XXH_PUREF XXH128_hash_t
    +
    6857XXH3_len_17to128_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
    +
    6858 const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
    +
    6859 XXH64_hash_t seed)
    +
    6860{
    +
    6861 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;
    +
    6862 XXH_ASSERT(16 < len && len <= 128);
    +
    6863
    +
    6864 { XXH128_hash_t acc;
    +
    6865 acc.low64 = len * XXH_PRIME64_1;
    +
    6866 acc.high64 = 0;
    +
    6867
    +
    6868#if XXH_SIZE_OPT >= 1
    +
    6869 {
    +
    6870 /* Smaller, but slightly slower. */
    +
    6871 unsigned int i = (unsigned int)(len - 1) / 32;
    +
    6872 do {
    +
    6873 acc = XXH128_mix32B(acc, input+16*i, input+len-16*(i+1), secret+32*i, seed);
    +
    6874 } while (i-- != 0);
    +
    6875 }
    +
    6876#else
    +
    6877 if (len > 32) {
    +
    6878 if (len > 64) {
    +
    6879 if (len > 96) {
    +
    6880 acc = XXH128_mix32B(acc, input+48, input+len-64, secret+96, seed);
    +
    6881 }
    +
    6882 acc = XXH128_mix32B(acc, input+32, input+len-48, secret+64, seed);
    +
    6883 }
    +
    6884 acc = XXH128_mix32B(acc, input+16, input+len-32, secret+32, seed);
    +
    6885 }
    +
    6886 acc = XXH128_mix32B(acc, input, input+len-16, secret, seed);
    +
    6887#endif
    +
    6888 { XXH128_hash_t h128;
    +
    6889 h128.low64 = acc.low64 + acc.high64;
    +
    6890 h128.high64 = (acc.low64 * XXH_PRIME64_1)
    +
    6891 + (acc.high64 * XXH_PRIME64_4)
    +
    6892 + ((len - seed) * XXH_PRIME64_2);
    +
    6893 h128.low64 = XXH3_avalanche(h128.low64);
    +
    6894 h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);
    +
    6895 return h128;
    +
    6896 }
    +
    6897 }
    +
    6898}
    +
    6899
    +
    6900XXH_NO_INLINE XXH_PUREF XXH128_hash_t
    +
    6901XXH3_len_129to240_128b(const xxh_u8* XXH_RESTRICT input, size_t len,
    +
    6902 const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
    +
    6903 XXH64_hash_t seed)
    +
    6904{
    +
    6905 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN); (void)secretSize;
    +
    6906 XXH_ASSERT(128 < len && len <= XXH3_MIDSIZE_MAX);
    +
    6907
    +
    6908 { XXH128_hash_t acc;
    +
    6909 unsigned i;
    +
    6910 acc.low64 = len * XXH_PRIME64_1;
    +
    6911 acc.high64 = 0;
    +
    6912 /*
    +
    6913 * We set as `i` as offset + 32. We do this so that unchanged
    +
    6914 * `len` can be used as upper bound. This reaches a sweet spot
    +
    6915 * where both x86 and aarch64 get simple agen and good codegen
    +
    6916 * for the loop.
    +
    6917 */
    +
    6918 for (i = 32; i < 160; i += 32) {
    +
    6919 acc = XXH128_mix32B(acc,
    +
    6920 input + i - 32,
    +
    6921 input + i - 16,
    +
    6922 secret + i - 32,
    +
    6923 seed);
    +
    6924 }
    +
    6925 acc.low64 = XXH3_avalanche(acc.low64);
    +
    6926 acc.high64 = XXH3_avalanche(acc.high64);
    +
    6927 /*
    +
    6928 * NB: `i <= len` will duplicate the last 32-bytes if
    +
    6929 * len % 32 was zero. This is an unfortunate necessity to keep
    +
    6930 * the hash result stable.
    +
    6931 */
    +
    6932 for (i=160; i <= len; i += 32) {
    +
    6933 acc = XXH128_mix32B(acc,
    +
    6934 input + i - 32,
    +
    6935 input + i - 16,
    +
    6936 secret + XXH3_MIDSIZE_STARTOFFSET + i - 160,
    +
    6937 seed);
    +
    6938 }
    +
    6939 /* last bytes */
    +
    6940 acc = XXH128_mix32B(acc,
    +
    6941 input + len - 16,
    +
    6942 input + len - 32,
    +
    6943 secret + XXH3_SECRET_SIZE_MIN - XXH3_MIDSIZE_LASTOFFSET - 16,
    +
    6944 (XXH64_hash_t)0 - seed);
    +
    6945
    +
    6946 { XXH128_hash_t h128;
    +
    6947 h128.low64 = acc.low64 + acc.high64;
    +
    6948 h128.high64 = (acc.low64 * XXH_PRIME64_1)
    +
    6949 + (acc.high64 * XXH_PRIME64_4)
    +
    6950 + ((len - seed) * XXH_PRIME64_2);
    +
    6951 h128.low64 = XXH3_avalanche(h128.low64);
    +
    6952 h128.high64 = (XXH64_hash_t)0 - XXH3_avalanche(h128.high64);
    +
    6953 return h128;
    +
    6954 }
    +
    6955 }
    +
    6956}
    +
    6957
    +
    6958static XXH_PUREF XXH128_hash_t
    +
    6959XXH3_finalizeLong_128b(const xxh_u64* XXH_RESTRICT acc, const xxh_u8* XXH_RESTRICT secret, size_t secretSize, xxh_u64 len)
    +
    6960{
    +
    6961 XXH128_hash_t h128;
    +
    6962 h128.low64 = XXH3_finalizeLong_64b(acc, secret, len);
    +
    6963 h128.high64 = XXH3_mergeAccs(acc, secret + secretSize
    +
    6964 - XXH_STRIPE_LEN - XXH_SECRET_MERGEACCS_START,
    +
    6965 ~(len * XXH_PRIME64_2));
    +
    6966 return h128;
    +
    6967}
    +
    6968
    +
    6969XXH_FORCE_INLINE XXH128_hash_t
    +
    6970XXH3_hashLong_128b_internal(const void* XXH_RESTRICT input, size_t len,
    +
    6971 const xxh_u8* XXH_RESTRICT secret, size_t secretSize,
    +
    6972 XXH3_f_accumulate f_acc,
    +
    6973 XXH3_f_scrambleAcc f_scramble)
    +
    6974{
    +
    6975 XXH_ALIGN(XXH_ACC_ALIGN) xxh_u64 acc[XXH_ACC_NB] = XXH3_INIT_ACC;
    +
    6976
    +
    6977 XXH3_hashLong_internal_loop(acc, (const xxh_u8*)input, len, secret, secretSize, f_acc, f_scramble);
    +
    6978
    +
    6979 /* converge into final hash */
    +
    6980 XXH_STATIC_ASSERT(sizeof(acc) == 64);
    +
    6981 XXH_ASSERT(secretSize >= sizeof(acc) + XXH_SECRET_MERGEACCS_START);
    +
    6982 return XXH3_finalizeLong_128b(acc, secret, secretSize, (xxh_u64)len);
    +
    6983}
    +
    6984
    +
    6985/*
    +
    6986 * It's important for performance that XXH3_hashLong() is not inlined.
    +
    6987 */
    +
    6988XXH_NO_INLINE XXH_PUREF XXH128_hash_t
    +
    6989XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len,
    +
    6990 XXH64_hash_t seed64,
    +
    6991 const void* XXH_RESTRICT secret, size_t secretLen)
    +
    6992{
    +
    6993 (void)seed64; (void)secret; (void)secretLen;
    +
    6994 return XXH3_hashLong_128b_internal(input, len, XXH3_kSecret, sizeof(XXH3_kSecret),
    +
    6995 XXH3_accumulate, XXH3_scrambleAcc);
    +
    6996}
    +
    6997
    +
    6998/*
    +
    6999 * It's important for performance to pass @p secretLen (when it's static)
    +
    7000 * to the compiler, so that it can properly optimize the vectorized loop.
    +
    7001 *
    +
    7002 * When the secret size is unknown, or on GCC 12 where the mix of NO_INLINE and FORCE_INLINE
    +
    7003 * breaks -Og, this is XXH_NO_INLINE.
    +
    7004 */
    +
    7005XXH3_WITH_SECRET_INLINE XXH128_hash_t
    +
    7006XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len,
    +
    7007 XXH64_hash_t seed64,
    +
    7008 const void* XXH_RESTRICT secret, size_t secretLen)
    +
    7009{
    +
    7010 (void)seed64;
    +
    7011 return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, secretLen,
    +
    7012 XXH3_accumulate, XXH3_scrambleAcc);
    +
    7013}
    +
    7014
    +
    7015XXH_FORCE_INLINE XXH128_hash_t
    +
    7016XXH3_hashLong_128b_withSeed_internal(const void* XXH_RESTRICT input, size_t len,
    +
    7017 XXH64_hash_t seed64,
    +
    7018 XXH3_f_accumulate f_acc,
    +
    7019 XXH3_f_scrambleAcc f_scramble,
    +
    7020 XXH3_f_initCustomSecret f_initSec)
    +
    7021{
    +
    7022 if (seed64 == 0)
    +
    7023 return XXH3_hashLong_128b_internal(input, len,
    +
    7024 XXH3_kSecret, sizeof(XXH3_kSecret),
    +
    7025 f_acc, f_scramble);
    +
    7026 { XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];
    +
    7027 f_initSec(secret, seed64);
    +
    7028 return XXH3_hashLong_128b_internal(input, len, (const xxh_u8*)secret, sizeof(secret),
    +
    7029 f_acc, f_scramble);
    +
    7030 }
    +
    7031}
    +
    7032
    +
    7033/*
    +
    7034 * It's important for performance that XXH3_hashLong is not inlined.
    +
    7035 */
    +
    7036XXH_NO_INLINE XXH128_hash_t
    +
    7037XXH3_hashLong_128b_withSeed(const void* input, size_t len,
    +
    7038 XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen)
    +
    7039{
    +
    7040 (void)secret; (void)secretLen;
    +
    7041 return XXH3_hashLong_128b_withSeed_internal(input, len, seed64,
    +
    7042 XXH3_accumulate, XXH3_scrambleAcc, XXH3_initCustomSecret);
    +
    7043}
    +
    7044
    +
    7045typedef XXH128_hash_t (*XXH3_hashLong128_f)(const void* XXH_RESTRICT, size_t,
    +
    7046 XXH64_hash_t, const void* XXH_RESTRICT, size_t);
    +
    7047
    +
    7048XXH_FORCE_INLINE XXH128_hash_t
    +
    7049XXH3_128bits_internal(const void* input, size_t len,
    +
    7050 XXH64_hash_t seed64, const void* XXH_RESTRICT secret, size_t secretLen,
    +
    7051 XXH3_hashLong128_f f_hl128)
    +
    7052{
    +
    7053 XXH_ASSERT(secretLen >= XXH3_SECRET_SIZE_MIN);
    +
    7054 /*
    +
    7055 * If an action is to be taken if `secret` conditions are not respected,
    +
    7056 * it should be done here.
    +
    7057 * For now, it's a contract pre-condition.
    +
    7058 * Adding a check and a branch here would cost performance at every hash.
    +
    7059 */
    +
    7060 if (len <= 16)
    +
    7061 return XXH3_len_0to16_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, seed64);
    +
    7062 if (len <= 128)
    +
    7063 return XXH3_len_17to128_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
    +
    7064 if (len <= XXH3_MIDSIZE_MAX)
    +
    7065 return XXH3_len_129to240_128b((const xxh_u8*)input, len, (const xxh_u8*)secret, secretLen, seed64);
    +
    7066 return f_hl128(input, len, seed64, secret, secretLen);
    +
    7067}
    +
    7068
    +
    7069
    +
    7070/* === Public XXH128 API === */
    +
    7071
    +
    +
    7073XXH_PUBLIC_API XXH128_hash_t XXH3_128bits(XXH_NOESCAPE const void* input, size_t len)
    +
    7074{
    +
    7075 return XXH3_128bits_internal(input, len, 0,
    +
    7076 XXH3_kSecret, sizeof(XXH3_kSecret),
    +
    7077 XXH3_hashLong_128b_default);
    +
    7078}
    +
    +
    7079
    + +
    +
    7082XXH3_128bits_withSecret(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize)
    +
    7083{
    +
    7084 return XXH3_128bits_internal(input, len, 0,
    +
    7085 (const xxh_u8*)secret, secretSize,
    +
    7086 XXH3_hashLong_128b_withSecret);
    +
    7087}
    +
    +
    7088
    + +
    +
    7091XXH3_128bits_withSeed(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)
    +
    7092{
    +
    7093 return XXH3_128bits_internal(input, len, seed,
    +
    7094 XXH3_kSecret, sizeof(XXH3_kSecret),
    +
    7095 XXH3_hashLong_128b_withSeed);
    +
    7096}
    +
    +
    7097
    + +
    +
    7100XXH3_128bits_withSecretandSeed(XXH_NOESCAPE const void* input, size_t len, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
    +
    7101{
    +
    7102 if (len <= XXH3_MIDSIZE_MAX)
    +
    7103 return XXH3_128bits_internal(input, len, seed, XXH3_kSecret, sizeof(XXH3_kSecret), NULL);
    +
    7104 return XXH3_hashLong_128b_withSecret(input, len, seed, secret, secretSize);
    +
    7105}
    +
    +
    7106
    + +
    +
    7109XXH128(XXH_NOESCAPE const void* input, size_t len, XXH64_hash_t seed)
    +
    7110{
    +
    7111 return XXH3_128bits_withSeed(input, len, seed);
    +
    7112}
    +
    +
    7113
    +
    7114
    +
    7115/* === XXH3 128-bit streaming === */
    +
    7116#ifndef XXH_NO_STREAM
    +
    7117/*
    +
    7118 * All initialization and update functions are identical to 64-bit streaming variant.
    +
    7119 * The only difference is the finalization routine.
    +
    7120 */
    +
    7121
    + +
    +
    7124XXH3_128bits_reset(XXH_NOESCAPE XXH3_state_t* statePtr)
    +
    7125{
    +
    7126 return XXH3_64bits_reset(statePtr);
    +
    7127}
    +
    +
    7128
    + +
    +
    7131XXH3_128bits_reset_withSecret(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize)
    +
    7132{
    +
    7133 return XXH3_64bits_reset_withSecret(statePtr, secret, secretSize);
    +
    7134}
    +
    +
    7135
    + +
    + +
    7139{
    +
    7140 return XXH3_64bits_reset_withSeed(statePtr, seed);
    +
    7141}
    +
    +
    7142
    + +
    +
    7145XXH3_128bits_reset_withSecretandSeed(XXH_NOESCAPE XXH3_state_t* statePtr, XXH_NOESCAPE const void* secret, size_t secretSize, XXH64_hash_t seed)
    +
    7146{
    +
    7147 return XXH3_64bits_reset_withSecretandSeed(statePtr, secret, secretSize, seed);
    +
    7148}
    +
    +
    7149
    + +
    +
    7152XXH3_128bits_update(XXH_NOESCAPE XXH3_state_t* state, XXH_NOESCAPE const void* input, size_t len)
    +
    7153{
    +
    7154 return XXH3_64bits_update(state, input, len);
    +
    7155}
    +
    +
    7156
    +
    + +
    7159{
    +
    7160 const unsigned char* const secret = (state->extSecret == NULL) ? state->customSecret : state->extSecret;
    +
    7161 if (state->totalLen > XXH3_MIDSIZE_MAX) {
    +
    7162 XXH_ALIGN(XXH_ACC_ALIGN) XXH64_hash_t acc[XXH_ACC_NB];
    +
    7163 XXH3_digest_long(acc, state, secret);
    +
    7164 XXH_ASSERT(state->secretLimit + XXH_STRIPE_LEN >= sizeof(acc) + XXH_SECRET_MERGEACCS_START);
    +
    7165 return XXH3_finalizeLong_128b(acc, secret, state->secretLimit + XXH_STRIPE_LEN, (xxh_u64)state->totalLen);
    +
    7166 }
    +
    7167 /* len <= XXH3_MIDSIZE_MAX : short code */
    +
    7168 if (state->useSeed)
    +
    7169 return XXH3_128bits_withSeed(state->buffer, (size_t)state->totalLen, state->seed);
    +
    7170 return XXH3_128bits_withSecret(state->buffer, (size_t)(state->totalLen),
    +
    7171 secret, state->secretLimit + XXH_STRIPE_LEN);
    +
    7172}
    +
    +
    7173#endif /* !XXH_NO_STREAM */
    +
    7174/* 128-bit utility functions */
    +
    7175
    +
    7176#include <string.h> /* memcmp, memcpy */
    +
    7177
    +
    7178/* return : 1 is equal, 0 if different */
    +
    + +
    7181{
    +
    7182 /* note : XXH128_hash_t is compact, it has no padding byte */
    +
    7183 return !(memcmp(&h1, &h2, sizeof(h1)));
    +
    7184}
    +
    +
    7185
    +
    7186/* This prototype is compatible with stdlib's qsort().
    +
    7187 * @return : >0 if *h128_1 > *h128_2
    +
    7188 * <0 if *h128_1 < *h128_2
    +
    7189 * =0 if *h128_1 == *h128_2 */
    +
    +
    7191XXH_PUBLIC_API int XXH128_cmp(XXH_NOESCAPE const void* h128_1, XXH_NOESCAPE const void* h128_2)
    +
    7192{
    +
    7193 XXH128_hash_t const h1 = *(const XXH128_hash_t*)h128_1;
    +
    7194 XXH128_hash_t const h2 = *(const XXH128_hash_t*)h128_2;
    +
    7195 int const hcmp = (h1.high64 > h2.high64) - (h2.high64 > h1.high64);
    +
    7196 /* note : bets that, in most cases, hash values are different */
    +
    7197 if (hcmp) return hcmp;
    +
    7198 return (h1.low64 > h2.low64) - (h2.low64 > h1.low64);
    +
    7199}
    +
    +
    7200
    +
    7201
    +
    7202/*====== Canonical representation ======*/
    +
    7204XXH_PUBLIC_API void
    +
    + +
    7206{
    +
    7207 XXH_STATIC_ASSERT(sizeof(XXH128_canonical_t) == sizeof(XXH128_hash_t));
    + +
    7209 hash.high64 = XXH_swap64(hash.high64);
    +
    7210 hash.low64 = XXH_swap64(hash.low64);
    +
    7211 }
    +
    7212 XXH_memcpy(dst, &hash.high64, sizeof(hash.high64));
    +
    7213 XXH_memcpy((char*)dst + sizeof(hash.high64), &hash.low64, sizeof(hash.low64));
    +
    7214}
    +
    +
    7215
    + +
    + +
    7219{
    +
    7220 XXH128_hash_t h;
    +
    7221 h.high64 = XXH_readBE64(src);
    +
    7222 h.low64 = XXH_readBE64(src->digest + 8);
    +
    7223 return h;
    +
    7224}
    +
    +
    7225
    +
    7226
    +
    7227
    +
    7228/* ==========================================
    +
    7229 * Secret generators
    +
    7230 * ==========================================
    +
    7231 */
    +
    7232#define XXH_MIN(x, y) (((x) > (y)) ? (y) : (x))
    +
    7233
    +
    7234XXH_FORCE_INLINE void XXH3_combine16(void* dst, XXH128_hash_t h128)
    +
    7235{
    +
    7236 XXH_writeLE64( dst, XXH_readLE64(dst) ^ h128.low64 );
    +
    7237 XXH_writeLE64( (char*)dst+8, XXH_readLE64((char*)dst+8) ^ h128.high64 );
    +
    7238}
    +
    7239
    + +
    +
    7242XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer, size_t secretSize, XXH_NOESCAPE const void* customSeed, size_t customSeedSize)
    +
    7243{
    +
    7244#if (XXH_DEBUGLEVEL >= 1)
    +
    7245 XXH_ASSERT(secretBuffer != NULL);
    +
    7246 XXH_ASSERT(secretSize >= XXH3_SECRET_SIZE_MIN);
    +
    7247#else
    +
    7248 /* production mode, assert() are disabled */
    +
    7249 if (secretBuffer == NULL) return XXH_ERROR;
    +
    7250 if (secretSize < XXH3_SECRET_SIZE_MIN) return XXH_ERROR;
    +
    7251#endif
    +
    7252
    +
    7253 if (customSeedSize == 0) {
    +
    7254 customSeed = XXH3_kSecret;
    +
    7255 customSeedSize = XXH_SECRET_DEFAULT_SIZE;
    +
    7256 }
    +
    7257#if (XXH_DEBUGLEVEL >= 1)
    +
    7258 XXH_ASSERT(customSeed != NULL);
    +
    7259#else
    +
    7260 if (customSeed == NULL) return XXH_ERROR;
    +
    7261#endif
    +
    7262
    +
    7263 /* Fill secretBuffer with a copy of customSeed - repeat as needed */
    +
    7264 { size_t pos = 0;
    +
    7265 while (pos < secretSize) {
    +
    7266 size_t const toCopy = XXH_MIN((secretSize - pos), customSeedSize);
    +
    7267 memcpy((char*)secretBuffer + pos, customSeed, toCopy);
    +
    7268 pos += toCopy;
    +
    7269 } }
    +
    7270
    +
    7271 { size_t const nbSeg16 = secretSize / 16;
    +
    7272 size_t n;
    +
    7273 XXH128_canonical_t scrambler;
    +
    7274 XXH128_canonicalFromHash(&scrambler, XXH128(customSeed, customSeedSize, 0));
    +
    7275 for (n=0; n<nbSeg16; n++) {
    +
    7276 XXH128_hash_t const h128 = XXH128(&scrambler, sizeof(scrambler), n);
    +
    7277 XXH3_combine16((char*)secretBuffer + n*16, h128);
    +
    7278 }
    +
    7279 /* last segment */
    +
    7280 XXH3_combine16((char*)secretBuffer + secretSize - 16, XXH128_hashFromCanonical(&scrambler));
    +
    7281 }
    +
    7282 return XXH_OK;
    +
    7283}
    +
    +
    7284
    +
    7286XXH_PUBLIC_API void
    +
    +
    7287XXH3_generateSecret_fromSeed(XXH_NOESCAPE void* secretBuffer, XXH64_hash_t seed)
    +
    7288{
    +
    7289 XXH_ALIGN(XXH_SEC_ALIGN) xxh_u8 secret[XXH_SECRET_DEFAULT_SIZE];
    +
    7290 XXH3_initCustomSecret(secret, seed);
    +
    7291 XXH_ASSERT(secretBuffer != NULL);
    +
    7292 memcpy(secretBuffer, secret, XXH_SECRET_DEFAULT_SIZE);
    +
    7293}
    +
    +
    7294
    +
    7295
    +
    7296
    +
    7297/* Pop our optimization override from above */
    +
    7298#if XXH_VECTOR == XXH_AVX2 /* AVX2 */ \
    +
    7299 && defined(__GNUC__) && !defined(__clang__) /* GCC, not Clang */ \
    +
    7300 && defined(__OPTIMIZE__) && XXH_SIZE_OPT <= 0 /* respect -O0 and -Os */
    +
    7301# pragma GCC pop_options
    +
    7302#endif
    +
    7303
    +
    7304#endif /* XXH_NO_LONG_LONG */
    +
    7305
    +
    7306#endif /* XXH_NO_XXH3 */
    +
    7307
    +
    7311#endif /* XXH_IMPLEMENTATION */
    +
    7312
    +
    7313
    +
    7314#if defined (__cplusplus)
    +
    7315} /* extern "C" */
    +
    7316#endif
    +
    struct XXH32_state_s XXH32_state_t
    The opaque state struct for the XXH32 streaming API.
    Definition xxhash.h:653
    +
    XXH_errorcode XXH32_reset(XXH32_state_t *statePtr, XXH32_hash_t seed)
    Resets an XXH32_state_t to begin a new hash.
    Definition xxhash.h:3224
    +
    XXH32_hash_t XXH32(const void *input, size_t length, XXH32_hash_t seed)
    Calculates the 32-bit hash of input using xxHash32.
    Definition xxhash.h:3183
    +
    XXH_errorcode XXH32_update(XXH32_state_t *statePtr, const void *input, size_t length)
    Consumes a block of input to an XXH32_state_t.
    Definition xxhash.h:3235
    +
    XXH32_state_t * XXH32_createState(void)
    Allocates an XXH32_state_t.
    Definition xxhash.h:3206
    +
    XXH_errorcode XXH32_freeState(XXH32_state_t *statePtr)
    Frees an XXH32_state_t.
    Definition xxhash.h:3211
    +
    void XXH32_canonicalFromHash(XXH32_canonical_t *dst, XXH32_hash_t hash)
    Converts an XXH32_hash_t to a big endian XXH32_canonical_t.
    Definition xxhash.h:3300
    +
    XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canonical_t *src)
    Converts an XXH32_canonical_t to a native XXH32_hash_t.
    Definition xxhash.h:3307
    +
    XXH32_hash_t XXH32_digest(const XXH32_state_t *statePtr)
    Returns the calculated hash value from an XXH32_state_t.
    Definition xxhash.h:3281
    +
    void XXH32_copyState(XXH32_state_t *dst_state, const XXH32_state_t *src_state)
    Copies one XXH32_state_t to another.
    Definition xxhash.h:3218
    +
    #define XXH_PRIME32_2
    Definition xxhash.h:2907
    +
    #define XXH_PRIME32_1
    Definition xxhash.h:2906
    +
    #define XXH_PRIME32_5
    Definition xxhash.h:2910
    +
    #define XXH_PRIME32_3
    Definition xxhash.h:2908
    +
    XXH64_hash_t XXH3_64bits_digest(const XXH3_state_t *statePtr)
    Returns the calculated XXH3 64-bit hash value from an XXH3_state_t.
    Definition xxhash.h:6660
    +
    XXH_errorcode XXH3_128bits_update(XXH3_state_t *statePtr, const void *input, size_t length)
    Consumes a block of input to an XXH3_state_t.
    Definition xxhash.h:7152
    +
    void XXH3_generateSecret_fromSeed(void *secretBuffer, XXH64_hash_t seed)
    Generate the same secret as the _withSeed() variants.
    Definition xxhash.h:7287
    +
    void XXH128_canonicalFromHash(XXH128_canonical_t *dst, XXH128_hash_t hash)
    Converts an XXH128_hash_t to a big endian XXH128_canonical_t.
    Definition xxhash.h:7205
    +
    XXH64_hash_t XXH3_64bits_withSeed(const void *input, size_t length, XXH64_hash_t seed)
    Calculates 64-bit seeded variant of XXH3 hash of input.
    Definition xxhash.h:6277
    +
    int XXH128_cmp(const void *h128_1, const void *h128_2)
    Compares two XXH128_hash_t.
    Definition xxhash.h:7191
    +
    XXH128_hash_t XXH3_128bits_withSeed(const void *data, size_t len, XXH64_hash_t seed)
    Calculates 128-bit seeded variant of XXH3 hash of data.
    Definition xxhash.h:7091
    +
    XXH128_hash_t XXH128(const void *data, size_t len, XXH64_hash_t seed)
    Calculates the 128-bit hash of data using XXH3.
    Definition xxhash.h:7109
    +
    XXH_errorcode XXH3_generateSecret(void *secretBuffer, size_t secretSize, const void *customSeed, size_t customSeedSize)
    Derive a high-entropy secret from any user-defined content, named customSeed.
    Definition xxhash.h:7242
    +
    XXH_errorcode XXH3_64bits_reset_withSecretandSeed(XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64)
    Resets an XXH3_state_t with secret data to begin a new hash.
    Definition xxhash.h:6463
    +
    XXH_errorcode XXH3_64bits_reset_withSeed(XXH3_state_t *statePtr, XXH64_hash_t seed)
    Resets an XXH3_state_t with 64-bit seed to begin a new hash.
    Definition xxhash.h:6451
    +
    struct XXH3_state_s XXH3_state_t
    The opaque state struct for the XXH3 streaming API.
    Definition xxhash.h:1244
    +
    XXH128_hash_t XXH3_128bits_digest(const XXH3_state_t *statePtr)
    Returns the calculated XXH3 128-bit hash value from an XXH3_state_t.
    Definition xxhash.h:7158
    +
    XXH_errorcode XXH3_64bits_reset_withSecret(XXH3_state_t *statePtr, const void *secret, size_t secretSize)
    Resets an XXH3_state_t with secret data to begin a new hash.
    Definition xxhash.h:6440
    +
    XXH3_state_t * XXH3_createState(void)
    Allocate an XXH3_state_t.
    Definition xxhash.h:6369
    +
    XXH_errorcode XXH3_128bits_reset_withSeed(XXH3_state_t *statePtr, XXH64_hash_t seed)
    Resets an XXH3_state_t with 64-bit seed to begin a new hash.
    Definition xxhash.h:7138
    +
    XXH128_hash_t XXH3_128bits(const void *data, size_t len)
    Calculates 128-bit unseeded variant of XXH3 of data.
    Definition xxhash.h:7073
    +
    XXH128_hash_t XXH3_128bits_withSecret(const void *data, size_t len, const void *secret, size_t secretSize)
    Calculates 128-bit variant of XXH3 with a custom "secret".
    Definition xxhash.h:7082
    +
    XXH_errorcode XXH3_128bits_reset_withSecretandSeed(XXH3_state_t *statePtr, const void *secret, size_t secretSize, XXH64_hash_t seed64)
    Resets an XXH3_state_t with secret data to begin a new hash.
    Definition xxhash.h:7145
    +
    XXH_errorcode XXH3_128bits_reset(XXH3_state_t *statePtr)
    Resets an XXH3_state_t to begin a new hash.
    Definition xxhash.h:7124
    +
    XXH128_hash_t XXH128_hashFromCanonical(const XXH128_canonical_t *src)
    Converts an XXH128_canonical_t to a native XXH128_hash_t.
    Definition xxhash.h:7218
    +
    void XXH3_copyState(XXH3_state_t *dst_state, const XXH3_state_t *src_state)
    Copies one XXH3_state_t to another.
    Definition xxhash.h:6397
    +
    XXH64_hash_t XXH3_64bits_withSecret(const void *data, size_t len, const void *secret, size_t secretSize)
    Calculates 64-bit variant of XXH3 with a custom "secret".
    Definition xxhash.h:6270
    +
    XXH64_hash_t XXH3_64bits(const void *input, size_t length)
    Calculates 64-bit unseeded variant of XXH3 hash of input.
    Definition xxhash.h:6263
    +
    XXH_errorcode XXH3_64bits_update(XXH3_state_t *statePtr, const void *input, size_t length)
    Consumes a block of input to an XXH3_state_t.
    Definition xxhash.h:6615
    +
    XXH128_hash_t XXH3_128bits_withSecretandSeed(const void *input, size_t length, const void *secret, size_t secretSize, XXH64_hash_t seed64)
    Calculates 128-bit seeded variant of XXH3 hash of data.
    Definition xxhash.h:7100
    +
    XXH_errorcode XXH3_64bits_reset(XXH3_state_t *statePtr)
    Resets an XXH3_state_t to begin a new hash.
    Definition xxhash.h:6431
    +
    int XXH128_isEqual(XXH128_hash_t h1, XXH128_hash_t h2)
    Check equality of two XXH128_hash_t values.
    Definition xxhash.h:7180
    +
    #define XXH3_SECRET_SIZE_MIN
    Definition xxhash.h:1192
    +
    XXH_errorcode XXH3_freeState(XXH3_state_t *statePtr)
    Frees an XXH3_state_t.
    Definition xxhash.h:6389
    +
    XXH_errorcode XXH3_128bits_reset_withSecret(XXH3_state_t *statePtr, const void *secret, size_t secretSize)
    Resets an XXH3_state_t with secret data to begin a new hash.
    Definition xxhash.h:7131
    +
    XXH64_hash_t XXH3_64bits_withSecretandSeed(const void *data, size_t len, const void *secret, size_t secretSize, XXH64_hash_t seed)
    Calculates 64/128-bit seeded variant of XXH3 hash of data.
    Definition xxhash.h:6283
    +
    struct XXH64_state_s XXH64_state_t
    The opaque state struct for the XXH64 streaming API.
    Definition xxhash.h:927
    +
    void XXH64_canonicalFromHash(XXH64_canonical_t *dst, XXH64_hash_t hash)
    Converts an XXH64_hash_t to a big endian XXH64_canonical_t.
    Definition xxhash.h:3795
    +
    void XXH64_copyState(XXH64_state_t *dst_state, const XXH64_state_t *src_state)
    Copies one XXH64_state_t to another.
    Definition xxhash.h:3715
    +
    XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t *src)
    Converts an XXH64_canonical_t to a native XXH64_hash_t.
    Definition xxhash.h:3803
    +
    XXH64_hash_t XXH64(const void *input, size_t length, XXH64_hash_t seed)
    Calculates the 64-bit hash of input using xxHash64.
    Definition xxhash.h:3681
    +
    XXH_errorcode XXH64_freeState(XXH64_state_t *statePtr)
    Frees an XXH64_state_t.
    Definition xxhash.h:3708
    +
    XXH64_state_t * XXH64_createState(void)
    Allocates an XXH64_state_t.
    Definition xxhash.h:3703
    +
    XXH_errorcode XXH64_update(XXH64_state_t *statePtr, const void *input, size_t length)
    Consumes a block of input to an XXH64_state_t.
    Definition xxhash.h:3731
    +
    XXH64_hash_t XXH64_digest(const XXH64_state_t *statePtr)
    Returns the calculated hash value from an XXH64_state_t.
    Definition xxhash.h:3776
    +
    XXH_errorcode XXH64_reset(XXH64_state_t *statePtr, XXH64_hash_t seed)
    Resets an XXH64_state_t to begin a new hash.
    Definition xxhash.h:3721
    +
    #define XXH_PRIME64_1
    Definition xxhash.h:3457
    +
    #define XXH_PRIME64_2
    Definition xxhash.h:3458
    +
    #define XXH_PRIME64_4
    Definition xxhash.h:3460
    +
    #define XXH_PRIME64_3
    Definition xxhash.h:3459
    +
    #define XXH_PRIME64_5
    Definition xxhash.h:3461
    +
    #define XXH_TARGET_SSE2
    Allows a function to be compiled with SSE2 intrinsics.
    Definition xxhash.h:5183
    +
    #define XXH_TARGET_AVX512
    Like XXH_TARGET_SSE2, but for AVX512.
    Definition xxhash.h:4974
    +
    #define XXH_TARGET_AVX2
    Like XXH_TARGET_SSE2, but for AVX2.
    Definition xxhash.h:5077
    +
    XXH_alignment
    Definition xxhash.h:2834
    +
    @ XXH_aligned
    Definition xxhash.h:2835
    +
    @ XXH_unaligned
    Definition xxhash.h:2836
    +
    uint32_t XXH32_hash_t
    An unsigned 32-bit integer.
    Definition xxhash.h:587
    +
    XXH_errorcode
    Exit code for the streaming API.
    Definition xxhash.h:572
    +
    uint64_t XXH64_hash_t
    An unsigned 64-bit integer.
    Definition xxhash.h:866
    +
    #define XXH_PUBLIC_API
    Marks a global symbol.
    Definition xxhash.h:455
    +
    unsigned XXH_versionNumber(void)
    Obtains the xxHash version.
    Definition xxhash.h:2891
    +
    #define XXH_VERSION_NUMBER
    Version number, encoded as two digits each.
    Definition xxhash.h:552
    +
    @ XXH_ERROR
    Definition xxhash.h:574
    +
    @ XXH_OK
    Definition xxhash.h:573
    +
    #define XXH_ACC_ALIGN
    Selects the minimum alignment for XXH3's accumulators.
    Definition xxhash.h:3971
    +
    #define XXH_CPU_LITTLE_ENDIAN
    Whether the target is little endian.
    Definition xxhash.h:2711
    +
    #define XXH3_NEON_LANES
    Controls the NEON to scalar ratio for XXH3.
    Definition xxhash.h:4208
    +
    #define XXH32_ENDJMP
    Whether to use a jump for XXH32_finalize.
    Definition xxhash.h:2272
    +
    #define XXH_FORCE_ALIGN_CHECK
    If defined to non-zero, adds a special path for aligned inputs (XXH32() and XXH64() only).
    Definition xxhash.h:2221
    +
    Definition xxhash.h:1606
    +
    The return value from 128-bit hashes.
    Definition xxhash.h:1383
    +
    XXH64_hash_t low64
    Definition xxhash.h:1384
    +
    XXH64_hash_t high64
    Definition xxhash.h:1385
    +
    Canonical (big endian) representation of XXH32_hash_t.
    Definition xxhash.h:754
    +
    unsigned char digest[4]
    Definition xxhash.h:755
    +
    Definition xxhash.h:1673
    +
    XXH32_hash_t bufferedSize
    Definition xxhash.h:1678
    +
    XXH32_hash_t total_len_32
    Definition xxhash.h:1674
    +
    XXH32_hash_t large_len
    Definition xxhash.h:1675
    +
    XXH32_hash_t reserved
    Definition xxhash.h:1679
    +
    XXH32_hash_t acc[4]
    Definition xxhash.h:1676
    +
    unsigned char buffer[16]
    Definition xxhash.h:1677
    +
    Definition xxhash.h:1773
    +
    const unsigned char * extSecret
    Definition xxhash.h:1796
    +
    XXH32_hash_t bufferedSize
    Definition xxhash.h:1780
    +
    XXH64_hash_t reserved64
    Definition xxhash.h:1794
    +
    XXH64_hash_t totalLen
    Definition xxhash.h:1786
    +
    size_t nbStripesSoFar
    Definition xxhash.h:1784
    +
    XXH32_hash_t useSeed
    Definition xxhash.h:1782
    +
    size_t secretLimit
    Definition xxhash.h:1790
    +
    size_t nbStripesPerBlock
    Definition xxhash.h:1788
    +
    XXH64_hash_t seed
    Definition xxhash.h:1792
    +
    unsigned char buffer[XXH3_INTERNALBUFFER_SIZE]
    Definition xxhash.h:1778
    +
    unsigned char customSecret[XXH3_SECRET_DEFAULT_SIZE]
    Definition xxhash.h:1776
    +
    XXH64_hash_t acc[8]
    Definition xxhash.h:1774
    +
    Canonical (big endian) representation of XXH64_hash_t.
    Definition xxhash.h:1028
    +
    Definition xxhash.h:1697
    +
    unsigned char buffer[32]
    Definition xxhash.h:1700
    +
    XXH32_hash_t reserved32
    Definition xxhash.h:1702
    +
    XXH64_hash_t acc[4]
    Definition xxhash.h:1699
    +
    XXH64_hash_t reserved64
    Definition xxhash.h:1703
    +
    XXH32_hash_t bufferedSize
    Definition xxhash.h:1701
    +
    XXH64_hash_t total_len
    Definition xxhash.h:1698
    +
    #define XXH3_MIDSIZE_MAX
    Maximum size of "short" key in bytes.
    Definition xxhash.h:1948
    +
    #define XXH3_SECRET_DEFAULT_SIZE
    Default Secret's size.
    Definition xxhash.h:1749
    +
    #define XXH3_INITSTATE(XXH3_state_ptr)
    Initializes a stack-allocated XXH3_state_s.
    Definition xxhash.h:1815
    +
    +
    + + + + diff --git a/index.html b/index.html index 13306245..d44b17d5 100644 --- a/index.html +++ b/index.html @@ -43,7 +43,7 @@