Skip to content

Instantly share code, notes, and snippets.

@degski
degski / invertible_hash_functions.hpp
Last active May 6, 2024 13:29
invertible hash functions
// MIT License
//
// Copyright (c) 2018 degski
//
// 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
@degski
degski / lehmer.hpp
Created July 9, 2018 11:42
re-write of lehmer.hpp (https://gist.github.com/imneme/aeae7628565f15fb3fef54be8533e39c) as a workaround for an ICE in Clang/LLVM
#ifndef LEHMER_HPP_INCLUDED
#define LEHMER_HPP_INCLUDED 1
/*
* A C++ implementation of fast, 128-bit, Lehmer-style PRNGs
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Melissa E. O'Neill
* Copyright (c) 2018 degski