18#ifndef ARCANE_STD_PDESRANDOMNUMBERGENERATORSERVICE_H
19#define ARCANE_STD_PDESRANDOMNUMBERGENERATORSERVICE_H
23#include "arcane/core/IRandomNumberGenerator.h"
24#include "arcane/std/PDESRandomNumberGenerator_axl.h"
35class PDESRandomNumberGeneratorService
47 virtual ~PDESRandomNumberGeneratorService() {};
69 void _breakupUInt64(uint64_t uint64_in, uint32_t* front_bits, uint32_t* back_bits);
71 void _psdes(uint32_t* lword, uint32_t* irword);
85ARCANE_REGISTER_SERVICE_PDESRANDOMNUMBERGENERATOR(PDESRandomNumberGenerator, PDESRandomNumberGeneratorService);
ArcanePDESRandomNumberGeneratorObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
ByteConstArrayView viewSeed() override
Method allowing retrieval of a constant view of the current seed.
ByteUniqueArray generateRandomSeed(Integer leap=0) override
Method allowing generation of a "child" seed from a "parent" seed.
uint64_t _hashState(uint64_t initial_number)
Method to generate a new seed using the pseudo-DES algorithm.
Real generateRandomNumber(Integer leap) override
Method allowing generation of a random number using the seed in memory.
Integer neededSizeOfSeed() override
Method allowing knowledge of the seed size required for the implementation.
bool initSeed() override
Method allowing initialization of the service.
bool isLeapNumberSupported() override
Method allowing knowledge if leaps are allowed on the number generator.
void _psdes(uint32_t *lword, uint32_t *irword)
Pseudo-DES algorithm from the book: Numerical Recipes in C The Art of Scientific Computing Second Edi...
uint64_t _reconstructUInt64(uint32_t front_bits, uint32_t back_bits)
Method to combine two uint32s into a uint64.
ByteUniqueArray emptySeed() override
Method allowing retrieval of an empty seed of the correct size.
bool isLeapSeedSupported() override
Method allowing knowledge if leaps are allowed on the seed generator.
void _breakupUInt64(uint64_t uint64_in, uint32_t *front_bits, uint32_t *back_bits)
Method to split a uint64 into two uint32s.
Real _ran4(Int64 *seed, Integer leap)
Method to generate pseudo-random numbers from a seed.
eServiceType creationType() const
Type of service that can be created by this instance.
Structure containing the information to create a service.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
ArrayView< Byte > ByteArrayView
C equivalent of a 1D array of characters.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
@ ST_CaseOption
The service is used at the dataset level.
UniqueArray< Byte > ByteUniqueArray
Dynamic 1D array of characters.
double Real
Type representing a real number.
ConstArrayView< Byte > ByteConstArrayView
C equivalent of a 1D array of characters.