Class XoshiroSIMD
Defined in File xoshiro_simd.hpp
Nested Relationships
Nested Types
Class Documentation
-
class XoshiroSIMD
XoshiroSIMD: runtime SIMD dispatch via inline union + function pointers. No heap allocation, no virtual dispatch.
Public Types
-
using result_type = std::uint64_t
Public Functions
-
explicit XoshiroSIMD(result_type seed, result_type thread_id = 0, result_type cluster_id = 0) noexcept
-
inline result_type operator()() noexcept
-
inline double uniform() noexcept
-
inline void jump() noexcept
-
inline void mid_jump() noexcept
-
inline void long_jump() noexcept
-
inline void get_flat_state(result_type *out) const noexcept
-
inline void set_flat_state(const result_type *in) noexcept
-
inline std::uint8_t simd_width() const noexcept
-
inline std::uint8_t cache_index() const noexcept
-
inline void set_cache_index(std::uint8_t idx) noexcept
-
inline const std::array<result_type, std::numeric_limits<std::uint8_t>::max() + 1> &cache() const noexcept
-
inline std::array<result_type, std::numeric_limits<std::uint8_t>::max() + 1> &cache() noexcept
Public Static Functions
- static inline constexpr result_type() min () noexcept
- static inline constexpr result_type() max () noexcept
Protected Types
-
using populate_fn = void (*)(void*, std::array<result_type, CACHE_SIZE>&) noexcept
-
using jump_fn = void (*)(void*) noexcept
-
using get_state_fn = void (*)(const void*, result_type*) noexcept
-
using set_state_fn = void (*)(void*, const result_type*) noexcept
-
using simd_width_fn = std::uint8_t (*)() noexcept
Protected Attributes
-
std::array<result_type, CACHE_SIZE> m_cache = {}
-
StateStorage m_state
-
populate_fn m_populate_cache = nullptr
-
jump_fn m_jump = nullptr
-
jump_fn m_mid_jump = nullptr
-
jump_fn m_long_jump = nullptr
-
get_state_fn m_get_state = nullptr
-
set_state_fn m_set_state = nullptr
-
simd_width_fn m_simd_width = nullptr
-
std::uint8_t m_index = {0}
Protected Static Attributes
-
static constexpr std::uint16_t CACHE_SIZE = std::numeric_limits<std::uint8_t>::max() + 1
-
struct StateStorage
Public Members
-
unsigned char data[SIZE]
Public Static Attributes
-
static constexpr std::size_t SIZE = 256
-
static constexpr std::size_t ALIGN = 64
-
unsigned char data[SIZE]
-
using result_type = std::uint64_t