![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <stdlib.h>#include <stdint.h>#include "qhash.h"#include <qbitarray.h>#include <qstring.h>#include <qglobal.h>#include <qbytearray.h>#include <qdatetime.h>#include <qbasicatomic.h>#include <qendian.h>#include <private/qrandom_p.h>#include <private/qsimd_p.h>#include <qcoreapplication.h>#include <qrandom.h>#include <private/qlocale_tools_p.h>#include "../../3rdparty/siphash/siphash.cpp"#include <array>#include <limits.h>#include <assert.h>Go to the source code of this file.
Macros | |
| #define | _CRT_RAND_S |
| #define | Q_DECL_HOT_FUNCTION |
Enumerations | |
| enum | ZeroExtension { None = 0 , ByteToWord = 1 , None = 0 , ByteToWord = 1 } |
| enum | ZeroExtension { None = 0 , ByteToWord = 1 , None = 0 , ByteToWord = 1 } |
Functions | |
| QT_BEGIN_NAMESPACE void | qt_from_latin1 (char16_t *dstdst, const char *str, size_t sizesize) noexcept |
| Q_NEVER_INLINE static Q_DECL_HOT_FUNCTION uint64_t | murmurhash (const void *keykey, uint64_t lenlen, uint64_t seed) noexcept |
| template<ZeroExtension = None> | |
| static size_t | qHashBits_fallback (const uchar *pp, size_t sizesize, size_t seed, size_t seed2) noexcept |
| template<> | |
| size_t | qHashBits_fallback< None > (const uchar *pp, size_t sizesize, size_t seed, size_t seed2) noexcept |
| template<> | |
| size_t | qHashBits_fallback< ByteToWord > (const uchar *datadata, size_t sizesize, size_t seed, size_t seed2) noexcept |
| size_t | qHashBits (const void *pp, size_t sizesize, size_t seed) noexcept |
| size_t | qHash (QByteArrayView keykey, size_t seed) noexcept |
| size_t | qHash (QStringView keykey, size_t seed) noexcept |
| size_t | qHash (const QBitArray &bitArray, size_t seed=0) |
| size_t | qHash (QLatin1StringView keykey, size_t seed) noexcept |
| uint | qt_hash (QStringView keykey, uint chained) noexcept |
| size_t | qHash (double keykey, size_t seed) noexcept |
| size_t | qHash (long double keykey, size_t seed) noexcept |
| template<> | |
| size_t | qHashBits_fallback< None > (const uchar *pp, size_t sizesize, size_t seed, size_t seed2) noexcept |
| template<> | |
| size_t | qHashBits_fallback< ByteToWord > (const uchar *datadata, size_t sizesize, size_t seed, size_t seed2) noexcept |
Variables | |
| static Q_CONSTINIT HashSeedStorage | qt_qhash_seed |
| enum ZeroExtension |
| enum ZeroExtension |
|
inlinestaticnoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
|
staticnoexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Definition at line 922 of file qstring.cpp.
|
noexcept |
Private copy of the implementation of the Qt 4 qHash algorithm for strings, (that is, QChar-based arrays, so all QString-like classes), to be used wherever the result is somehow stored or reused across multiple Qt versions. The public qHash implementation can change at any time, therefore one must not rely on the fact that it will always give the same results.
The qt_hash functions must never change their results.
This function can hash discontiguous memory by invoking it on each chunk, passing the previous's result in the next call's chained argument.