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.

Files changed (94) hide show
  1. {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl.lib +0 -0
  2. {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_blas_dll.lib +0 -0
  3. mkl_devel_dpcpp-2025.2.0.data/data/Library/lib/mkl_sycl_dft_dll.lib +0 -0
  4. {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_dll.lib +0 -0
  5. mkl_devel_dpcpp-2025.2.0.data/data/Library/lib/mkl_sycl_lapack_dll.lib +0 -0
  6. {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_rng_dll.lib +0 -0
  7. mkl_devel_dpcpp-2025.2.0.data/data/Library/lib/mkl_sycl_sparse_dll.lib +0 -0
  8. {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/METADATA +4 -3
  9. mkl_devel_dpcpp-2025.2.0.dist-info/RECORD +15 -0
  10. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/bfloat16.hpp +0 -26
  11. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/buffer.hpp +0 -42
  12. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/buffer_decls.hpp +0 -880
  13. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/types.hpp +0 -60
  14. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/usm.hpp +0 -42
  15. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas/usm_decls.hpp +0 -1240
  16. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/blas.hpp +0 -33
  17. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/dft.hpp +0 -253
  18. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/dfti.hpp +0 -22
  19. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/exceptions.hpp +0 -110
  20. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting/interpolate.hpp +0 -67
  21. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting/spline_and_data_params.hpp +0 -68
  22. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting/splines.hpp +0 -177
  23. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/experimental/data_fitting.hpp +0 -22
  24. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/export.hpp +0 -25
  25. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/concepts.hpp +0 -55
  26. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/exceptions.hpp +0 -75
  27. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/lapack.hpp +0 -1095
  28. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack/scratchpad.hpp +0 -106
  29. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/lapack.hpp +0 -23
  30. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/detail/engine_base.hpp +0 -48
  31. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/bernoulli_impl.hpp +0 -89
  32. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/beta_impl.hpp +0 -464
  33. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/bits_impl.hpp +0 -71
  34. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/distribution_base.hpp +0 -81
  35. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/engine_base.hpp +0 -43
  36. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/engine_helpers_base.hpp +0 -54
  37. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/exponential_impl.hpp +0 -116
  38. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/gamma_impl.hpp +0 -285
  39. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/gaussian_impl.hpp +0 -270
  40. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/lognormal_impl.hpp +0 -105
  41. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg31m1_helpers_impl.hpp +0 -117
  42. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg31m1_impl.hpp +0 -223
  43. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg59_helpers_impl.hpp +0 -118
  44. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mcg59_impl.hpp +0 -266
  45. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mrg32k3a_helpers_impl.hpp +0 -125
  46. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mrg32k3a_impl.hpp +0 -385
  47. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/mrg32k3a_skip_ahead_matrix.hpp +0 -3668
  48. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/philox4x32x10_helpers_impl.hpp +0 -141
  49. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/philox4x32x10_impl.hpp +0 -552
  50. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/poisson_impl.hpp +0 -355
  51. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/types.hpp +0 -58
  52. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/uniform_bits_impl.hpp +0 -51
  53. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/uniform_impl.hpp +0 -289
  54. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/detail/vm_wrappers.hpp +0 -183
  55. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/distributions.hpp +0 -637
  56. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/engine_helpers.hpp +0 -116
  57. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/engines.hpp +0 -187
  58. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/functions.hpp +0 -59
  59. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device/types.hpp +0 -74
  60. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/device.hpp +0 -29
  61. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/distributions.hpp +0 -1913
  62. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/engines.hpp +0 -788
  63. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng/functions.hpp +0 -163
  64. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/rng.hpp +0 -22
  65. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas/sparse_auxiliary.hpp +0 -111
  66. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas/sparse_operations.hpp +0 -446
  67. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas/sparse_structures.hpp +0 -193
  68. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/spblas.hpp +0 -32
  69. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/stats.hpp +0 -356
  70. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/types.hpp +0 -321
  71. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/buffer.hpp +0 -3529
  72. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/decls.hpp +0 -280
  73. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/decls.hpp +0 -81
  74. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/dispatch.hpp +0 -1059
  75. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/ep.hpp +0 -861
  76. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/ha.hpp +0 -860
  77. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/la.hpp +0 -860
  78. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/rts.hpp +0 -4608
  79. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/detail/scalar.hpp +0 -8963
  80. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/device/vm.hpp +0 -460
  81. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/span.hpp +0 -3813
  82. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm/usm.hpp +0 -3581
  83. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl/vm.hpp +0 -30
  84. mkl_devel_dpcpp-2025.0.1.data/data/Library/include/oneapi/mkl.hpp +0 -34
  85. mkl_devel_dpcpp-2025.0.1.data/data/Library/lib/mkl_sycl_dft_dll.lib +0 -0
  86. mkl_devel_dpcpp-2025.0.1.data/data/Library/lib/mkl_sycl_lapack_dll.lib +0 -0
  87. mkl_devel_dpcpp-2025.0.1.data/data/Library/lib/mkl_sycl_sparse_dll.lib +0 -0
  88. mkl_devel_dpcpp-2025.0.1.dist-info/RECORD +0 -90
  89. {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
  90. {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_stats_dll.lib +0 -0
  91. {mkl_devel_dpcpp-2025.0.1.data → mkl_devel_dpcpp-2025.2.0.data}/data/Library/lib/mkl_sycl_vm_dll.lib +0 -0
  92. {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/LICENSE.txt +0 -0
  93. {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/WHEEL +0 -0
  94. {mkl_devel_dpcpp-2025.0.1.dist-info → mkl_devel_dpcpp-2025.2.0.dist-info}/top_level.txt +0 -0
@@ -1,289 +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_UNIFORM_IMPL_HPP_
21
- #define _MKL_RNG_DEVICE_UNIFORM_IMPL_HPP_
22
-
23
- #include <limits>
24
-
25
- #include "engine_base.hpp"
26
-
27
- namespace oneapi::mkl::rng::device::detail {
28
-
29
- static inline std::uint64_t umul_hi_64(const std::uint64_t a, const std::uint64_t b) {
30
- const std::uint64_t a_lo = a & 0xFFFFFFFFULL;
31
- const std::uint64_t a_hi = a >> 32;
32
- const std::uint64_t b_lo = b & 0xFFFFFFFFULL;
33
- const std::uint64_t b_hi = b >> 32;
34
-
35
- const std::uint64_t ab_hi = a_hi * b_hi;
36
- const std::uint64_t ab_lo = a_lo * b_lo;
37
- const std::uint64_t ab_md = a_hi * b_lo;
38
- const std::uint64_t ba_md = b_hi * a_lo;
39
-
40
- const std::uint64_t bias = ((ab_md & 0xFFFFFFFFULL) + (ba_md & 0xFFFFFFFFULL) + (ab_lo >> 32)) >> 32;
41
-
42
- return ab_hi + (ab_md >> 32) + (ba_md >> 32) + bias;
43
- }
44
-
45
- template <typename EngineType, typename Generator>
46
- static inline void generate_leftover(std::uint64_t range, Generator generate,
47
- std::uint64_t& res_64, std::uint64_t& leftover) {
48
- if constexpr (std::is_same_v<EngineType, mcg31m1<EngineType::vec_size>>) {
49
- std::uint32_t res_1 = generate();
50
- std::uint32_t res_2 = generate();
51
- std::uint32_t res_3 = generate();
52
- res_64 = (static_cast<std::uint64_t>(res_3) << 62) +
53
- (static_cast<std::uint64_t>(res_2) << 31) + res_1;
54
- }
55
- else {
56
- std::uint32_t res_1 = generate();
57
- std::uint32_t res_2 = generate();
58
- res_64 = (static_cast<std::uint64_t>(res_2) << 32) + res_1;
59
- }
60
-
61
- leftover = res_64 * range;
62
- }
63
-
64
- template <typename Type, typename Method>
65
- class distribution_base<oneapi::mkl::rng::device::uniform<Type, Method>> {
66
- public:
67
- struct param_type {
68
- param_type(Type a, Type b) : a_(a), b_(b) {}
69
- Type a_;
70
- Type b_;
71
- };
72
-
73
- distribution_base(Type a, Type b) : a_(a), b_(b) {
74
- #ifndef __SYCL_DEVICE_ONLY__
75
- if (a >= b) {
76
- throw oneapi::mkl::invalid_argument("rng", "uniform", "a >= b");
77
- }
78
- #endif
79
- }
80
-
81
- Type a() const {
82
- return a_;
83
- }
84
-
85
- Type b() const {
86
- return b_;
87
- }
88
-
89
- param_type param() const {
90
- return param_type(a_, b_);
91
- }
92
-
93
- void param(const param_type& pt) {
94
- #ifndef __SYCL_DEVICE_ONLY__
95
- if (pt.a_ >= pt.b_) {
96
- throw oneapi::mkl::invalid_argument("rng", "uniform", "a >= b");
97
- }
98
- #endif
99
- a_ = pt.a_;
100
- b_ = pt.b_;
101
- }
102
-
103
- protected:
104
- template <typename FpType, typename OutType, typename EngineType>
105
- OutType generate_single_int(EngineType& engine) {
106
- sycl::vec<FpType, EngineType::vec_size> res_fp;
107
- res_fp = engine.generate(static_cast<FpType>(a_), static_cast<FpType>(b_));
108
- res_fp = sycl::floor(res_fp);
109
- OutType res = res_fp.template convert<Type>();
110
- return res;
111
- }
112
-
113
- template <typename EngineType>
114
- auto generate(EngineType& engine) ->
115
- typename std::conditional<EngineType::vec_size == 1, Type,
116
- sycl::vec<Type, EngineType::vec_size>>::type {
117
- using OutType = typename std::conditional<EngineType::vec_size == 1, Type,
118
- sycl::vec<Type, EngineType::vec_size>>::type;
119
- using FpType =
120
- typename std::conditional<std::is_same<Method, uniform_method::accurate>::value, double,
121
- float>::type;
122
- OutType res;
123
- if constexpr (std::is_integral<Type>::value) {
124
- if constexpr (std::is_same_v<Type, std::int32_t> || std::is_same_v<Type, std::uint32_t>) {
125
- return generate_single_int<FpType, OutType>(engine);
126
- }
127
- else {
128
- // Lemire's sample rejection method to exclude bias for uniform numbers
129
- // https://arxiv.org/abs/1805.10941
130
-
131
- constexpr std::uint64_t uint_max64 = std::numeric_limits<std::uint64_t>::max();
132
- constexpr std::uint64_t uint_max32 = std::numeric_limits<std::uint32_t>::max();
133
-
134
- std::uint64_t range = b_ - a_;
135
- std::uint64_t threshold = (uint_max64 - range) % range;
136
-
137
- if (range <= uint_max32)
138
- return generate_single_int<FpType, OutType>(engine);
139
-
140
- if constexpr (EngineType::vec_size == 1) {
141
- std::uint32_t res_1, res_2;
142
- std::uint64_t res_64, leftover;
143
-
144
- generate_leftover<EngineType>(range, [&engine](){return engine.generate();},
145
- res_64, leftover);
146
-
147
- if (range == uint_max64)
148
- return res_64;
149
-
150
- while (leftover < threshold) {
151
- generate_leftover<EngineType>(range, [&engine](){return engine.generate();},
152
- res_64, leftover);
153
- }
154
-
155
- res = a_ + umul_hi_64(res_64, range);
156
-
157
- return res;
158
- }
159
- else {
160
- std::uint64_t leftover;
161
-
162
- sycl::vec<std::uint32_t, EngineType::vec_size> res_1 = engine.generate();
163
- sycl::vec<std::uint32_t, EngineType::vec_size> res_2 = engine.generate();
164
- sycl::vec<std::uint64_t, EngineType::vec_size> res_64;
165
-
166
- if constexpr (std::is_same_v<EngineType, mcg31m1<EngineType::vec_size>>) {
167
- sycl::vec<std::uint32_t, EngineType::vec_size> res_3 = engine.generate();
168
-
169
- for (int i = 0; i < EngineType::vec_size; i++) {
170
- res_64[i] = (static_cast<std::uint64_t>(res_3[i]) << 62) +
171
- (static_cast<std::uint64_t>(res_2[i]) << 31) + res_1[i];
172
- }
173
- }
174
- else {
175
- if constexpr (EngineType::vec_size == 3) {
176
- res_64[0] = (static_cast<std::uint64_t>(res_1[1]) << 32) +
177
- static_cast<std::uint64_t>(res_1[0]);
178
- res_64[1] = (static_cast<std::uint64_t>(res_2[0]) << 32) +
179
- static_cast<std::uint64_t>(res_1[2]);
180
- res_64[2] = (static_cast<std::uint64_t>(res_2[2]) << 32) +
181
- static_cast<std::uint64_t>(res_2[1]);
182
- } else {
183
- for (int i = 0; i < EngineType::vec_size / 2; i++) {
184
- res_64[i] = (static_cast<std::uint64_t>(res_1[2 * i + 1]) << 32) +
185
- static_cast<std::uint64_t>(res_1[2 * i]);
186
- res_64[i + EngineType::vec_size / 2] = (static_cast<std::uint64_t>(res_2[2 * i + 1]) << 32) +
187
- static_cast<std::uint64_t>(res_2[2 * i]);
188
- }
189
- }
190
- }
191
-
192
- if (range == uint_max64)
193
- return res_64.template convert<Type>();
194
-
195
- for (int i = 0; i < EngineType::vec_size; i++) {
196
- leftover = res_64[i] * range;
197
-
198
- while (leftover < threshold) {
199
- generate_leftover<EngineType>(range, [&engine](){return engine.generate_single();},
200
- res_64[i], leftover);
201
- }
202
-
203
- res[i] = a_ + umul_hi_64(res_64[i], range);
204
- }
205
-
206
- return res;
207
- }
208
- }
209
- }
210
- else {
211
- res = engine.generate(a_, b_);
212
- if constexpr (std::is_same<Method, uniform_method::accurate>::value) {
213
- res = sycl::fmax(res, a_);
214
- res = sycl::fmin(res, b_);
215
- }
216
- }
217
-
218
- return res;
219
- }
220
-
221
- template <typename EngineType>
222
- Type generate_single(EngineType& engine) {
223
- using FpType =
224
- typename std::conditional<std::is_same<Method, uniform_method::accurate>::value, double,
225
- float>::type;
226
- Type res;
227
- if constexpr (std::is_integral<Type>::value) {
228
- if constexpr (std::is_same_v<Type, std::int32_t> || std::is_same_v<Type, std::uint32_t>) {
229
- FpType res_fp =
230
- engine.generate_single(static_cast<FpType>(a_), static_cast<FpType>(b_));
231
- res_fp = sycl::floor(res_fp);
232
- res = static_cast<Type>(res_fp);
233
- return res;
234
- }
235
- else {
236
- // Lemire's sample rejection method to exclude bias for uniform numbers
237
- // https://arxiv.org/abs/1805.10941
238
-
239
- constexpr std::uint64_t uint_max64 = std::numeric_limits<std::uint64_t>::max();
240
- constexpr std::uint64_t uint_max32 = std::numeric_limits<std::uint32_t>::max();
241
-
242
- std::uint64_t range = b_ - a_;
243
- std::uint64_t threshold = (uint_max64 - range) % range;
244
-
245
- if (range <= uint_max32) {
246
- FpType res_fp =
247
- engine.generate_single(static_cast<FpType>(a_), static_cast<FpType>(b_));
248
- res_fp = sycl::floor(res_fp);
249
- res = static_cast<Type>(res_fp);
250
- return res;
251
- }
252
-
253
- std::uint32_t res_1, res_2;
254
- std::uint64_t res_64, leftover;
255
-
256
- generate_leftover<EngineType>(range, [&engine](){return engine.generate_single();},
257
- res_64, leftover);
258
-
259
- if (range == uint_max64)
260
- return res_64;
261
-
262
- while (leftover < threshold) {
263
- generate_leftover<EngineType>(range, [&engine](){return engine.generate_single();},
264
- res_64, leftover);
265
- }
266
-
267
- res = a_ + umul_hi_64(res_64, range);
268
-
269
- return res;
270
- }
271
- }
272
- else {
273
- res = engine.generate_single(a_, b_);
274
- if constexpr (std::is_same<Method, uniform_method::accurate>::value) {
275
- res = sycl::fmax(res, a_);
276
- res = sycl::fmin(res, b_);
277
- }
278
- }
279
-
280
- return res;
281
- }
282
-
283
- Type a_;
284
- Type b_;
285
- };
286
-
287
- } // namespace oneapi::mkl::rng::device::detail
288
-
289
- #endif // _MKL_RNG_DEVICE_UNIFORM_IMPL_HPP_
@@ -1,183 +0,0 @@
1
- /*******************************************************************************
2
- * Copyright 2023 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_VM_WRAPPERS_HPP_
21
- #define _MKL_RNG_DEVICE_VM_WRAPPERS_HPP_
22
-
23
- #include <cmath>
24
-
25
- #if MKL_RNG_USE_BINARY_CODE
26
- #include "oneapi/mkl/vm/device/vm.hpp"
27
- #endif
28
-
29
- namespace oneapi::mkl::rng::device::detail {
30
-
31
- #if MKL_RNG_USE_BINARY_CODE
32
- namespace vm_d = oneapi::mkl::vm::device;
33
- #endif
34
-
35
- template <typename DataType>
36
- static inline DataType sqrt_wrapper(DataType a) {
37
- #if MKL_RNG_USE_BINARY_CODE
38
- DataType t;
39
- if constexpr (std::is_same_v<DataType, double>)
40
- vm_d::sqrt(&a, &t, vm_d::mode::ep);
41
- else
42
- vm_d::sqrt(&a, &t, vm_d::mode::la);
43
- return t;
44
- #else
45
- return sycl::sqrt(a);
46
- #endif // MKL_RNG_USE_BINARY_CODE
47
- }
48
-
49
- template <typename DataType>
50
- static inline DataType sinpi_wrapper(DataType a) {
51
- #if MKL_RNG_USE_BINARY_CODE
52
- DataType t;
53
- if constexpr (std::is_same_v<DataType, double>)
54
- vm_d::sinpi(&a, &t, vm_d::mode::ep);
55
- else
56
- vm_d::sinpi(&a, &t, vm_d::mode::la);
57
- return t;
58
- #else
59
- return sycl::sinpi(a);
60
- #endif // MKL_RNG_USE_BINARY_CODE
61
- }
62
-
63
- template <typename DataType>
64
- static inline DataType cospi_wrapper(DataType a) {
65
- #if MKL_RNG_USE_BINARY_CODE
66
- DataType t;
67
- if constexpr (std::is_same_v<DataType, double>)
68
- vm_d::cospi(&a, &t, vm_d::mode::ep);
69
- else
70
- vm_d::cospi(&a, &t, vm_d::mode::la);
71
- return t;
72
- #else
73
- return sycl::cospi(a);
74
- #endif // MKL_RNG_USE_BINARY_CODE
75
- }
76
-
77
- template <typename DataType>
78
- static inline DataType sincospi_wrapper(DataType a, DataType& b) {
79
- #if MKL_RNG_USE_BINARY_CODE
80
- DataType t;
81
- if constexpr (std::is_same_v<DataType, double>) {
82
- vm_d::sincospi(&a, &t, &b, vm_d::mode::ep);
83
- }
84
- else {
85
- vm_d::sincospi(&a, &t, &b, vm_d::mode::la);
86
- }
87
- return t;
88
- #else
89
- b = sycl::cospi(a);
90
- return sycl::sinpi(a);
91
- #endif // MKL_RNG_USE_BINARY_CODE
92
- }
93
-
94
- template <typename DataType>
95
- static inline DataType ln_wrapper(DataType a) {
96
- if (a == DataType(0)) {
97
- if constexpr (std::is_same_v<DataType, double>)
98
- return -0x1.74385446D71C3P+9; // ln(0.494065e-323) = -744.440072
99
- else
100
- return -0x1.9D1DA0P+6f; // ln(0.14012984e-44) = -103.278929
101
- }
102
-
103
- #if MKL_RNG_USE_BINARY_CODE
104
- DataType t;
105
- if constexpr (std::is_same_v<DataType, double>)
106
- vm_d::ln(&a, &t, vm_d::mode::ep);
107
- else
108
- vm_d::ln(&a, &t, vm_d::mode::la);
109
- return t;
110
- #else
111
- return sycl::log(a);
112
- #endif // MKL_RNG_USE_BINARY_CODE
113
- }
114
-
115
- template <typename DataType>
116
- static inline DataType pow_wrapper(DataType a, DataType b) {
117
- #if MKL_RNG_USE_BINARY_CODE
118
- DataType t;
119
- if constexpr (std::is_same_v<DataType, double>)
120
- vm_d::pow(&a, &b, &t, vm_d::mode::ep);
121
- else
122
- t = sycl::pow(a, b);
123
- return t;
124
- #else
125
- return sycl::pow(a, b);
126
- #endif // MKL_RNG_USE_BINARY_CODE
127
- }
128
-
129
- template <typename DataType>
130
- static inline DataType powr_wrapper(DataType a, DataType b) {
131
- #if MKL_RNG_USE_BINARY_CODE
132
- DataType t;
133
- if constexpr (std::is_same_v<DataType, double>)
134
- vm_d::powr(&a, &b, &t, vm_d::mode::ep);
135
- else
136
- t = sycl::powr(a, b);
137
- return t;
138
- #else
139
- return sycl::powr(a, b);
140
- #endif // MKL_RNG_USE_BINARY_CODE
141
- }
142
-
143
- template <typename DataType>
144
- static inline DataType exp_wrapper(DataType a) {
145
- #if MKL_RNG_USE_BINARY_CODE
146
- DataType t;
147
- if constexpr (std::is_same_v<DataType, double>)
148
- vm_d::exp(&a, &t, vm_d::mode::ep);
149
- else
150
- t = sycl::exp(a);
151
- return t;
152
- #else
153
- return sycl::exp(a);
154
- #endif // MKL_RNG_USE_BINARY_CODE
155
- }
156
-
157
- #if MKL_RNG_USE_BINARY_CODE
158
- template <typename RealType>
159
- inline RealType erf_inv_wrapper(RealType x) {
160
- if (std::fabs(x) == RealType(1)) {
161
- if constexpr (std::is_same_v<RealType, float>) {
162
- return std::copysign(0x1.EA8F96P+1f, x); // ErfInv(0.99999994039) = 3.83250689506
163
- }
164
- else {
165
- return std::copysign(0x1.7744F8F74E94AP+2, x); // ErfInv(0.999999999) = 5.86358474875
166
- }
167
- }
168
- else {
169
- RealType res{};
170
- if constexpr (std::is_same_v<RealType, double>) {
171
- vm_d::erfinv(&x, &res, vm_d::mode::ep);
172
- }
173
- else {
174
- vm_d::erfinv(&x, &res, vm_d::mode::la);
175
- }
176
- return res;
177
- }
178
- }
179
- #endif
180
-
181
- } // namespace oneapi::mkl::rng::device::detail
182
-
183
- #endif // _MKL_RNG_DEVICE_VM_WRAPPERS_HPP_