mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-18 18:23:26 +00:00
Compare commits
4 Commits
783501aab9
...
7ebbed6763
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ebbed6763 | |||
| e271bccaf5 | |||
| 50765f69c5 | |||
| 1169534133 |
4
.github/FUNDING.yml
vendored
Normal file
4
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
open_collective: libomathorg
|
||||
github: orange-cpp
|
||||
37
CODEOWNERS
Normal file
37
CODEOWNERS
Normal file
@@ -0,0 +1,37 @@
|
||||
## List of maintainers for the omath library
|
||||
|
||||
## This file purpose is to give newcomers to the project the responsible
|
||||
## developers when submitting a pull request on GitHub, or opening a bug
|
||||
## report in issues.
|
||||
|
||||
## This file will notably establish who is responsible for a specific
|
||||
## area of omath. Being a maintainer means the following:
|
||||
## - that person has good knownledge in the area
|
||||
## - that person is able to enforce consistency in the area
|
||||
## - that person may be available for giving help in the area
|
||||
## - that person has push access on the repository
|
||||
## Being a maintainer does not mean the following:
|
||||
## - that person is dedicated to the area
|
||||
## - that person is working full-time on the area/on omath
|
||||
## - that person is paid
|
||||
## - that person is always available
|
||||
|
||||
|
||||
# omath core source code
|
||||
/source @orange-cpp
|
||||
/include @orange-cpp
|
||||
|
||||
# Tests and becnchmarks
|
||||
/benchmark @orange-cpp
|
||||
/tests @orange-cpp @luadebug
|
||||
|
||||
# Examples and documentation
|
||||
/examples @luadebug @orange-cpp
|
||||
/docs @orange-cpp
|
||||
|
||||
# Misc like formating
|
||||
/scripts @luadebug
|
||||
/pixi @luadebug
|
||||
|
||||
# CI/CD
|
||||
/.github/workflows @luadbg @orange-cpp
|
||||
@@ -62,20 +62,13 @@ namespace omath::detail
|
||||
return splitmix64(base_seed() + 0xD1B54A32D192ED03ull * (Stream + 1));
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
consteval std::uint64_t bounded_u64(const std::uint64_t x, const std::uint64_t bound)
|
||||
{
|
||||
return (x * bound) >> 64;
|
||||
}
|
||||
|
||||
template<std::int64_t Lo, std::int64_t Hi, std::uint64_t Stream>
|
||||
[[nodiscard]]
|
||||
consteval std::int64_t rand_uint8_t()
|
||||
{
|
||||
static_assert(Lo <= Hi);
|
||||
const std::uint64_t span = static_cast<std::uint64_t>(Hi - Lo) + 1ull;
|
||||
const std::uint64_t r = rand_u64<Stream>();
|
||||
return static_cast<std::int64_t>(bounded_u64(r, span)) + Lo;
|
||||
return static_cast<std::int64_t>(r) + Lo;
|
||||
}
|
||||
[[nodiscard]]
|
||||
consteval std::uint64_t rand_u64(const std::uint64_t seed, const std::uint64_t i)
|
||||
|
||||
Reference in New Issue
Block a user