imate
C++/CUDA Reference
Loading...
Searching...
No Matches
split_mix_64.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3
* SPDX-License-Identifier: BSD-3-Clause
4
* SPDX-FileType: SOURCE
5
*
6
* This program is free software: you can redistribute it and/or modify it
7
* under the terms of the license found in the LICENSE.txt file in the root
8
* directory of this source tree.
9
*/
10
11
12
#ifndef _RANDOM_GENERATOR_SPLIT_MIX_64_H_
13
#define _RANDOM_GENERATOR_SPLIT_MIX_64_H_
14
15
16
// ======
17
// Header
18
// ======
19
20
#include <stdint.h>
// int64_t, uint64_t
21
22
23
// ============
24
// Split Mix 64
25
// ============
26
41
42
class
SplitMix64
43
{
44
public
:
45
explicit
SplitMix64
(
const
int64_t seed_);
46
uint64_t
next
();
47
48
protected
:
49
uint64_t
state
;
50
};
51
52
#endif
// _RANDOM_GENERATOR_SPLIT_MIX_64_H_
SplitMix64
Pseudo-random integer generator. This class generates 64-bit integer using SplitMix64 algorithm.
Definition
split_mix_64.h:43
SplitMix64::state
uint64_t state
Definition
split_mix_64.h:49
SplitMix64::next
uint64_t next()
Generates the next presudo-random number in the sequence.
Definition
split_mix_64.cpp:57
imate
_random_generator
split_mix_64.h
Generated on Tue May 12 2026 22:54:38 for imate by
1.9.8