Skip to content

Commit

Permalink
Update rng.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
KRM7 committed Sep 12, 2023
1 parent 25477bb commit 4fd2b90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utility/rng.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ namespace gapp::rng

struct RegisteredGenerator
{
RegisteredGenerator()
RegisteredGenerator() noexcept
{
std::scoped_lock _{ tls_generators_.lock };
instance = global_generator_.jump();
Expand All @@ -231,13 +231,13 @@ namespace gapp::rng

struct GeneratorList
{
std::mutex lock;
detail::spinlock lock;
std::vector<Generator*> list;
};

GAPP_API inline static GeneratorList& tls_generators_ = *new GeneratorList;
inline static GeneratorList& tls_generators_ = *new GeneratorList;
GAPP_API inline static constinit Xoroshiro128p global_generator_{ GAPP_SEED };
alignas(128) inline static thread_local RegisteredGenerator generator_;
alignas(128) inline static thread_local RegisteredGenerator generator_{};
};


Expand Down

0 comments on commit 4fd2b90

Please sign in to comment.