chromium/third_party/skia/src/core/SkChecksum.cpp

/*
 * Copyright 2023 Google LLC
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#include "src/core/SkChecksum.h"

#include <cstring>

// wyhash, a fast and good hash function, from https://github.com/wangyi-fudan/wyhash

// likely and unlikely macros
#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
#define _likely_(x)
#define _unlikely_(x)
#else
#define _likely_
#define _unlikely_
#endif

// 128bit multiply function
static inline void _wymum(uint64_t* A, uint64_t* B) {}

// multiply and xor mix function, aka MUM
static inline uint64_t _wymix(uint64_t A, uint64_t B) {}

// read functions
static inline uint64_t _wyr8(const uint8_t* p) {}

static inline uint64_t _wyr4(const uint8_t* p) {}

static inline uint64_t _wyr3(const uint8_t* p, size_t k) {}

// wyhash main function
static inline uint64_t wyhash(const void* key, size_t len, uint64_t seed, const uint64_t* secret) {}

// the default secret parameters
static const uint64_t _wyp[4] =;

namespace SkChecksum {

uint32_t Hash32(const void *data, size_t bytes, uint32_t seed) {}

uint64_t Hash64(const void *data, size_t bytes, uint64_t seed) {}

}  // namespace SkChecksum