Revision 2a3f669979acd4ca7356c5e046d7019a0d7f504c authored by Rafael Fourquet on 01 October 2023, 15:10:30 UTC, committed by Rafael Fourquet on 12 October 2023, 10:09:28 UTC
The most convenient way to define `seed!` for new RNGs is via an another RNG, with `seed!(rng::AbstractRNG, seeder::AbstractRNG)`. But RNGs want to also support more usual seeds. In order to allow them to only define the method above, a new `SeedHasher` RNG is implemented, whose purpose is to convert an initial given seed into a stream of random numbers. Given that it's not always "safe" to seed an RNG from another RNG, `SeedHasher` uses a strong cryptographic hash (SHA2) to produces random streams. The generic `seed!(rng::AbstractRNG, seed)` method now takes care of forwarding the call to `seed!(rng, SeedHasher(seed))`.
1 parent cf363f9
llvm-options.mk
ifneq ($(LLVM_DEBUG),0)
ifeq ($(LLVM_DEBUG),1)
LLVM_BUILDTYPE := Debug
else
LLVM_BUILDTYPE := RelWithDebInfo
endif
else
LLVM_BUILDTYPE := Release
endif
LLVM_CMAKE_BUILDTYPE := $(LLVM_BUILDTYPE)
ifeq ($(LLVM_ASSERTIONS),1)
LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+Asserts
endif
LLVM_FLAVOR := $(LLVM_BUILDTYPE)
ifeq ($(LLVM_SANITIZE),1)
ifeq ($(SANITIZE_MEMORY),1)
LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+MSAN
endif
ifeq ($(SANITIZE_ADDRESS),1)
LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+ASAN
endif
ifeq ($(SANITIZE_THREAD),1)
LLVM_BUILDTYPE := $(LLVM_BUILDTYPE)+TSAN
endif
endif
Computing file changes ...