|
1 | 1 | //*****************************************************************************
|
2 |
| -// Copyright (c) 2016-2022, Intel Corporation |
| 2 | +// Copyright (c) 2016-2023, Intel Corporation |
3 | 3 | // All rights reserved.
|
4 | 4 | //
|
5 | 5 | // Redistribution and use in source and binary forms, with or without
|
|
37 | 37 | #include "queue_sycl.hpp"
|
38 | 38 | #include "dpnp_random_state.hpp"
|
39 | 39 |
|
| 40 | +static_assert(INTEL_MKL_VERSION >= __INTEL_MKL_2023_VERSION_REQUIRED, |
| 41 | + "MKL does not meet minimum version requirement"); |
| 42 | + |
40 | 43 | namespace mkl_blas = oneapi::mkl::blas;
|
41 | 44 | namespace mkl_rng = oneapi::mkl::rng;
|
42 | 45 | namespace mkl_vm = oneapi::mkl::vm;
|
@@ -990,11 +993,7 @@ DPCTLSyclEventRef dpnp_rng_multinomial_c(DPCTLSyclQueueRef q_ref,
|
990 | 993 | DPNPC_ptr_adapter<_DataType> result_ptr(q_ref, result, size, true, true);
|
991 | 994 | _DataType* result1 = result_ptr.get_ptr();
|
992 | 995 |
|
993 |
| -#if (INTEL_MKL_VERSION < __INTEL_MKL_2023_SWITCHOVER) |
994 |
| - std::vector<double> p(p_data, p_data + p_size); |
995 |
| -#else |
996 | 996 | auto p = sycl::span<double>{p_data, p_size};
|
997 |
| -#endif |
998 | 997 | mkl_rng::multinomial<_DataType> distribution(ntrial, p);
|
999 | 998 |
|
1000 | 999 | // perform generation
|
@@ -1082,13 +1081,8 @@ DPCTLSyclEventRef dpnp_rng_multivariate_normal_c(DPCTLSyclQueueRef q_ref,
|
1082 | 1081 |
|
1083 | 1082 | _DataType* result1 = static_cast<_DataType *>(result);
|
1084 | 1083 |
|
1085 |
| -#if (INTEL_MKL_VERSION < __INTEL_MKL_2023_SWITCHOVER) |
1086 |
| - std::vector<double> mean(mean_data, mean_data + mean_size); |
1087 |
| - std::vector<double> cov(cov_data, cov_data + cov_size); |
1088 |
| -#else |
1089 | 1084 | auto mean = sycl::span<double>{mean_data, mean_size};
|
1090 | 1085 | auto cov = sycl::span<double>{cov_data, cov_size};
|
1091 |
| -#endif |
1092 | 1086 |
|
1093 | 1087 | // `result` is a array for random numbers
|
1094 | 1088 | // `size` is a `result`'s len.
|
|
0 commit comments