mkl-devel-dpcpp 2025.0.1__py2.py3-none-win_amd64.whl → 2025.2.0__py2.py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mkl-devel-dpcpp might be problematic. Click here for more details.
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_blas_dll.lib +0 -0
- mkl_devel_dpcpp-2025.2.0.data/data/Library/lib/mkl_sycl_dft_dll.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_dll.lib +0 -0
- mkl_devel_dpcpp-2025.2.0.data/data/Library/lib/mkl_sycl_lapack_dll.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_rng_dll.lib +0 -0
- mkl_devel_dpcpp-2025.2.0.data/data/Library/lib/mkl_sycl_sparse_dll.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/METADATA +4 -3
- mkl_devel_dpcpp-2025.2.0.dist-info/RECORD +15 -0
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/bfloat16.hpp +0 -26
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/buffer.hpp +0 -42
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/buffer_decls.hpp +0 -880
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/types.hpp +0 -60
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/usm.hpp +0 -42
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/usm_decls.hpp +0 -1240
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas.hpp +0 -33
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/dft.hpp +0 -253
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/dfti.hpp +0 -22
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/exceptions.hpp +0 -110
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting/interpolate.hpp +0 -67
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting/spline_and_data_params.hpp +0 -68
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting/splines.hpp +0 -177
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting.hpp +0 -22
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/export.hpp +0 -25
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/concepts.hpp +0 -55
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/exceptions.hpp +0 -75
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/lapack.hpp +0 -1095
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/scratchpad.hpp +0 -106
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack.hpp +0 -23
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/detail/engine_base.hpp +0 -48
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/bernoulli_impl.hpp +0 -89
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/beta_impl.hpp +0 -464
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/bits_impl.hpp +0 -71
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/distribution_base.hpp +0 -81
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/engine_base.hpp +0 -43
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/engine_helpers_base.hpp +0 -54
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/exponential_impl.hpp +0 -116
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/gamma_impl.hpp +0 -285
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/gaussian_impl.hpp +0 -270
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/lognormal_impl.hpp +0 -105
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg31m1_helpers_impl.hpp +0 -117
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp +0 -223
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg59_helpers_impl.hpp +0 -118
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg59_impl.hpp +0 -266
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mrg32k3a_helpers_impl.hpp +0 -125
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mrg32k3a_impl.hpp +0 -385
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mrg32k3a_skip_ahead_matrix.hpp +0 -3668
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/philox4x32x10_helpers_impl.hpp +0 -141
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/philox4x32x10_impl.hpp +0 -552
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/poisson_impl.hpp +0 -355
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/types.hpp +0 -58
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/uniform_bits_impl.hpp +0 -51
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/uniform_impl.hpp +0 -289
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/vm_wrappers.hpp +0 -183
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/distributions.hpp +0 -637
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/engine_helpers.hpp +0 -116
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/engines.hpp +0 -187
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/functions.hpp +0 -59
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/types.hpp +0 -74
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device.hpp +0 -29
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/distributions.hpp +0 -1913
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/engines.hpp +0 -788
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/functions.hpp +0 -163
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng.hpp +0 -22
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas/sparse_auxiliary.hpp +0 -111
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas/sparse_operations.hpp +0 -446
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas/sparse_structures.hpp +0 -193
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas.hpp +0 -32
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/stats.hpp +0 -356
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/types.hpp +0 -321
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/buffer.hpp +0 -3529
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/decls.hpp +0 -280
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/decls.hpp +0 -81
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/dispatch.hpp +0 -1059
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/ep.hpp +0 -861
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/ha.hpp +0 -860
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/la.hpp +0 -860
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/rts.hpp +0 -4608
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/scalar.hpp +0 -8963
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/vm.hpp +0 -460
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/span.hpp +0 -3813
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/usm.hpp +0 -3581
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm.hpp +0 -30
- mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl.hpp +0 -34
- mkl_devel_dpcpp-2025.0.1.data/data/Library/lib/mkl_sycl_dft_dll.lib +0 -0
- mkl_devel_dpcpp-2025.0.1.data/data/Library/lib/mkl_sycl_lapack_dll.lib +0 -0
- mkl_devel_dpcpp-2025.0.1.data/data/Library/lib/mkl_sycl_sparse_dll.lib +0 -0
- mkl_devel_dpcpp-2025.0.1.dist-info/RECORD +0 -90
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_data_fitting_dll.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_stats_dll.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_vm_dll.lib +0 -0
- {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/LICENSE.txt +0 -0
- {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/WHEEL +0 -0
- {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/top_level.txt +0 -0
mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/beta_impl.hpp
DELETED
|
@@ -1,464 +0,0 @@
|
|
|
1
|
-
/*******************************************************************************
|
|
2
|
-
* Copyright 2024 Intel Corporation
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing,
|
|
11
|
-
* software distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions
|
|
14
|
-
* and limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
*******************************************************************************/
|
|
19
|
-
|
|
20
|
-
#ifndef _MKL_RNG_DEVICE_BETA_IMPL_HPP_
|
|
21
|
-
#define _MKL_RNG_DEVICE_BETA_IMPL_HPP_
|
|
22
|
-
|
|
23
|
-
#include "vm_wrappers.hpp"
|
|
24
|
-
|
|
25
|
-
namespace oneapi::mkl::rng::device::detail {
|
|
26
|
-
|
|
27
|
-
enum class beta_algorithm { Johnk = 0, Atkinson1, Atkinson2, Atkinson3, Cheng, p1, q1, p1q1 };
|
|
28
|
-
|
|
29
|
-
// log(4)=1.3862944..
|
|
30
|
-
template <typename DataType>
|
|
31
|
-
inline DataType log4() {
|
|
32
|
-
if constexpr (std::is_same_v<DataType, double>)
|
|
33
|
-
return 0x1.62e42fefa39efp+0;
|
|
34
|
-
else
|
|
35
|
-
return 0x1.62e43p+0f;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// K=0.85225521765372429631847
|
|
39
|
-
template <typename DataType>
|
|
40
|
-
inline DataType beta_k() {
|
|
41
|
-
if constexpr (std::is_same_v<DataType, double>)
|
|
42
|
-
return 0x1.b45acbbf56123p-1;
|
|
43
|
-
else
|
|
44
|
-
return 0x1.b45accp-1f;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// C=-0.956240971340815081432202
|
|
48
|
-
template <typename DataType>
|
|
49
|
-
inline DataType beta_c() {
|
|
50
|
-
if constexpr (std::is_same_v<DataType, double>)
|
|
51
|
-
return -0x1.e9986aa60216p-1;
|
|
52
|
-
else
|
|
53
|
-
return -0x1.e9986ap-1f;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
template <typename RealType, typename Method>
|
|
57
|
-
class distribution_base<oneapi::mkl::rng::device::beta<RealType, Method>> {
|
|
58
|
-
public:
|
|
59
|
-
struct param_type {
|
|
60
|
-
param_type(RealType p, RealType q, RealType a, RealType b) : p_(p), q_(q), a_(a), b_(b) {}
|
|
61
|
-
RealType p_;
|
|
62
|
-
RealType q_;
|
|
63
|
-
RealType a_;
|
|
64
|
-
RealType b_;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
distribution_base(RealType p, RealType q, RealType a, RealType b)
|
|
68
|
-
: p_(p),
|
|
69
|
-
q_(q),
|
|
70
|
-
a_(a),
|
|
71
|
-
b_(b),
|
|
72
|
-
count_(0) {
|
|
73
|
-
set_algorithm();
|
|
74
|
-
#ifndef __SYCL_DEVICE_ONLY__
|
|
75
|
-
if (p <= RealType(0.0)) {
|
|
76
|
-
throw oneapi::mkl::invalid_argument("rng", "beta", "p <= 0");
|
|
77
|
-
}
|
|
78
|
-
else if (q <= RealType(0.0)) {
|
|
79
|
-
throw oneapi::mkl::invalid_argument("rng", "beta", "q <= 0");
|
|
80
|
-
}
|
|
81
|
-
else if (b <= RealType(0.0)) {
|
|
82
|
-
throw oneapi::mkl::invalid_argument("rng", "beta", "b <= 0");
|
|
83
|
-
}
|
|
84
|
-
#endif
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
RealType p() const {
|
|
88
|
-
return p_;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
RealType q() const {
|
|
92
|
-
return q_;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
RealType a() const {
|
|
96
|
-
return a_;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
RealType b() const {
|
|
100
|
-
return b_;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
std::size_t count_rejected_numbers() const {
|
|
104
|
-
return count_;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
param_type param() const {
|
|
108
|
-
return param_type(p_, q_, a_, b_);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
void param(const param_type& pt) {
|
|
112
|
-
#ifndef __SYCL_DEVICE_ONLY__
|
|
113
|
-
if (pt.p_ <= RealType(0.0)) {
|
|
114
|
-
throw oneapi::mkl::invalid_argument("rng", "beta", "p <= 0");
|
|
115
|
-
}
|
|
116
|
-
else if (pt.q_ <= RealType(0.0)) {
|
|
117
|
-
throw oneapi::mkl::invalid_argument("rng", "beta", "q <= 0");
|
|
118
|
-
}
|
|
119
|
-
else if (pt.b_ <= RealType(0.0)) {
|
|
120
|
-
throw oneapi::mkl::invalid_argument("rng", "beta", "b <= 0");
|
|
121
|
-
}
|
|
122
|
-
#endif
|
|
123
|
-
p_ = pt.p_;
|
|
124
|
-
q_ = pt.q_;
|
|
125
|
-
a_ = pt.a_;
|
|
126
|
-
b_ = pt.b_;
|
|
127
|
-
set_algorithm();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
protected:
|
|
131
|
-
template <std::int32_t n, typename T>
|
|
132
|
-
T pq_kernel(T& z) {
|
|
133
|
-
for (std::int32_t i = 0; i < n; i++) {
|
|
134
|
-
if (p_ == RealType(1.0)) {
|
|
135
|
-
z[i] = pow_wrapper(z[i], RealType(1) / q_);
|
|
136
|
-
z[i] = RealType(1.0) - z[i];
|
|
137
|
-
}
|
|
138
|
-
if (q_ == RealType(1.0)) {
|
|
139
|
-
z[i] = pow_wrapper(z[i], RealType(1) / p_);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
count_ = 0;
|
|
143
|
-
|
|
144
|
-
// p1q1
|
|
145
|
-
return a_ + b_ * z;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
template <std::int32_t n, typename T, typename EngineType>
|
|
149
|
-
T acc_rej_kernel(T& z, EngineType& engine) {
|
|
150
|
-
RealType s, t;
|
|
151
|
-
|
|
152
|
-
RealType flKoef1, flKoef2, flKoef3, flKoef4, flKoef5, flKoef6;
|
|
153
|
-
RealType flDeg[2];
|
|
154
|
-
|
|
155
|
-
if (algorithm_ == beta_algorithm::Atkinson1) {
|
|
156
|
-
RealType flInv_s[2], flTmp[2];
|
|
157
|
-
flTmp[0] = p_ * (RealType(1.0) - p_);
|
|
158
|
-
flTmp[1] = q_ * (RealType(1.0) - q_);
|
|
159
|
-
|
|
160
|
-
flTmp[0] = sqrt_wrapper(flTmp[0]);
|
|
161
|
-
flTmp[1] = sqrt_wrapper(flTmp[1]);
|
|
162
|
-
|
|
163
|
-
t = flTmp[0] / (flTmp[0] + flTmp[1]);
|
|
164
|
-
|
|
165
|
-
s = q_ * t;
|
|
166
|
-
s = s / (s + p_ * (RealType(1.0) - t));
|
|
167
|
-
|
|
168
|
-
flInv_s[0] = RealType(1.0) / s;
|
|
169
|
-
flInv_s[1] = RealType(1.0) / (RealType(1.0) - s);
|
|
170
|
-
flDeg[0] = RealType(1.0) / p_;
|
|
171
|
-
flDeg[1] = RealType(1.0) / q_;
|
|
172
|
-
|
|
173
|
-
flInv_s[0] = pow_wrapper(flInv_s[0], flDeg[0]);
|
|
174
|
-
flInv_s[1] = pow_wrapper(flInv_s[1], flDeg[1]);
|
|
175
|
-
|
|
176
|
-
flKoef1 = t * flInv_s[0];
|
|
177
|
-
flKoef2 = (RealType(1.0) - t) * flInv_s[1];
|
|
178
|
-
flKoef3 = RealType(1.0) - q_;
|
|
179
|
-
flKoef4 = RealType(1.0) - p_;
|
|
180
|
-
flKoef5 = RealType(1.0) / (RealType(1.0) - t);
|
|
181
|
-
flKoef6 = RealType(1.0) / t;
|
|
182
|
-
}
|
|
183
|
-
else if (algorithm_ == beta_algorithm::Atkinson2) {
|
|
184
|
-
RealType flInv_s[2], flTmp;
|
|
185
|
-
|
|
186
|
-
t = RealType(1.0) - p_;
|
|
187
|
-
t /= (t + q_);
|
|
188
|
-
|
|
189
|
-
flTmp = RealType(1.0) - t;
|
|
190
|
-
flTmp = pow_wrapper(flTmp, q_);
|
|
191
|
-
s = q_ * t;
|
|
192
|
-
s /= (s + p_ * flTmp);
|
|
193
|
-
|
|
194
|
-
flInv_s[0] = RealType(1.0) / s;
|
|
195
|
-
flInv_s[1] = RealType(1.0) / (RealType(1.0) - s);
|
|
196
|
-
flDeg[0] = RealType(1.0) / p_;
|
|
197
|
-
flDeg[1] = RealType(1.0) / q_;
|
|
198
|
-
|
|
199
|
-
flInv_s[0] = pow_wrapper(flInv_s[0], flDeg[0]);
|
|
200
|
-
flInv_s[1] = pow_wrapper(flInv_s[1], flDeg[1]);
|
|
201
|
-
|
|
202
|
-
flKoef1 = t * flInv_s[0];
|
|
203
|
-
flKoef2 = (RealType(1.0) - t) * flInv_s[1];
|
|
204
|
-
flKoef3 = RealType(1.0) - q_;
|
|
205
|
-
flKoef4 = RealType(1.0) - p_;
|
|
206
|
-
}
|
|
207
|
-
else if (algorithm_ == beta_algorithm::Atkinson3) {
|
|
208
|
-
RealType flInv_s[2], flTmp;
|
|
209
|
-
|
|
210
|
-
t = RealType(1.0) - q_;
|
|
211
|
-
t /= (t + p_);
|
|
212
|
-
|
|
213
|
-
flTmp = RealType(1.0) - t;
|
|
214
|
-
flTmp = pow_wrapper(flTmp, p_);
|
|
215
|
-
s = p_ * t;
|
|
216
|
-
s /= (s + q_ * flTmp);
|
|
217
|
-
|
|
218
|
-
flInv_s[0] = RealType(1.0) / s;
|
|
219
|
-
flInv_s[1] = RealType(1.0) / (RealType(1.0) - s);
|
|
220
|
-
flDeg[0] = RealType(1.0) / q_;
|
|
221
|
-
flDeg[1] = RealType(1.0) / p_;
|
|
222
|
-
|
|
223
|
-
flInv_s[0] = pow_wrapper(flInv_s[0], flDeg[0]);
|
|
224
|
-
flInv_s[1] = pow_wrapper(flInv_s[1], flDeg[1]);
|
|
225
|
-
|
|
226
|
-
flKoef1 = t * flInv_s[0];
|
|
227
|
-
flKoef2 = (RealType(1.0) - t) * flInv_s[1];
|
|
228
|
-
flKoef3 = RealType(1.0) - p_;
|
|
229
|
-
flKoef4 = RealType(1.0) - q_;
|
|
230
|
-
}
|
|
231
|
-
else if (algorithm_ == beta_algorithm::Cheng) {
|
|
232
|
-
flKoef1 = p_ + q_;
|
|
233
|
-
flKoef2 = (flKoef1 - RealType(2.0)) / (RealType(2.0) * p_ * q_ - flKoef1);
|
|
234
|
-
flKoef2 = sqrt_wrapper(flKoef2);
|
|
235
|
-
flKoef3 = p_ + RealType(1.0) / flKoef2;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
RealType z1, z2;
|
|
239
|
-
|
|
240
|
-
count_ = 0;
|
|
241
|
-
for (int i = 0; i < n; i++) {
|
|
242
|
-
while (1) { // looping until satisfied
|
|
243
|
-
z1 = engine.generate_single(RealType(0), RealType(1));
|
|
244
|
-
z2 = engine.generate_single(RealType(0), RealType(1));
|
|
245
|
-
|
|
246
|
-
if (algorithm_ == beta_algorithm::Johnk) {
|
|
247
|
-
RealType flU1, flU2, flSum;
|
|
248
|
-
z1 = ln_wrapper(z1) / p_;
|
|
249
|
-
z2 = ln_wrapper(z2) / q_;
|
|
250
|
-
|
|
251
|
-
z1 = exp_wrapper(z1);
|
|
252
|
-
z2 = exp_wrapper(z2);
|
|
253
|
-
|
|
254
|
-
flU1 = z1;
|
|
255
|
-
flU2 = z2;
|
|
256
|
-
flSum = flU1 + flU2;
|
|
257
|
-
if (flSum > RealType(0.0) && flSum <= RealType(1.0)) {
|
|
258
|
-
z[i] = flU1 / flSum;
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
if (algorithm_ == beta_algorithm::Atkinson1) {
|
|
263
|
-
RealType flU, flExp, flX, flLn;
|
|
264
|
-
z2 = ln_wrapper(z2);
|
|
265
|
-
|
|
266
|
-
flU = z1;
|
|
267
|
-
flExp = z2;
|
|
268
|
-
if (flU <= s) {
|
|
269
|
-
flU = pow_wrapper(flU, flDeg[0]);
|
|
270
|
-
flX = flKoef1 * flU;
|
|
271
|
-
flLn = (RealType(1.0) - flX) * flKoef5;
|
|
272
|
-
flLn = ln_wrapper(flLn);
|
|
273
|
-
if (flKoef3 * flLn + flExp <= RealType(0.0)) {
|
|
274
|
-
z[i] = flX;
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
else {
|
|
279
|
-
flU = RealType(1.0) - flU;
|
|
280
|
-
flU = pow_wrapper(flU, flDeg[1]);
|
|
281
|
-
flX = RealType(1.0) - flKoef2 * flU;
|
|
282
|
-
|
|
283
|
-
flLn = flX * flKoef6;
|
|
284
|
-
flLn = ln_wrapper(flLn);
|
|
285
|
-
if (flKoef4 * flLn + flExp <= RealType(0.0)) {
|
|
286
|
-
z[i] = flX;
|
|
287
|
-
break;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
if (algorithm_ == beta_algorithm::Atkinson2) {
|
|
292
|
-
RealType flU, flExp, flX, flLn;
|
|
293
|
-
z2 = ln_wrapper(z2);
|
|
294
|
-
|
|
295
|
-
flU = z1;
|
|
296
|
-
flExp = z2;
|
|
297
|
-
if (flU <= s) {
|
|
298
|
-
flU = pow_wrapper(flU, flDeg[0]);
|
|
299
|
-
flX = flKoef1 * flU;
|
|
300
|
-
flLn = (RealType(1.0) - flX);
|
|
301
|
-
flLn = ln_wrapper(flLn);
|
|
302
|
-
if (flKoef3 * flLn + flExp <= RealType(0.0)) {
|
|
303
|
-
z[i] = flX;
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
flU = RealType(1.0) - flU;
|
|
309
|
-
flU = pow_wrapper(flU, flDeg[1]);
|
|
310
|
-
flX = RealType(1.0) - flKoef2 * flU;
|
|
311
|
-
|
|
312
|
-
flLn = flX / t;
|
|
313
|
-
flLn = ln_wrapper(flLn);
|
|
314
|
-
if (flKoef4 * flLn + flExp <= RealType(0.0)) {
|
|
315
|
-
z[i] = flX;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
if (algorithm_ == beta_algorithm::Atkinson3) {
|
|
321
|
-
RealType flU, flExp, flX, flLn;
|
|
322
|
-
z2 = ln_wrapper(z2);
|
|
323
|
-
|
|
324
|
-
flU = z1;
|
|
325
|
-
flExp = z2;
|
|
326
|
-
if (flU <= s) {
|
|
327
|
-
flU = pow_wrapper(flU, flDeg[0]);
|
|
328
|
-
flX = flKoef1 * flU;
|
|
329
|
-
flLn = (RealType(1.0) - flX);
|
|
330
|
-
flLn = ln_wrapper(flLn);
|
|
331
|
-
if (flKoef3 * flLn + flExp <= RealType(0.0)) {
|
|
332
|
-
z[i] = RealType(1.0) - flX;
|
|
333
|
-
break;
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
flU = RealType(1.0) - flU;
|
|
338
|
-
flU = pow_wrapper(flU, flDeg[1]);
|
|
339
|
-
flX = RealType(1.0) - flKoef2 * flU;
|
|
340
|
-
|
|
341
|
-
flLn = flX / t;
|
|
342
|
-
flLn = ln_wrapper(flLn);
|
|
343
|
-
if (flKoef4 * flLn + flExp <= RealType(0.0)) {
|
|
344
|
-
z[i] = RealType(1.0) - flX;
|
|
345
|
-
break;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
if (algorithm_ == beta_algorithm::Cheng) {
|
|
350
|
-
RealType flU1, flU2, flV, flW, flInv;
|
|
351
|
-
RealType flTmp[2];
|
|
352
|
-
flU1 = z1;
|
|
353
|
-
flU2 = z2;
|
|
354
|
-
|
|
355
|
-
flV = flU1 / (RealType(1.0) - flU1);
|
|
356
|
-
|
|
357
|
-
flV = ln_wrapper(flV);
|
|
358
|
-
|
|
359
|
-
flV = flKoef2 * flV;
|
|
360
|
-
|
|
361
|
-
flW = flV;
|
|
362
|
-
flW = exp_wrapper(flW);
|
|
363
|
-
flW = p_ * flW;
|
|
364
|
-
flInv = RealType(1.0) / (q_ + flW);
|
|
365
|
-
flTmp[0] = flKoef1 * flInv;
|
|
366
|
-
flTmp[1] = flU1 * flU1 * flU2;
|
|
367
|
-
for (int i = 0; i < 2; i++) {
|
|
368
|
-
flTmp[i] = ln_wrapper(flTmp[i]);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
if (flKoef1 * flTmp[0] + flKoef3 * flV - log4<RealType>() >= flTmp[1]) {
|
|
372
|
-
z[i] = flW * flInv;
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
++count_;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
return a_ + b_ * z;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
template <typename EngineType>
|
|
383
|
-
auto generate(EngineType& engine) ->
|
|
384
|
-
typename std::conditional<EngineType::vec_size == 1, RealType,
|
|
385
|
-
sycl::vec<RealType, EngineType::vec_size>>::type {
|
|
386
|
-
sycl::vec<RealType, EngineType::vec_size> res{};
|
|
387
|
-
if (algorithm_ == beta_algorithm::p1 || algorithm_ == beta_algorithm::q1 ||
|
|
388
|
-
algorithm_ == beta_algorithm::p1q1) {
|
|
389
|
-
res = engine.generate(RealType(0), RealType(1));
|
|
390
|
-
res = pq_kernel<EngineType::vec_size>(res);
|
|
391
|
-
}
|
|
392
|
-
else {
|
|
393
|
-
res = acc_rej_kernel<EngineType::vec_size>(res, engine);
|
|
394
|
-
}
|
|
395
|
-
if constexpr (std::is_same_v<Method, beta_method::cja_accurate>) {
|
|
396
|
-
if (res < a_)
|
|
397
|
-
res = a_;
|
|
398
|
-
if (res > a_ + b_)
|
|
399
|
-
res = a_ + b_;
|
|
400
|
-
}
|
|
401
|
-
return res;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
template <typename EngineType>
|
|
405
|
-
RealType generate_single(EngineType& engine) {
|
|
406
|
-
RealType res{};
|
|
407
|
-
sycl::vec<RealType, 1> z{ res };
|
|
408
|
-
if (algorithm_ == beta_algorithm::p1 || algorithm_ == beta_algorithm::q1 ||
|
|
409
|
-
algorithm_ == beta_algorithm::p1q1) {
|
|
410
|
-
z[0] = engine.generate_single(RealType(0), RealType(1));
|
|
411
|
-
res = pq_kernel<1>(z);
|
|
412
|
-
}
|
|
413
|
-
else {
|
|
414
|
-
res = acc_rej_kernel<1>(z, engine);
|
|
415
|
-
}
|
|
416
|
-
if constexpr (std::is_same_v<Method, beta_method::cja_accurate>) {
|
|
417
|
-
if (res < a_)
|
|
418
|
-
res = a_;
|
|
419
|
-
if (res > a_ + b_)
|
|
420
|
-
res = a_ + b_;
|
|
421
|
-
}
|
|
422
|
-
return res;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
void set_algorithm() {
|
|
426
|
-
if (p_ < RealType(1.0) && q_ < RealType(1.0)) {
|
|
427
|
-
if (q_ + beta_k<RealType>() * p_ * p_ + beta_c<RealType>() <= RealType(0.0)) {
|
|
428
|
-
algorithm_ = beta_algorithm::Johnk;
|
|
429
|
-
}
|
|
430
|
-
else {
|
|
431
|
-
algorithm_ = beta_algorithm::Atkinson1;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
else if (p_ < RealType(1.0) && q_ > RealType(1.0)) {
|
|
435
|
-
algorithm_ = beta_algorithm::Atkinson2;
|
|
436
|
-
}
|
|
437
|
-
else if (p_ > RealType(1.0) && q_ < RealType(1.0)) {
|
|
438
|
-
algorithm_ = beta_algorithm::Atkinson3;
|
|
439
|
-
}
|
|
440
|
-
else if (p_ > RealType(1.0) && q_ > RealType(1.0)) {
|
|
441
|
-
algorithm_ = beta_algorithm::Cheng;
|
|
442
|
-
}
|
|
443
|
-
else if (p_ == RealType(1.0) && q_ != RealType(1.0)) {
|
|
444
|
-
algorithm_ = beta_algorithm::p1;
|
|
445
|
-
}
|
|
446
|
-
else if (q_ == RealType(1.0) && p_ != RealType(1.0)) {
|
|
447
|
-
algorithm_ = beta_algorithm::q1;
|
|
448
|
-
}
|
|
449
|
-
else {
|
|
450
|
-
algorithm_ = beta_algorithm::p1q1;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
RealType p_;
|
|
455
|
-
RealType q_;
|
|
456
|
-
RealType a_;
|
|
457
|
-
RealType b_;
|
|
458
|
-
std::size_t count_;
|
|
459
|
-
beta_algorithm algorithm_;
|
|
460
|
-
};
|
|
461
|
-
|
|
462
|
-
} // namespace oneapi::mkl::rng::device::detail
|
|
463
|
-
|
|
464
|
-
#endif // _MKL_RNG_DEVICE_BETA_IMPL_HPP_
|
mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/bits_impl.hpp
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*******************************************************************************
|
|
2
|
-
* Copyright 2020 Intel Corporation
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing,
|
|
11
|
-
* software distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions
|
|
14
|
-
* and limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
*******************************************************************************/
|
|
19
|
-
|
|
20
|
-
#ifndef _MKL_RNG_DEVICE_BITS_IMPL_HPP_
|
|
21
|
-
#define _MKL_RNG_DEVICE_BITS_IMPL_HPP_
|
|
22
|
-
|
|
23
|
-
#include "engine_base.hpp"
|
|
24
|
-
|
|
25
|
-
namespace oneapi::mkl::rng::device::detail {
|
|
26
|
-
|
|
27
|
-
template <typename UIntType>
|
|
28
|
-
class distribution_base<oneapi::mkl::rng::device::bits<UIntType>> {
|
|
29
|
-
protected:
|
|
30
|
-
template <typename EngineType>
|
|
31
|
-
auto generate(EngineType& engine) -> typename std::enable_if<
|
|
32
|
-
!std::is_same<EngineType, mcg59<EngineType::vec_size>>::value,
|
|
33
|
-
typename std::conditional<EngineType::vec_size == 1, UIntType,
|
|
34
|
-
sycl::vec<UIntType, EngineType::vec_size>>::type>::type {
|
|
35
|
-
static_assert(std::is_same<UIntType, uint32_t>::value,
|
|
36
|
-
"oneMKL: bits works only with std::uint32_t");
|
|
37
|
-
return engine.generate();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
template <typename EngineType>
|
|
41
|
-
auto generate(EngineType& engine) -> typename std::enable_if<
|
|
42
|
-
std::is_same<EngineType, mcg59<EngineType::vec_size>>::value,
|
|
43
|
-
typename std::conditional<EngineType::vec_size == 1, UIntType,
|
|
44
|
-
sycl::vec<UIntType, EngineType::vec_size>>::type>::type {
|
|
45
|
-
static_assert(std::is_same<UIntType, uint64_t>::value,
|
|
46
|
-
"oneMKL: bits for mcg59 works only with std::uint64_t");
|
|
47
|
-
return engine.generate_bits();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
template <typename EngineType>
|
|
51
|
-
typename std::enable_if<!std::is_same<EngineType, mcg59<EngineType::vec_size>>::value,
|
|
52
|
-
UIntType>::type
|
|
53
|
-
generate_single(EngineType& engine) {
|
|
54
|
-
static_assert(std::is_same<UIntType, uint32_t>::value,
|
|
55
|
-
"oneMKL: bits works only with std::uint32_t");
|
|
56
|
-
return engine.generate_single();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
template <typename EngineType>
|
|
60
|
-
typename std::enable_if<std::is_same<EngineType, mcg59<EngineType::vec_size>>::value,
|
|
61
|
-
UIntType>::type
|
|
62
|
-
generate_single(EngineType& engine) {
|
|
63
|
-
static_assert(std::is_same<UIntType, uint64_t>::value,
|
|
64
|
-
"oneMKL: bits for mcg59 works only with std::uint64_t");
|
|
65
|
-
return engine.generate_single();
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
} // namespace oneapi::mkl::rng::device::detail
|
|
70
|
-
|
|
71
|
-
#endif // _MKL_RNG_DEVICE_BITS_IMPL_HPP_
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/*******************************************************************************
|
|
2
|
-
* Copyright 2020 Intel Corporation
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing,
|
|
11
|
-
* software distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions
|
|
14
|
-
* and limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
*******************************************************************************/
|
|
19
|
-
|
|
20
|
-
#ifndef _MKL_RNG_DISTRIBUTION_BASE_HPP_
|
|
21
|
-
#define _MKL_RNG_DISTRIBUTION_BASE_HPP_
|
|
22
|
-
|
|
23
|
-
#include <sycl/sycl.hpp>
|
|
24
|
-
|
|
25
|
-
#include "oneapi/mkl/exceptions.hpp"
|
|
26
|
-
#include "oneapi/mkl/rng/device/types.hpp"
|
|
27
|
-
|
|
28
|
-
namespace oneapi::mkl::rng::device {
|
|
29
|
-
|
|
30
|
-
namespace detail {
|
|
31
|
-
|
|
32
|
-
template <typename DistrType>
|
|
33
|
-
class distribution_base {};
|
|
34
|
-
|
|
35
|
-
} // namespace detail
|
|
36
|
-
|
|
37
|
-
// declarations of distribution classes
|
|
38
|
-
template <typename Type = float, typename Method = uniform_method::by_default>
|
|
39
|
-
class uniform;
|
|
40
|
-
|
|
41
|
-
template <typename RealType = float, typename Method = gaussian_method::by_default>
|
|
42
|
-
class gaussian;
|
|
43
|
-
|
|
44
|
-
template <typename RealType = float, typename Method = lognormal_method::by_default>
|
|
45
|
-
class lognormal;
|
|
46
|
-
|
|
47
|
-
template <typename UIntType = std::uint32_t>
|
|
48
|
-
class uniform_bits;
|
|
49
|
-
|
|
50
|
-
template <typename UIntType = std::uint32_t>
|
|
51
|
-
class bits;
|
|
52
|
-
|
|
53
|
-
template <typename RealType = float, typename Method = exponential_method::by_default>
|
|
54
|
-
class exponential;
|
|
55
|
-
|
|
56
|
-
template <typename RealType = float, typename Method = beta_method::by_default>
|
|
57
|
-
class beta;
|
|
58
|
-
|
|
59
|
-
template <typename RealType = float, typename Method = gamma_method::by_default>
|
|
60
|
-
class gamma;
|
|
61
|
-
|
|
62
|
-
template <typename IntType = std::int32_t, typename Method = poisson_method::by_default>
|
|
63
|
-
class poisson;
|
|
64
|
-
|
|
65
|
-
template <typename IntType = std::uint32_t, typename Method = bernoulli_method::by_default>
|
|
66
|
-
class bernoulli;
|
|
67
|
-
|
|
68
|
-
} // namespace oneapi::mkl::rng::device
|
|
69
|
-
|
|
70
|
-
#include "oneapi/mkl/rng/device/detail/uniform_impl.hpp"
|
|
71
|
-
#include "oneapi/mkl/rng/device/detail/gaussian_impl.hpp"
|
|
72
|
-
#include "oneapi/mkl/rng/device/detail/lognormal_impl.hpp"
|
|
73
|
-
#include "oneapi/mkl/rng/device/detail/bits_impl.hpp"
|
|
74
|
-
#include "oneapi/mkl/rng/device/detail/uniform_bits_impl.hpp"
|
|
75
|
-
#include "oneapi/mkl/rng/device/detail/exponential_impl.hpp"
|
|
76
|
-
#include "oneapi/mkl/rng/device/detail/poisson_impl.hpp"
|
|
77
|
-
#include "oneapi/mkl/rng/device/detail/bernoulli_impl.hpp"
|
|
78
|
-
#include "oneapi/mkl/rng/device/detail/beta_impl.hpp"
|
|
79
|
-
#include "oneapi/mkl/rng/device/detail/gamma_impl.hpp"
|
|
80
|
-
|
|
81
|
-
#endif // _MKL_RNG_DISTRIBUTION_BASE_HPP_
|
mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/engine_base.hpp
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*******************************************************************************
|
|
2
|
-
* Copyright 2020 Intel Corporation
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing,
|
|
11
|
-
* software distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions
|
|
14
|
-
* and limitations under the License.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
18
|
-
*******************************************************************************/
|
|
19
|
-
|
|
20
|
-
#ifndef _MKL_RNG_DEVICE_ENGINE_BASE_HPP_
|
|
21
|
-
#define _MKL_RNG_DEVICE_ENGINE_BASE_HPP_
|
|
22
|
-
|
|
23
|
-
#include <cstdint>
|
|
24
|
-
|
|
25
|
-
#include <sycl/sycl.hpp>
|
|
26
|
-
|
|
27
|
-
namespace oneapi::mkl::rng::device::detail {
|
|
28
|
-
|
|
29
|
-
// internal structure to specify state of engine
|
|
30
|
-
template <typename EngineType>
|
|
31
|
-
struct engine_state {};
|
|
32
|
-
|
|
33
|
-
template <typename EngineType>
|
|
34
|
-
class engine_base {};
|
|
35
|
-
|
|
36
|
-
} // namespace oneapi::mkl::rng::device::detail
|
|
37
|
-
|
|
38
|
-
#include "oneapi/mkl/rng/device/detail/philox4x32x10_impl.hpp"
|
|
39
|
-
#include "oneapi/mkl/rng/device/detail/mrg32k3a_impl.hpp"
|
|
40
|
-
#include "oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp"
|
|
41
|
-
#include "oneapi/mkl/rng/device/detail/mcg59_impl.hpp"
|
|
42
|
-
|
|
43
|
-
#endif // _MKL_RNG_DEVICE_ENGINE_BASE_HPP_
|