(3ccb4ce781463f1b8e0cb4c9283b3067fe92a32e)
#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.
|
QT_BEGIN_NAMESPACE void | qt_from_latin1 (char16_t *dst, const char *str, size_t size) noexcept |
|
Q_NEVER_INLINE static Q_DECL_HOT_FUNCTION uint64_t | murmurhash (const void *key, uint64_t len, uint64_t seed) noexcept |
|
template<ZeroExtension = None> |
static size_t | qHashBits_fallback (const uchar *p, size_t size, size_t seed, size_t seed2) noexcept |
|
template<> |
size_t | qHashBits_fallback< None > (const uchar *p, size_t size, size_t seed, size_t seed2) noexcept |
|
template<> |
size_t | qHashBits_fallback< ByteToWord > (const uchar *data, size_t size, size_t seed, size_t seed2) noexcept |
|
size_t | qHashBits (const void *p, size_t size, size_t seed) noexcept |
|
size_t | qHash (QByteArrayView key, size_t seed) noexcept |
|
size_t | qHash (QStringView key, size_t seed) noexcept |
|
size_t | qHash (const QBitArray &bitArray, size_t seed=0) |
|
size_t | qHash (QLatin1StringView key, size_t seed) noexcept |
|
uint | qt_hash (QStringView key, uint chained) noexcept |
|
template<> |
size_t | qHashBits_fallback< None > (const uchar *p, size_t size, size_t seed, size_t seed2) noexcept |
|
template<> |
size_t | qHashBits_fallback< ByteToWord > (const uchar *data, size_t size, size_t seed, size_t seed2) noexcept |
|
◆ _CRT_RAND_S
◆ Q_DECL_HOT_FUNCTION
#define Q_DECL_HOT_FUNCTION |
◆ ZeroExtension [1/2]
Enumerator |
---|
None | |
ByteToWord | |
None | |
ByteToWord | |
Definition at line 291 of file qhash.cpp.
◆ ZeroExtension [2/2]
Enumerator |
---|
None | |
ByteToWord | |
None | |
ByteToWord | |
Definition at line 291 of file qhash.cpp.
◆ murmurhash()
◆ qHash() [1/4]
size_t qHash |
( |
const QBitArray & | bitArray, |
|
|
size_t | seed = 0 ) |
|
related |
◆ qHash() [2/4]
◆ qHash() [3/4]
◆ qHash() [4/4]
◆ qHashBits()
size_t qHashBits |
( |
const void * | p, |
|
|
size_t | size, |
|
|
size_t | seed ) |
|
related |
◆ qHashBits_fallback()
static size_t qHashBits_fallback |
( |
const uchar * | p, |
|
|
size_t | size, |
|
|
size_t | seed, |
|
|
size_t | seed2 ) |
|
staticnoexcept |
◆ qHashBits_fallback< ByteToWord >() [1/2]
◆ qHashBits_fallback< ByteToWord >() [2/2]
◆ qHashBits_fallback< None >() [1/2]
◆ qHashBits_fallback< None >() [2/2]
◆ qt_from_latin1()
◆ qt_hash()
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.
Definition at line 1086 of file qhash.cpp.
◆ qt_qhash_seed
static Q_CONSTINIT HashSeedStorage qt_qhash_seed |
|
static |