alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
include
alpaka
rand
engine
philox
PhiloxState.hpp
Go to the documentation of this file.
1
/* Copyright 2022-2025 Jiri Vyskocil, Rene Widera, Bernhard Manfred Gruber, Tim Hanel
2
* SPDX-License-Identifier: MPL-2.0
3
*/
4
5
#pragma once
6
7
#include <cstdint>
8
9
namespace
alpaka::rand::engine::internal
10
{
11
template
<
typename
T_Params>
12
class
PhiloxSingle
;
13
template
<
typename
T_Params>
14
class
PhiloxVector
;
15
16
/** Philox state
17
*
18
* @tparam T_Counter Type of the Counter array
19
* @tparam T_Key Type of the Key array
20
*/
21
template
<
typename
T_Counter,
typename
T_Key,
typename
Impl>
22
struct
PhiloxState
;
23
24
/** Philox state specialization for vector engine
25
* more memory/register efficient
26
*
27
*/
28
template
<
typename
T_Counter,
typename
T_Key,
typename
T_Params>
29
struct
PhiloxState
<T_Counter, T_Key,
PhiloxVector
<T_Params>>
30
{
31
using
Counter
= T_Counter;
32
using
Key
= T_Key;
33
Counter
counter
;
34
Key
key
;
35
};
36
37
/** Philox state specialization for single value engine
38
*
39
* @tparam T_Counter Type of the Counter array
40
* @tparam T_Key Type of the Key array
41
*/
42
template
<
typename
T_Counter,
typename
T_Key,
typename
T_Params>
43
struct
PhiloxState
<T_Counter, T_Key,
PhiloxSingle
<T_Params>>
44
{
45
using
Counter
= T_Counter;
46
using
Key
= T_Key;
47
48
Counter
counter
;
49
Key
key
;
50
Counter
result
;
51
std::uint32_t
position
;
52
};
53
54
}
// namespace alpaka::rand::engine::internal
alpaka::rand::engine::internal::PhiloxSingle
Philox engine generating a single number.
Definition
PhiloxSingle.hpp:27
alpaka::rand::engine::internal::PhiloxVector
Philox engine generating a vector of numbers.
Definition
PhiloxVector.hpp:22
alpaka::rand::engine::internal
Definition
multiplyAndSplit64to32.hpp:12
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxSingle< T_Params > >::key
Key key
Definition
PhiloxState.hpp:49
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxSingle< T_Params > >::position
std::uint32_t position
Definition
PhiloxState.hpp:51
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxSingle< T_Params > >::counter
Counter counter
Definition
PhiloxState.hpp:48
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxSingle< T_Params > >::result
Counter result
Definition
PhiloxState.hpp:50
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxSingle< T_Params > >::Counter
T_Counter Counter
Definition
PhiloxState.hpp:45
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxSingle< T_Params > >::Key
T_Key Key
Definition
PhiloxState.hpp:46
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxVector< T_Params > >::counter
Counter counter
Definition
PhiloxState.hpp:33
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxVector< T_Params > >::key
Key key
Definition
PhiloxState.hpp:34
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxVector< T_Params > >::Counter
T_Counter Counter
Definition
PhiloxState.hpp:31
alpaka::rand::engine::internal::PhiloxState< T_Counter, T_Key, PhiloxVector< T_Params > >::Key
T_Key Key
Definition
PhiloxState.hpp:32
alpaka::rand::engine::internal::PhiloxState
Philox state.
Definition
PhiloxState.hpp:22
Generated on
for alpaka by
1.16.1