alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
PhiloxStatelessKeyedBase.hpp
Go to the documentation of this file.
1/* Copyright 2022 Jeffrey Kelling
2 * SPDX-License-Identifier: MPL-2.0
3 */
4
5#pragma once
6
8
10{
11 /** Common class for Philox family engines
12 *
13 * Checks the validity of passed-in parameters and calls the backend methods to perform N rounds of the
14 * Philox shuffle.
15 *
16 * @tparam TParams Philox algorithm parameters \sa PhiloxParams
17 */
18 template<typename TParams>
20 {
21 public:
24
25 Key const m_key;
26
28 {
29 }
30
31 ALPAKA_FN_HOST_ACC auto operator()(Counter const& counter) const
32 {
33 return this->generate(counter, m_key);
34 }
35 };
36} // namespace alpaka::rand::engine
A n-dimensional vector.
Definition Vec.hpp:38
static ALPAKA_FN_HOST_ACC auto generate(Counter const &counter, Key const &key) -> Counter
#define ALPAKA_FN_HOST_ACC
Definition Common.hpp:39
The random number generator engine specifics.
STL namespace.
typename PhiloxStateless< TParams >::Counter Counter
typename PhiloxStateless< TParams >::Key Key
ALPAKA_FN_HOST_ACC auto operator()(Counter const &counter) const