32 #ifndef VSMC_UTILITY_MKL_HPP 33 #define VSMC_UTILITY_MKL_HPP 39 #define VSMC_STATIC_ASSERT_UTILITY_MKL_SS_TASK_RESULT_TYPE(ResultType) \ 40 VSMC_STATIC_ASSERT((std::is_same<ResultType, float>::value || \ 41 std::is_same<ResultType, double>::value), \ 42 "**MKLSSTask** USED WITH A ResultType OTHER THAN float OR double") 44 #define VSMC_STATIC_ASSERT_UTILITY_MKL_CONV_TASK_RESULT_TYPE(ResultType) \ 45 VSMC_STATIC_ASSERT((std::is_same<ResultType, float>::value || \ 46 std::is_same<ResultType, double>::value || \ 47 std::is_same<ResultType, MKL_Complex8>::value || \ 48 std::is_same<ResultType, MKL_Complex16>::value), \ 49 "**MKLConvTask** USED WITH A ResultType OTHER THAN float, double, " \ 50 "MKL_Complex8, OR MKL_Complex16") 52 #define VSMC_STATIC_ASSERT_UTILITY_MKL_CORR_TASK_RESULT_TYPE(ResultType) \ 53 VSMC_STATIC_ASSERT((std::is_same<ResultType, float>::value || \ 54 std::is_same<ResultType, double>::value || \ 55 std::is_same<ResultType, MKL_Complex8>::value || \ 56 std::is_same<ResultType, MKL_Complex16>::value), \ 57 "**MKLCorrTask** USED WITH A ResultType OTHER THAN float, double, " \ 58 "MKL_Complex8, OR MKL_Complex16") 60 #define VSMC_STATIC_ASSERT_UTILITY_MKL_DF_TASK_RESULT_TYPE(ResultType) \ 61 VSMC_STATIC_ASSERT((std::is_same<ResultType, float>::value || \ 62 std::is_same<ResultType, double>::value), \ 63 "**MKLDFTask** USED WITH A ResultType OTHER THAN float OR double") 65 #define VSMC_RUNTIME_ASSERT_UTILITY_MKL_VSL_OFFSET(offset) \ 66 VSMC_RUNTIME_ASSERT((offset < max VSMC_MNE()), \ 67 "**MKLOffsetDynamic** " \ 68 "EXCESS MAXIMUM NUMBER OF INDEPDENT RNG STREAMS") 76 #if VSMC_NO_RUNTIME_ASSERT 84 std::string msg(
"**");
87 msg +=
"; MKL function: ";
89 msg +=
"; Error code: ";
100 template <
typename MKLPtr,
typename Derived>
110 void operator()(MKLPtr ptr) { status_ = Derived::release(ptr); }
125 int release() {
return Derived::release(ptr_.get()); }
129 if (ptr != ptr_.get())
138 const deleter_type &
get_deleter()
const {
return ptr_.get_deleter(); }
140 explicit operator bool()
const {
return bool(ptr_); }
146 std::unique_ptr<element_type, deleter_type> ptr_;
151 template <
typename MKLPtr,
typename Derived>
155 return ptr1.
get() == ptr2.
get();
160 template <
typename MKLPtr,
typename Derived>
164 return ptr1.
get() == ptr2.
get();
169 template <
typename MKLPtr,
typename Derived>
184 MKLStream(MKL_INT brng, MKL_UINT seed) { reset(brng, seed); }
189 reset(brng, n, params);
196 ::VSLStreamStatePtr ptr =
nullptr;
198 "MKLStream::MKLStream",
"::vslCopyStream");
199 this->reset_ptr(ptr);
205 if (
this != &other) {
206 if (this->
get() ==
nullptr) {
207 ::VSLStreamStatePtr ptr =
nullptr;
209 "MKLStream::operator=",
"::vslCopyStream");
210 this->reset_ptr(ptr);
213 ::vslCopyStreamState(this->
get(), other.
get()),
214 "MKLStream::operator=",
"::vslCopyStreamState");
225 int reset(MKL_INT brng, MKL_UINT seed)
227 ::VSLStreamStatePtr ptr =
nullptr;
228 int status = ::vslNewStream(&ptr, brng, seed);
230 status,
"MKLStream::reset",
"::vslNewStream");
231 this->reset_ptr(ptr);
237 int reset(MKL_INT brng, MKL_INT n,
unsigned *params)
239 ::VSLStreamStatePtr ptr =
nullptr;
240 int status = ::vslNewStreamEx(&ptr, brng, n, params);
242 status,
"MKLStream::reset",
"::vslNewStreamEx");
243 this->reset_ptr(ptr);
254 int status = ::vslDeleteStream(&ptr);
256 status,
"MKLStream::release",
"::vslDeleteStream");
262 int save_f(
const std::string &fname)
const 264 int status = ::vslSaveStreamF(this->
get(), fname.c_str());
266 status,
"MKLStream::save_f",
"::vslSaveStreamF");
274 ::VSLStreamStatePtr ptr =
nullptr;
275 int status = ::vslSaveStreamF(&ptr, fname.c_str());
277 status,
"MKLStream::load_f",
"::vslSaveStreamF");
278 this->reset_ptr(ptr);
286 int status = ::vslSaveStreamM(this->
get(), memptr);
288 status,
"MKLStream::save_m",
"::vslSaveStreamM");
296 ::VSLStreamStatePtr ptr =
nullptr;
297 int status = ::vslLoadStreamM(&ptr, memptr);
299 status,
"MKLStream::load_m",
"::vslLoadStreamM");
300 this->reset_ptr(ptr);
306 int get_size()
const { return ::vslGetStreamSize(this->
get()); }
311 int status = ::vslLeapfrogStream(this->
get(), k, nstreams);
313 status,
"MKLStream::leapfrog",
"::vslLeapfrogStream");
321 int status = ::vslSkipAheadStream(this->
get(), nskip);
323 status,
"MKLStream::skip_ahead",
"::vslSkipAheadStream");
329 int get_brng()
const { return ::vslGetStreamStateBrng(this->
get()); }
336 MKL_INT brng, ::VSLBRngProperties &properties)
338 int status = ::vslGetBrngProperties(brng, &properties);
340 "::vslGetBrngProperties");
346 int uniform(MKL_INT n,
float *r,
float a,
float b,
347 MKL_INT method = VSL_RNG_METHOD_UNIFORM_STD)
349 int status = ::vsRngUniform(method, this->
get(), n, r, a, b);
351 status,
"MKLStream::uniform",
"::vsRngUniform");
357 int uniform(MKL_INT n,
double *r,
double a,
double b,
358 MKL_INT method = VSL_RNG_METHOD_UNIFORM_STD)
360 int status = ::vdRngUniform(method, this->
get(), n, r, a, b);
362 status,
"MKLStream::uniform",
"::vdRngUniform");
368 int gaussian(MKL_INT n,
float *r,
float a,
float sigma,
369 MKL_INT method = VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
371 int status = ::vsRngGaussian(method, this->
get(), n, r, a, sigma);
373 status,
"MKLStream::gaussian",
"::vsRngGaussian");
379 int gaussian(MKL_INT n,
double *r,
double a,
double sigma,
380 MKL_INT method = VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
382 int status = ::vdRngGaussian(method, this->
get(), n, r, a, sigma);
384 status,
"MKLStream::gaussian",
"::vdRngGaussian");
390 int gaussian_mv(MKL_INT n,
float *r, MKL_INT dimen, MKL_INT mstorage,
391 const float *a,
const float *t,
392 MKL_INT method = VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
394 int status = ::vsRngGaussianMV(
395 method, this->
get(), n, r, dimen, mstorage, a, t);
397 status,
"MKLStream::gaussian_mv",
"::vsRngGaussianMV");
403 int gaussian_mv(MKL_INT n,
double *r, MKL_INT dimen, MKL_INT mstorage,
404 const double *a,
const double *t,
405 MKL_INT method = VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
407 int status = ::vdRngGaussianMV(
408 method, this->
get(), n, r, dimen, mstorage, a, t);
410 status,
"MKLStream::gaussian_mv",
"::vdRngGaussianMV");
417 MKL_INT method = VSL_RNG_METHOD_EXPONENTIAL_ICDF)
419 int status = ::vsRngExponential(method, this->
get(), n, r, a, beta);
421 status,
"MKLStream::exponential",
"::vsRngExponential");
428 MKL_INT method = VSL_RNG_METHOD_EXPONENTIAL_ICDF)
430 int status = ::vdRngExponential(method, this->
get(), n, r, a, beta);
432 status,
"MKLStream::exponential",
"::vdRngExponential");
438 int laplace(MKL_INT n,
float *r,
float a,
float beta,
439 MKL_INT method = VSL_RNG_METHOD_LAPLACE_ICDF)
441 int status = ::vsRngLaplace(method, this->
get(), n, r, a, beta);
443 status,
"MKLStream::laplace",
"::vsRngLaplace");
449 int laplace(MKL_INT n,
double *r,
double a,
double beta,
450 MKL_INT method = VSL_RNG_METHOD_LAPLACE_ICDF)
452 int status = ::vdRngLaplace(method, this->
get(), n, r, a, beta);
454 status,
"MKLStream::laplace",
"::vdRngLaplace");
460 int weibull(MKL_INT n,
float *r,
float alpha,
float a,
float beta,
461 MKL_INT method = VSL_RNG_METHOD_WEIBULL_ICDF)
463 int status = ::vsRngWeibull(method, this->
get(), n, r, alpha, a, beta);
465 status,
"MKLStream::weibull",
"::vsRngWeibull");
471 int weibull(MKL_INT n,
double *r,
double alpha,
double a,
double beta,
472 MKL_INT method = VSL_RNG_METHOD_WEIBULL_ICDF)
474 int status = ::vdRngWeibull(method, this->
get(), n, r, alpha, a, beta);
476 status,
"MKLStream::weibull",
"::vdRngWeibull");
482 int cauchy(MKL_INT n,
float *r,
float a,
float beta,
483 MKL_INT method = VSL_RNG_METHOD_CAUCHY_ICDF)
485 int status = ::vsRngCauchy(method, this->
get(), n, r, a, beta);
487 status,
"MKLStream::cauchy",
"::vsRngCauchy");
493 int cauchy(MKL_INT n,
double *r,
double a,
double beta,
494 MKL_INT method = VSL_RNG_METHOD_CAUCHY_ICDF)
496 int status = ::vdRngCauchy(method, this->
get(), n, r, a, beta);
498 status,
"MKLStream::cauchy",
"::vdRngCauchy");
504 int rayleigh(MKL_INT n,
float *r,
float a,
float beta,
505 MKL_INT method = VSL_RNG_METHOD_RAYLEIGH_ICDF)
507 int status = ::vsRngRayleigh(method, this->
get(), n, r, a, beta);
509 status,
"MKLStream::rayleigh",
"::vsRngRayleigh");
515 int rayleigh(MKL_INT n,
double *r,
double a,
double beta,
516 MKL_INT method = VSL_RNG_METHOD_RAYLEIGH_ICDF)
518 int status = ::vdRngRayleigh(method, this->
get(), n, r, a, beta);
520 status,
"MKLStream::rayleigh",
"::vdRngRayleigh");
526 int lognormal(MKL_INT n,
float *r,
float a,
float sigma,
float b,
527 float beta, MKL_INT method = VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
530 ::vsRngLognormal(method, this->
get(), n, r, a, sigma, b, beta);
532 status,
"MKLStream::lognormal",
"::vsRngLognormal");
538 int lognormal(MKL_INT n,
double *r,
double a,
double sigma,
double b,
539 double beta, MKL_INT method = VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
542 ::vdRngLognormal(method, this->
get(), n, r, a, sigma, b, beta);
544 status,
"MKLStream::lognormal",
"::vdRngLognormal");
550 int gumbel(MKL_INT n,
float *r,
float a,
float beta,
551 MKL_INT method = VSL_RNG_METHOD_GUMBEL_ICDF)
553 int status = ::vsRngGumbel(method, this->
get(), n, r, a, beta);
555 status,
"MKLStream::gumbel",
"::vsRngGumbel");
561 int gumbel(MKL_INT n,
double *r,
double a,
double beta,
562 MKL_INT method = VSL_RNG_METHOD_GUMBEL_ICDF)
564 int status = ::vdRngGumbel(method, this->
get(), n, r, a, beta);
566 status,
"MKLStream::gumbel",
"::vdRngGumbel");
572 int gamma(MKL_INT n,
float *r,
float alpha,
float a,
float beta,
573 MKL_INT method = VSL_RNG_METHOD_GAMMA_GNORM)
575 int status = ::vsRngGamma(method, this->
get(), n, r, alpha, a, beta);
582 int gamma(MKL_INT n,
double *r,
double alpha,
double a,
double beta,
583 MKL_INT method = VSL_RNG_METHOD_GAMMA_GNORM)
585 int status = ::vdRngGamma(method, this->
get(), n, r, alpha, a, beta);
592 int beta(MKL_INT n,
float *r,
float p,
float q,
float a,
float beta,
593 MKL_INT method = VSL_RNG_METHOD_BETA_CJA)
595 int status = ::vsRngBeta(method, this->
get(), n, r, p, q, a, beta);
602 int beta(MKL_INT n,
double *r,
double p,
double q,
double a,
double beta,
603 MKL_INT method = VSL_RNG_METHOD_BETA_CJA)
605 int status = ::vdRngBeta(method, this->
get(), n, r, p, q, a, beta);
613 MKL_INT method = VSL_RNG_METHOD_UNIFORM_STD)
615 int status = ::viRngUniform(method, this->
get(), n, r, a, b);
617 status,
"MKLStream::uniform",
"::viRngUniform");
624 MKL_INT method = VSL_RNG_METHOD_UNIFORMBITS_STD)
626 int status = ::viRngUniformBits(method, this->
get(), n, r);
628 status,
"MKLStream::uniform_bits",
"::viRngUniformBits");
635 MKL_INT method = VSL_RNG_METHOD_UNIFORMBITS32_STD)
637 int status = ::viRngUniformBits32(method, this->
get(), n, r);
639 status,
"MKLStream::uniform_bits32",
"::viRngUniformBits32");
646 MKL_INT method = VSL_RNG_METHOD_UNIFORMBITS64_STD)
648 int status = ::viRngUniformBits64(method, this->
get(), n, r);
650 status,
"MKLStream::uniform_bits64",
"::viRngUniformBits64");
657 MKL_INT method = VSL_RNG_METHOD_BERNOULLI_ICDF)
659 int status = ::viRngBernoulli(method, this->
get(), n, r, p);
661 status,
"MKLStream::bernoulli",
"::viRngBernoulli");
668 MKL_INT method = VSL_RNG_METHOD_GEOMETRIC_ICDF)
670 int status = ::viRngGeometric(method, this->
get(), n, r, p);
672 status,
"MKLStream::geometric",
"::viRngGeometric");
678 int binomial(MKL_INT n,
int *r,
int ntrial,
double p,
679 MKL_INT method = VSL_RNG_METHOD_BINOMIAL_BTPE)
681 int status = ::viRngBinomial(method, this->
get(), n, r, ntrial, p);
683 status,
"MKLStream::binomial",
"::viRngBinomial");
690 MKL_INT method = VSL_RNG_METHOD_HYPERGEOMETRIC_H2PE)
692 int status = ::viRngHypergeometric(method, this->
get(), n, r, l, s, m);
694 status,
"MKLStream::hypergeometric",
"::viRngHypergeometric");
701 MKL_INT method = VSL_RNG_METHOD_POISSON_PTPE)
703 int status = ::viRngPoisson(method, this->
get(), n, r, lambda);
705 status,
"MKLStream::poisson",
"::viRngPoisson");
712 MKL_INT method = VSL_RNG_METHOD_POISSONV_POISNORM)
714 int status = ::viRngPoissonV(method, this->
get(), n, r, lambda);
716 status,
"MKLStream::poisson_v",
"::viRngPoissonV");
723 MKL_INT method = VSL_RNG_METHOD_NEGBINOMIAL_NBAR)
725 int status = ::viRngNegbinomial(method, this->
get(), n, r, a, p);
727 status,
"MKLStream::neg_binomial",
"::viRngNegbinomial");
735 template <
typename ResultType =
double>
747 MKLSSTask(
const MKL_INT *p,
const MKL_INT *n,
const MKL_INT *xstorage,
751 reset(p, n, xstorage, x, w, indices);
755 int reset(
const MKL_INT *p,
const MKL_INT *n,
const MKL_INT *xstorage,
758 return reset_dispatch(p, n, xstorage, x, w, indices);
767 int status = ::vslSSDeleteTask(&ptr);
769 status,
"MKLSSTask::release",
"::vslSSDeleteTask");
777 return edit_task_dispatch(parameter, par_addr);
781 int edit_task(MKL_INT parameter,
const MKL_INT *par_addr)
783 return edit_task_dispatch(parameter, par_addr);
791 return edit_moments_dispatch(mean, r2m, r3m, r4m, c2m, c3m, c4m);
799 return edit_moments_dispatch(sum, r2s, r3s, r4s, c2s, c3s, c4s);
804 const MKL_INT *cov_storage,
const result_type *cor,
805 const MKL_INT *cor_storage)
807 return edit_cov_cor_dispatch(mean, cov, cov_storage, cor, cor_storage);
814 return edit_cp_dispatch(mean, sum, cp, cp_storage);
819 const result_type *cov,
const MKL_INT *cov_storage,
820 const result_type *cor,
const MKL_INT *cor_storage,
821 const result_type *p_cov,
const MKL_INT *p_cov_storage,
822 const result_type *p_cor,
const MKL_INT *p_cor_storage)
const 824 return edit_partial_cov_cor_dispatch(p_idx_array, cov, cov_storage,
825 cor, cor_storage, p_cov, p_cov_storage, p_cor, p_cor_storage);
831 const result_type *order_stats,
const MKL_INT *order_stats_storage)
833 return edit_quantiles_dispatch(quant_order_n, quant_order, quant,
834 order_stats, order_stats_storage);
842 return edit_stream_quantiles_dispatch(
843 quant_order_n, quant_order, quants, nparams, params);
849 const MKL_INT *req_grp_indices,
const result_type *grp_means,
852 return edit_pooled_covariance_dispatch(grp_indices, pld_mean, pld_cov,
853 req_grp_indices, grp_means, grp_cov);
861 return edit_robust_covariance_dispatch(
862 rcov_storage, nparams, params, rmean, rcov);
869 return edit_outliers_detection_dispatch(nparams, params, w);
874 const MKL_INT *init_estimates_n,
const result_type *init_estimates,
876 const MKL_INT *simul_missing_vals_n,
877 const result_type *simul_missing_vals,
const MKL_INT *estimates_n,
880 return edit_missing_values_dispatch(nparams, params, init_estimates_n,
881 init_estimates, prior_n, prior, simul_missing_vals_n,
882 simul_missing_vals, estimates_n, estimates);
887 const MKL_INT *cor_storage,
const result_type *pcor,
888 const MKL_INT *pcor_storage)
890 return edit_cor_parameterization_dispatch(
891 cor, cor_storage, pcor, pcor_storage);
895 int compute(
unsigned MKL_INT64 estimates, MKL_INT method)
897 return compute_dispatch(
898 estimates, method, static_cast<float *>(
nullptr));
902 int reset_dispatch(
const MKL_INT *p,
const MKL_INT *n,
903 const MKL_INT *xstorage,
const float *x,
const float *w,
904 const MKL_INT *indices)
907 int status = ::vslsSSNewTask(&ptr, p, n, xstorage, x, w, indices);
909 status,
"MKLSSTask::reset",
"::vslsSSNewTask");
910 this->reset_ptr(ptr);
915 int reset_dispatch(
const MKL_INT *p,
const MKL_INT *n,
916 const MKL_INT *xstorage,
const double *x,
const double *w,
917 const MKL_INT *indices)
920 int status = ::vsldSSNewTask(&ptr, p, n, xstorage, x, w, indices);
922 status,
"MKLSSTask::reset",
"::vsldSSNewTask");
923 this->reset_ptr(ptr);
928 int edit_task_dispatch(MKL_INT parameter,
const float *par_addr)
930 int status = ::vslsSSEditTask(this->
get(), parameter, par_addr);
932 status,
"MKLSSTask::edit_task",
"::vslsSSEditTask");
937 int edit_task_dispatch(MKL_INT parameter,
const double *par_addr)
939 int status = ::vsldSSEditTask(this->
get(), parameter, par_addr);
941 status,
"MKLSSTask::edit_task",
"::vsldSSEditTask");
946 int edit_task_dispatch(MKL_INT parameter,
const MKL_INT *par_addr)
948 int status = ::vsliSSEditTask(this->
get(), parameter, par_addr);
950 status,
"MKLSSTask::edit_task",
"::vsliSSEditTask");
955 int edit_moments_dispatch(
const float *mean,
const float *r2m,
956 const float *r3m,
const float *r4m,
const float *c2m,
const float *c3m,
959 int status = ::vslsSSEditMoments(
960 this->
get(), mean, r2m, r3m, r4m, c2m, c3m, c4m);
962 status,
"MKLSSTask::edit_moments",
"::vslsSSEditMoments");
967 int edit_moments_dispatch(
const double *mean,
const double *r2m,
968 const double *r3m,
const double *r4m,
const double *c2m,
969 const double *c3m,
const double *c4m)
971 int status = ::vsldSSEditMoments(
972 this->
get(), mean, r2m, r3m, r4m, c2m, c3m, c4m);
974 status,
"MKLSSTask::edit_moments",
"::vsldSSEditMoments");
979 int edit_sums_dispatch(
const float *sum,
const float *r2s,
980 const float *r3s,
const float *r4s,
const float *c2s,
const float *c3s,
984 ::vslsSSEditSums(this->
get(), sum, r2s, r3s, r4s, c2s, c3s, c4s);
986 status,
"MKLSSTask::edit_sums",
"::vslsSSEditSums");
991 int edit_sums_dispatch(
const double *sum,
const double *r2s,
992 const double *r3s,
const double *r4s,
const double *c2s,
993 const double *c3s,
const double *c4s)
996 ::vsldSSEditSums(this->
get(), sum, r2s, r3s, r4s, c2s, c3s, c4s);
998 status,
"MKLSSTask::edit_sums",
"::vsldSSEditSums");
1003 int edit_cov_cor_dispatch(
const float *mean,
const float *cov,
1004 const MKL_INT *cov_storage,
const float *cor,
1005 const MKL_INT *cor_storage)
1007 int status = ::vslsSSEditCovCor(
1008 this->
get(), mean, cov, cov_storage, cor, cor_storage);
1010 status,
"MKLSSTask::edit_cov_cor",
"::vslsSSEditCovCor");
1015 int edit_cov_cor_dispatch(
const double *mean,
const double *cov,
1016 const MKL_INT *cov_storage,
const double *cor,
1017 const MKL_INT *cor_storage)
1019 int status = ::vsldSSEditCovCor(
1020 this->
get(), mean, cov, cov_storage, cor, cor_storage);
1022 status,
"MKLSSTask::edit_cov_cor",
"::vsldSSEditCovCor");
1027 int edit_cp_dispatch(
const float *mean,
const float *sum,
const float *cp,
1028 const MKL_INT *cp_storage)
1030 int status = ::vslsSSEditCP(this->
get(), mean, sum, cp, cp_storage);
1032 status,
"MKLSSTask::edit_cp",
"::vslsSSEditCP");
1037 int edit_cp_dispatch(
const double *mean,
const double *sum,
1038 const double *cp,
const MKL_INT *cp_storage)
1040 int status = ::vsldSSEditCP(this->
get(), mean, sum, cp, cp_storage);
1042 status,
"MKLSSTask::edit_cp",
"::vsldSSEditCP");
1047 int edit_partial_cov_cor_dispatch(
const MKL_INT *p_idx_array,
1048 const float *cov,
const MKL_INT *cov_storage,
const float *cor,
1049 const MKL_INT *cor_storage,
const float *p_cov,
1050 const MKL_INT *p_cov_storage,
const float *p_cor,
1051 const MKL_INT *p_cor_storage)
const 1053 int status = ::vslsSSEditPartialCovCor(this->
get(), p_idx_array, cov,
1054 cov_storage, cor, cor_storage, p_cov, p_cov_storage, p_cor,
1057 "::vslsSSEditPartialCovCor");
1062 int edit_partial_cov_cor_dispatch(
const MKL_INT *p_idx_array,
1063 const double *cov,
const MKL_INT *cov_storage,
const double *cor,
1064 const MKL_INT *cor_storage,
const double *p_cov,
1065 const MKL_INT *p_cov_storage,
const double *p_cor,
1066 const MKL_INT *p_cor_storage)
const 1068 int status = ::vsldSSEditPartialCovCor(this->
get(), p_idx_array, cov,
1069 cov_storage, cor, cor_storage, p_cov, p_cov_storage, p_cor,
1072 "::vsldSSEditPartialCovCor");
1077 int edit_quantiles_dispatch(
const MKL_INT *quant_order_n,
1078 const float *quant_order,
const float *quant,
const float *order_stats,
1079 const MKL_INT *order_stats_storage)
1081 int status = ::vslsSSEditQuantiles(this->
get(), quant_order_n,
1082 quant_order, quant, order_stats, order_stats_storage);
1084 status,
"MKLSSTask::edit_quantiles",
"::vslsSSEditQuantiles");
1089 int edit_quantiles_dispatch(
const MKL_INT *quant_order_n,
1090 const double *quant_order,
const double *quant,
1091 const double *order_stats,
const MKL_INT *order_stats_storage)
1093 int status = ::vsldSSEditQuantiles(this->
get(), quant_order_n,
1094 quant_order, quant, order_stats, order_stats_storage);
1096 status,
"MKLSSTask::edit_quantiles",
"::vsldSSEditQuantiles");
1101 int edit_stream_quantiles_dispatch(
const MKL_INT *quant_order_n,
1102 const float *quant_order,
const float *quants,
const MKL_INT *nparams,
1103 const float *params)
1105 int status = ::vslsSSEditStreamQuantiles(
1106 this->
get(), quant_order_n, quant_order, quants, nparams, params);
1108 "::vslsSSEditStreamQuantiles");
1113 int edit_stream_quantiles_dispatch(
const MKL_INT *quant_order_n,
1114 const double *quant_order,
const double *quants,
1115 const MKL_INT *nparams,
const double *params)
1117 int status = ::vsldSSEditStreamQuantiles(
1118 this->
get(), quant_order_n, quant_order, quants, nparams, params);
1120 "::vsldSSEditStreamQuantiles");
1125 int edit_pooled_covariance_dispatch(
const MKL_INT *grp_indices,
1126 const float *pld_mean,
const float *pld_cov,
1127 const MKL_INT *req_grp_indices,
const float *grp_means,
1128 const float *grp_cov)
1130 int status = ::vslsSSEditPooledCovariance(this->
get(), grp_indices,
1131 pld_mean, pld_cov, req_grp_indices, grp_means, grp_cov);
1133 "::vslsSSEditPooledCovariance");
1138 int edit_pooled_covariance_dispatch(
const MKL_INT *grp_indices,
1139 const double *pld_mean,
const double *pld_cov,
1140 const MKL_INT *req_grp_indices,
const double *grp_means,
1141 const double *grp_cov)
1143 int status = ::vsldSSEditPooledCovariance(this->
get(), grp_indices,
1144 pld_mean, pld_cov, req_grp_indices, grp_means, grp_cov);
1146 "::vsldSSEditPooledCovariance");
1151 int edit_robust_covariance_dispatch(
const MKL_INT *rcov_storage,
1152 const MKL_INT *nparams,
const float *params,
const float *rmean,
1155 int status = ::vslsSSEditRobustCovariance(
1156 this->
get(), rcov_storage, nparams, params, rmean, rcov);
1158 "::vslsSSEditRobustCovariance");
1163 int edit_robust_covariance_dispatch(
const MKL_INT *rcov_storage,
1164 const MKL_INT *nparams,
const double *params,
const double *rmean,
1167 int status = ::vsldSSEditRobustCovariance(
1168 this->
get(), rcov_storage, nparams, params, rmean, rcov);
1170 "::vsldSSEditRobustCovariance");
1175 int edit_outliers_detection_dispatch(
1176 const MKL_INT *nparams,
const float *params,
const float *w)
1179 ::vslsSSEditOutliersDetection(this->
get(), nparams, params, w);
1181 "::vslsSSEditOutliersDetection");
1186 int edit_outliers_detection_dispatch(
1187 const MKL_INT *nparams,
const double *params,
const double *w)
1190 ::vsldSSEditOutliersDetection(this->
get(), nparams, params, w);
1192 "::vsldSSEditOutliersDetection");
1197 int edit_missing_values_dispatch(
const MKL_INT *nparams,
1198 const float *params,
const MKL_INT *init_estimates_n,
1199 const float *init_estimates,
const MKL_INT *prior_n,
1200 const float *prior,
const MKL_INT *simul_missing_vals_n,
1201 const float *simul_missing_vals,
const MKL_INT *estimates_n,
1202 const float *estimates)
1204 int status = ::vslsSSEditMissingValues(this->
get(), nparams, params,
1205 init_estimates_n, init_estimates, prior_n, prior,
1206 simul_missing_vals_n, simul_missing_vals, estimates_n, estimates);
1208 "::vslsSSEditMissingValues");
1213 int edit_missing_values_dispatch(
const MKL_INT *nparams,
1214 const double *params,
const MKL_INT *init_estimates_n,
1215 const double *init_estimates,
const MKL_INT *prior_n,
1216 const double *prior,
const MKL_INT *simul_missing_vals_n,
1217 const double *simul_missing_vals,
const MKL_INT *estimates_n,
1218 const double *estimates)
1220 int status = ::vsldSSEditMissingValues(this->
get(), nparams, params,
1221 init_estimates_n, init_estimates, prior_n, prior,
1222 simul_missing_vals_n, simul_missing_vals, estimates_n, estimates);
1224 "::vsldSSEditMissingValues");
1229 int edit_cor_parameterization_dispatch(
const float *cor,
1230 const MKL_INT *cor_storage,
const float *pcor,
1231 const MKL_INT *pcor_storage)
1233 int status = ::vslsSSEditCorParameterization(
1234 this->
get(), cor, cor_storage, pcor, pcor_storage);
1236 "MKLSSTask::edit_cor_parameterization",
1237 "::vslsSSEditCorParameterization");
1242 int edit_cor_parameterization_dispatch(
const double *cor,
1243 const MKL_INT *cor_storage,
const double *pcor,
1244 const MKL_INT *pcor_storage)
1246 int status = ::vsldSSEditCorParameterization(
1247 this->
get(), cor, cor_storage, pcor, pcor_storage);
1249 "MKLSSTask::edit_cor_parameterization",
1250 "::vsldSSEditCorParameterization");
1255 int compute_dispatch(
1256 unsigned MKL_INT64 estimates, MKL_INT method,
const float *)
1258 int status = ::vslsSSCompute(this->
get(), estimates, method);
1260 status,
"MKLSSTask::compute",
"::vslsSSCompute");
1265 int compute_dispatch(
1266 unsigned MKL_INT64 estimates, MKL_INT method,
const double *)
1268 int status = ::vsldSSCompute(this->
get(), estimates, method);
1270 status,
"MKLSSTask::compute",
"::vsldSSCompute");
1278 template <
typename ResultType =
double>
1291 const MKL_INT *yshape,
const MKL_INT *zshape)
1294 reset(mode, dims, xshape, yshape, zshape);
1299 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1302 reset(mode, xshape, yshape, zshape);
1307 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1308 const MKL_INT *xstride)
1311 reset(mode, dims, xshape, yshape, zshape, x, xstride);
1315 MKLConvTask(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1319 reset(mode, xshape, yshape, zshape, x, xstride);
1327 ::VSLConvTaskPtr ptr =
nullptr;
1329 "MKLConvTask::MKLConvTask",
"::vslConvCopyTask");
1330 this->reset_ptr(ptr);
1336 if (
this != &other) {
1337 ::VSLConvTaskPtr ptr =
nullptr;
1339 "MKLConvTask::operator=",
"::vslConvCopyTask");
1340 this->reset_ptr(ptr);
1355 int status = ::vslConvDeleteTask(&ptr);
1357 status,
"MKLConvTask::release",
"::vslConvDeleteTask");
1363 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1364 const MKL_INT *yshape,
const MKL_INT *zshape)
1366 return reset_dispatch(mode, dims, xshape, yshape, zshape);
1371 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1373 return reset_dispatch(mode, xshape, yshape, zshape);
1377 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1378 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1379 const MKL_INT *xstride)
1381 return reset_dispatch(mode, dims, xshape, yshape, zshape, x, xstride);
1385 int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1388 return reset_dispatch(mode, xshape, yshape, zshape, x, xstride);
1392 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1393 const MKL_INT *yshape,
const MKL_INT *zshape,
float *)
1395 ::VSLConvTaskPtr ptr;
1397 ::vslsConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1399 status,
"MKLConvTask::reset",
"::vslsConvNewTask");
1400 this->reset_ptr(ptr);
1405 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1406 const MKL_INT *yshape,
const MKL_INT *zshape,
double *)
1408 ::VSLConvTaskPtr ptr;
1410 ::vsldConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1412 status,
"MKLConvTask::reset",
"::vsldConvNewTask");
1413 this->reset_ptr(ptr);
1418 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1419 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex8 *)
1421 ::VSLConvTaskPtr ptr;
1423 ::vslcConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1425 status,
"MKLConvTask::reset",
"::vslcConvNewTask");
1426 this->reset_ptr(ptr);
1431 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1432 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex16 *)
1434 ::VSLConvTaskPtr ptr;
1436 ::vslzConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1438 status,
"MKLConvTask::reset",
"::vslzConvNewTask");
1439 this->reset_ptr(ptr);
1444 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1445 const MKL_INT yshape,
const MKL_INT zshape,
float *)
1447 ::VSLConvTaskPtr ptr;
1448 int status = ::vslsConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1450 status,
"MKLConvTask::reset",
"::vslsConvNewTask1D");
1451 this->reset_ptr(ptr);
1456 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1457 const MKL_INT yshape,
const MKL_INT zshape,
double *)
1459 ::VSLConvTaskPtr ptr;
1460 int status = ::vsldConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1462 status,
"MKLConvTask::reset",
"::vsldConvNewTask1D");
1463 this->reset_ptr(ptr);
1468 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1469 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex8 *)
1471 ::VSLConvTaskPtr ptr;
1472 int status = ::vslcConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1474 status,
"MKLConvTask::reset",
"::vslcConvNewTask1D");
1475 this->reset_ptr(ptr);
1480 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1481 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex16 *)
1483 ::VSLConvTaskPtr ptr;
1484 int status = ::vslzConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1486 status,
"MKLConvTask::reset",
"::vslzConvNewTask1D");
1487 this->reset_ptr(ptr);
1492 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1493 const MKL_INT *yshape,
const MKL_INT *zshape,
const float *x,
1494 const MKL_INT *xstride)
1496 ::VSLConvTaskPtr ptr;
1497 int status = ::vslsConvNewTaskX(
1498 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1500 status,
"MKLConvTask::reset",
"::vslsConvNewTaskX");
1501 this->reset_ptr(ptr);
1506 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1507 const MKL_INT *yshape,
const MKL_INT *zshape,
const double *x,
1508 const MKL_INT *xstride)
1510 ::VSLConvTaskPtr ptr;
1511 int status = ::vsldConvNewTaskX(
1512 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1514 status,
"MKLConvTask::reset",
"::vsldConvNewTaskX");
1515 this->reset_ptr(ptr);
1520 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1521 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex8 *x,
1522 const MKL_INT *xstride)
1524 ::VSLConvTaskPtr ptr;
1525 int status = ::vslcConvNewTaskX(
1526 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1528 status,
"MKLConvTask::reset",
"::vslcConvNewTaskX");
1529 this->reset_ptr(ptr);
1534 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1535 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex16 *x,
1536 const MKL_INT *xstride)
1538 ::VSLConvTaskPtr ptr;
1539 int status = ::vslzConvNewTaskX(
1540 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1542 status,
"MKLConvTask::reset",
"::vslzConvNewTaskX");
1543 this->reset_ptr(ptr);
1548 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1549 const MKL_INT yshape,
const MKL_INT zshape,
const float *x,
1550 const MKL_INT xstride)
1552 ::VSLConvTaskPtr ptr;
1553 int status = ::vslsConvNewTaskX1D(
1554 &ptr, mode, xshape, yshape, zshape, x, xstride);
1556 status,
"MKLConvTask::reset",
"::vslsConvNewTaskX1D");
1557 this->reset_ptr(ptr);
1562 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1563 const MKL_INT yshape,
const MKL_INT zshape,
const double *x,
1564 const MKL_INT xstride)
1566 ::VSLConvTaskPtr ptr;
1567 int status = ::vsldConvNewTaskX1D(
1568 &ptr, mode, xshape, yshape, zshape, x, xstride);
1570 status,
"MKLConvTask::reset",
"::vsldConvNewTaskX1D");
1571 this->reset_ptr(ptr);
1576 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1577 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex8 *x,
1578 const MKL_INT xstride)
1580 ::VSLConvTaskPtr ptr;
1581 int status = ::vslcConvNewTaskX1D(
1582 &ptr, mode, xshape, yshape, zshape, x, xstride);
1584 status,
"MKLConvTask::reset",
"::vslcConvNewTaskX1D");
1585 this->reset_ptr(ptr);
1590 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1591 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex16 *x,
1592 const MKL_INT xstride)
1594 ::VSLConvTaskPtr ptr;
1595 int status = ::vslzConvNewTaskX1D(
1596 &ptr, mode, xshape, yshape, zshape, x, xstride);
1598 status,
"MKLConvTask::reset",
"::vslzConvNewTaskX1D");
1599 this->reset_ptr(ptr);
1607 template <
typename ResultType =
double>
1620 const MKL_INT *yshape,
const MKL_INT *zshape)
1623 reset(mode, dims, xshape, yshape, zshape);
1628 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1631 reset(mode, xshape, yshape, zshape);
1636 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1637 const MKL_INT *xstride)
1640 reset(mode, dims, xshape, yshape, zshape, x, xstride);
1644 MKLCorrTask(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1648 reset(mode, xshape, yshape, zshape, x, xstride);
1656 ::VSLCorrTaskPtr ptr =
nullptr;
1658 "MKLCorrTask::MKLCorrTask",
"::vslCorrCopyTask");
1659 this->reset_ptr(ptr);
1665 if (
this != &other) {
1666 ::VSLCorrTaskPtr ptr =
nullptr;
1668 "MKLCorrTask::operator=",
"::vslCorrCopyTask");
1669 this->reset_ptr(ptr);
1684 int status = ::vslCorrDeleteTask(&ptr);
1686 status,
"MKLCorrTask::release",
"::vslCorrDeleteTask");
1692 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1693 const MKL_INT *yshape,
const MKL_INT *zshape)
1695 return reset_dispatch(mode, dims, xshape, yshape, zshape);
1700 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1702 return reset_dispatch(mode, xshape, yshape, zshape);
1706 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1707 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1708 const MKL_INT *xstride)
1710 return reset_dispatch(mode, dims, xshape, yshape, zshape, x, xstride);
1714 int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1717 return reset_dispatch(mode, xshape, yshape, zshape, x, xstride);
1721 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1722 const MKL_INT *yshape,
const MKL_INT *zshape,
float *)
1724 ::VSLCorrTaskPtr ptr;
1726 ::vslsCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1728 status,
"MKLCorrTask::reset",
"::vslsCorrNewTask");
1729 this->reset_ptr(ptr);
1734 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1735 const MKL_INT *yshape,
const MKL_INT *zshape,
double *)
1737 ::VSLCorrTaskPtr ptr;
1739 ::vsldCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1741 status,
"MKLCorrTask::reset",
"::vsldCorrNewTask");
1742 this->reset_ptr(ptr);
1747 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1748 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex8 *)
1750 ::VSLCorrTaskPtr ptr;
1752 ::vslcCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1754 status,
"MKLCorrTask::reset",
"::vslcCorrNewTask");
1755 this->reset_ptr(ptr);
1760 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1761 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex16 *)
1763 ::VSLCorrTaskPtr ptr;
1765 ::vslzCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1767 status,
"MKLCorrTask::reset",
"::vslzCorrNewTask");
1768 this->reset_ptr(ptr);
1773 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1774 const MKL_INT yshape,
const MKL_INT zshape,
float *)
1776 ::VSLCorrTaskPtr ptr;
1777 int status = ::vslsCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1779 status,
"MKLCorrTask::reset",
"::vslsCorrNewTask1D");
1780 this->reset_ptr(ptr);
1785 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1786 const MKL_INT yshape,
const MKL_INT zshape,
double *)
1788 ::VSLCorrTaskPtr ptr;
1789 int status = ::vsldCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1791 status,
"MKLCorrTask::reset",
"::vsldCorrNewTask1D");
1792 this->reset_ptr(ptr);
1797 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1798 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex8 *)
1800 ::VSLCorrTaskPtr ptr;
1801 int status = ::vslcCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1803 status,
"MKLCorrTask::reset",
"::vslcCorrNewTask1D");
1804 this->reset_ptr(ptr);
1809 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1810 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex16 *)
1812 ::VSLCorrTaskPtr ptr;
1813 int status = ::vslzCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1815 status,
"MKLCorrTask::reset",
"::vslzCorrNewTask1D");
1816 this->reset_ptr(ptr);
1821 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1822 const MKL_INT *yshape,
const MKL_INT *zshape,
const float *x,
1823 const MKL_INT *xstride)
1825 ::VSLCorrTaskPtr ptr;
1826 int status = ::vslsCorrNewTaskX(
1827 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1829 status,
"MKLCorrTask::reset",
"::vslsCorrNewTaskX");
1830 this->reset_ptr(ptr);
1835 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1836 const MKL_INT *yshape,
const MKL_INT *zshape,
const double *x,
1837 const MKL_INT *xstride)
1839 ::VSLCorrTaskPtr ptr;
1840 int status = ::vsldCorrNewTaskX(
1841 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1843 status,
"MKLCorrTask::reset",
"::vsldCorrNewTaskX");
1844 this->reset_ptr(ptr);
1849 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1850 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex8 *x,
1851 const MKL_INT *xstride)
1853 ::VSLCorrTaskPtr ptr;
1854 int status = ::vslcCorrNewTaskX(
1855 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1857 status,
"MKLCorrTask::reset",
"::vslcCorrNewTaskX");
1858 this->reset_ptr(ptr);
1863 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1864 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex16 *x,
1865 const MKL_INT *xstride)
1867 ::VSLCorrTaskPtr ptr;
1868 int status = ::vslzCorrNewTaskX(
1869 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1871 status,
"MKLCorrTask::reset",
"::vslzCorrNewTaskX");
1872 this->reset_ptr(ptr);
1877 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1878 const MKL_INT yshape,
const MKL_INT zshape,
const float *x,
1879 const MKL_INT xstride)
1881 ::VSLCorrTaskPtr ptr;
1882 int status = ::vslsCorrNewTaskX1D(
1883 &ptr, mode, xshape, yshape, zshape, x, xstride);
1885 status,
"MKLCorrTask::reset",
"::vslsCorrNewTaskX1D");
1886 this->reset_ptr(ptr);
1891 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1892 const MKL_INT yshape,
const MKL_INT zshape,
const double *x,
1893 const MKL_INT xstride)
1895 ::VSLCorrTaskPtr ptr;
1896 int status = ::vsldCorrNewTaskX1D(
1897 &ptr, mode, xshape, yshape, zshape, x, xstride);
1899 status,
"MKLCorrTask::reset",
"::vsldCorrNewTaskX1D");
1900 this->reset_ptr(ptr);
1905 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1906 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex8 *x,
1907 const MKL_INT xstride)
1909 ::VSLCorrTaskPtr ptr;
1910 int status = ::vslcCorrNewTaskX1D(
1911 &ptr, mode, xshape, yshape, zshape, x, xstride);
1913 status,
"MKLCorrTask::reset",
"::vslcCorrNewTaskX1D");
1914 this->reset_ptr(ptr);
1919 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1920 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex16 *x,
1921 const MKL_INT xstride)
1923 ::VSLCorrTaskPtr ptr;
1924 int status = ::vslzCorrNewTaskX1D(
1925 &ptr, mode, xshape, yshape, zshape, x, xstride);
1927 status,
"MKLCorrTask::reset",
"::vslzCorrNewTaskX1D");
1928 this->reset_ptr(ptr);
1936 template <
typename ResultType =
double>
1951 reset(nx, x, xhint, ny, y, yhint);
1959 int status = ::dfDeleteTask(&ptr);
1961 status,
"MKLDFTask::release",
"::dfDeleteTask");
1969 return reset_dispatch(nx, x, xhint, ny, y, yhint);
1973 int reset_dispatch(MKL_INT nx,
const float *x, MKL_INT xhint, MKL_INT ny,
1974 const float *y, MKL_INT yhint)
1977 int status = ::dfsNewTask1D(&ptr, nx, x, xhint, ny, y, yhint);
1979 status,
"MKLDFTask::reset",
"::dfsNewTask1D");
1980 this->reset_ptr(ptr);
1985 int reset_dispatch(MKL_INT nx,
const double *x, MKL_INT xhint, MKL_INT ny,
1986 const double *y, MKL_INT yhint)
1989 int status = ::dfdNewTask1D(&ptr, nx, x, xhint, ny, y, yhint);
1991 status,
"MKLDFTask::reset",
"::dfdNewTask1D");
1992 this->reset_ptr(ptr);
2000 #endif // VSMC_UTILITY_MKL_HPP #define VSMC_STATIC_ASSERT_UTILITY_MKL_CONV_TASK_RESULT_TYPE(ResultType)
static int release(::DFTaskPtr ptr)
int gumbel(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_GUMBEL_ICDF)
vsRngGumbel
int edit_stream_quantiles(const MKL_INT *quant_order_n, const result_type *quant_order, const result_type *quants, const MKL_INT *nparams, const result_type *params)
vslSSEditStreamQuantiles
int edit_task(MKL_INT parameter, const MKL_INT *par_addr)
vsliSSEditTask
static int get_num_reg_brngs()
vslGetNumRegBrngs
MKLStream(MKL_INT brng, MKL_INT n, unsigned *params)
vslNewStreamEx
int edit_missing_values(const MKL_INT *nparams, const result_type *params, const MKL_INT *init_estimates_n, const result_type *init_estimates, const MKL_INT *prior_n, const result_type *prior, const MKL_INT *simul_missing_vals_n, const result_type *simul_missing_vals, const MKL_INT *estimates_n, const result_type *estimates)
vslSSEditMissingValues
int reset(const MKL_INT *p, const MKL_INT *n, const MKL_INT *xstorage, const result_type *x, const result_type *w, const MKL_INT *indices)
vslSSNewTask
int gamma(MKL_INT n, double *r, double alpha, double a, double beta, MKL_INT method=VSL_RNG_METHOD_GAMMA_GNORM)
vdRngGamma
int exponential(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_EXPONENTIAL_ICDF)
vsRngExponential
int uniform_bits32(MKL_INT n, unsigned *r, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS32_STD)
viRngUniform32
int gaussian_mv(MKL_INT n, float *r, MKL_INT dimen, MKL_INT mstorage, const float *a, const float *t, MKL_INT method=VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
vsRngGaussianMV
int reset(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape)
vslCorrNewTask
MKLCorrTask(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape)
vslCorrNewTask
int edit_partial_cov_cor(const MKL_INT *p_idx_array, const result_type *cov, const MKL_INT *cov_storage, const result_type *cor, const MKL_INT *cor_storage, const result_type *p_cov, const MKL_INT *p_cov_storage, const result_type *p_cor, const MKL_INT *p_cor_storage) const
vslSSEditPartialCovCor
typename std::remove_pointer< ::VSLSSTaskPtr >::type element_type
int geometric(MKL_INT n, int *r, double p, MKL_INT method=VSL_RNG_METHOD_GEOMETRIC_ICDF)
viRngGeometric
int gaussian(MKL_INT n, double *r, double a, double sigma, MKL_INT method=VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
vdRngGaussian
MKLConvTask(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape)
vslConvNewTask
int gaussian(MKL_INT n, float *r, float a, float sigma, MKL_INT method=VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
vsRngGaussian
int rayleigh(MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_RAYLEIGH_ICDF)
vdRngRayleigh
int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape, const result_type *x, const MKL_INT xstride)
vslConvNewTaskX1D
static int get_brng_properties(MKL_INT brng,::VSLBRngProperties &properties)
vslGetBrngProperties
MKLConvTask(MKL_INT mode, const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
vslConvNewTask1D
int leapfrog(MKL_INT k, MKL_INT nstreams)
vslLeapfrogStream
#define VSMC_STATIC_ASSERT_UTILITY_MKL_CORR_TASK_RESULT_TYPE(ResultType)
int get_size() const
vslGetStreamSize
int neg_binomial(MKL_INT n, int *r, double a, double p, MKL_INT method=VSL_RNG_METHOD_NEGBINOMIAL_NBAR)
viRngNegbinomial
MKLStream(MKL_INT brng, MKL_UINT seed)
vslNewStream
#define VSMC_RUNTIME_ASSERT(cond, msg)
int gumbel(MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_GUMBEL_ICDF)
vdRngGumbel
int get_brng() const
vslGetStreamStateBrng
#define VSMC_STATIC_ASSERT_UTILITY_MKL_DF_TASK_RESULT_TYPE(ResultType)
int hypergeometric(MKL_INT n, int *r, int l, int s, int m, MKL_INT method=VSL_RNG_METHOD_HYPERGEOMETRIC_H2PE)
viRngHypergeometric
int edit_quantiles(const MKL_INT *quant_order_n, const result_type *quant_order, const result_type *quant, const result_type *order_stats, const MKL_INT *order_stats_storage)
vslSSEditQuantiles
int reset(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape)
vslConvNewTask
int uniform(MKL_INT n, float *r, float a, float b, MKL_INT method=VSL_RNG_METHOD_UNIFORM_STD)
vsRngUniform
int poisson_v(MKL_INT n, int *r, const double *lambda, MKL_INT method=VSL_RNG_METHOD_POISSONV_POISNORM)
viRngPoissonV
int poisson(MKL_INT n, int *r, double lambda, MKL_INT method=VSL_RNG_METHOD_POISSON_PTPE)
viRngPoisson
std::string itos(UIntType i, std::true_type)
int edit_cor_parameterization(const result_type *cor, const MKL_INT *cor_storage, const result_type *pcor, const MKL_INT *pcor_storage)
vslSSEditCorParameterization
int edit_sums(const result_type *sum, const result_type *r2s, const result_type *r3s, const result_type *r4s, const result_type *c2s, const result_type *c3s, const result_type *c4s)
vslSSEditSums
int reset(MKL_INT nx, const result_type *x, MKL_INT xhint, MKL_INT ny, const result_type *y, MKL_INT yhint)
int uniform(MKL_INT n, double *r, double a, double b, MKL_INT method=VSL_RNG_METHOD_UNIFORM_STD)
vdRngUniform
static int release(::VSLCorrTaskPtr ptr)
vslCorrDeleteTask
void mkl_error_check(int status, const char *func, const char *mklf)
int compute(unsigned MKL_INT64 estimates, MKL_INT method)
vslSSCompute
int uniform(MKL_INT n, int *r, int a, int b, MKL_INT method=VSL_RNG_METHOD_UNIFORM_STD)
viRngUniform
int reset(MKL_INT brng, MKL_INT n, unsigned *params)
vslNewStreamEx
MKLDFTask(MKL_INT nx, const result_type *x, MKL_INT xhint, MKL_INT ny, const result_type *y, MKL_INT yhint)
int edit_robust_covariance(const MKL_INT *rcov_storage, const MKL_INT *nparams, const result_type *params, const result_type *rmean, const result_type *rcov)
vslSSEditRobustCovariance
int save_m(char *memptr) const
vslSaveStreamM
#define VSMC_STATIC_ASSERT_UTILITY_MKL_SS_TASK_RESULT_TYPE(ResultType)
int beta(MKL_INT n, float *r, float p, float q, float a, float beta, MKL_INT method=VSL_RNG_METHOD_BETA_CJA)
vsRngBeta
int beta(MKL_INT n, double *r, double p, double q, double a, double beta, MKL_INT method=VSL_RNG_METHOD_BETA_CJA)
vdRngBeta
static int release(::VSLStreamStatePtr ptr)
vslDeleteStream
const deleter_type & get_deleter() const
void operator()(MKLPtr ptr)
MKLCorrTask(MKL_INT mode, const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
vslCorrNewTask1D
int reset(MKL_INT brng, MKL_UINT seed)
vslNewStream
MKLConvTask(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape, const result_type *x, const MKL_INT xstride)
vslConvNewTaskX1D
int reset(MKL_INT mode, const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
vslConvNewTask1D
int reset(MKL_INT mode, const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
vslCorrNewTask1D
int weibull(MKL_INT n, double *r, double alpha, double a, double beta, MKL_INT method=VSL_RNG_METHOD_WEIBULL_ICDF)
vdRngWeibull
void swap(const MKLBase< MKLPtr, Derived > &ptr1, const MKLBase< MKLPtr, Derived > &ptr2)
Swap two MKLBase objects.
int gaussian_mv(MKL_INT n, double *r, MKL_INT dimen, MKL_INT mstorage, const double *a, const double *t, MKL_INT method=VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
vdRngGaussianMV
int lognormal(MKL_INT n, float *r, float a, float sigma, float b, float beta, MKL_INT method=VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
vsRngLognormal
int skip_ahead(long long nskip)
vslSkipAheadStream
int load_f(const std::string &fname)
vslSaveStreamF
MKLSSTask(const MKL_INT *p, const MKL_INT *n, const MKL_INT *xstorage, const result_type *x, const result_type *w, const MKL_INT *indices)
vslSSNewTask
int weibull(MKL_INT n, float *r, float alpha, float a, float beta, MKL_INT method=VSL_RNG_METHOD_WEIBULL_ICDF)
vsRngWeibull
int load_m(const char *memptr)
vslLoadStreamM
int uniform_bits64(MKL_INT n, unsigned MKL_INT64 *r, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS64_STD)
viRngUniform64
MKLConvTask< ResultType > & operator=(const MKLConvTask< ResultType > &other)
vslConvCopyTask
int bernoulli(MKL_INT n, int *r, double p, MKL_INT method=VSL_RNG_METHOD_BERNOULLI_ICDF)
viRngBernoulli
MKLCorrTask(const MKLCorrTask< ResultType > &other)
vslCorrCopyTask
int cauchy(MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_CAUCHY_ICDF)
vdRngCauchy
void swap(MKLBase< MKLPtr, Derived > &other)
int edit_moments(const result_type *mean, const result_type *r2m, const result_type *r3m, const result_type *r4m, const result_type *c2m, const result_type *c3m, const result_type *c4m)
vslSSEditMoments
int reset(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape, const result_type *x, const MKL_INT *xstride)
vslCorrNewTaskX
MKLConvTask(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape, const result_type *x, const MKL_INT *xstride)
vslConvNewTaskX
int lognormal(MKL_INT n, double *r, double a, double sigma, double b, double beta, MKL_INT method=VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
vdRngLognormal
int rayleigh(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_RAYLEIGH_ICDF)
vsRngRayleigh
MKL resource management base class.
int edit_cov_cor(const result_type *mean, const result_type *cov, const MKL_INT *cov_storage, const result_type *cor, const MKL_INT *cor_storage)
vslSSEditCovCor
static int release(::VSLConvTaskPtr ptr)
vslConvDeleteTask
static int release(::VSLSSTaskPtr ptr)
vslSSDeleteTask
int save_f(const std::string &fname) const
vslSaveStreamF
MKLCorrTask(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape, const result_type *x, const MKL_INT *xstride)
vslCorrNewTaskX
void reset_ptr(pointer ptr)
int gamma(MKL_INT n, float *r, float alpha, float a, float beta, MKL_INT method=VSL_RNG_METHOD_GAMMA_GNORM)
vsRngGamma
int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape, const result_type *x, const MKL_INT xstride)
vslCorrNewTaskX1D
int laplace(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_LAPLACE_ICDF)
vsRngLaplace
int edit_pooled_covariance(const MKL_INT *grp_indices, const result_type *pld_mean, const result_type *pld_cov, const MKL_INT *req_grp_indices, const result_type *grp_means, const result_type *grp_cov)
vslSSEditPooledCovariance
MKLStream(const MKLStream &other)
vslCopyStream
int uniform_bits(MKL_INT n, unsigned *r, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS_STD)
viRngUniform
int binomial(MKL_INT n, int *r, int ntrial, double p, MKL_INT method=VSL_RNG_METHOD_BINOMIAL_BTPE)
viRngBinomial
MKLCorrTask(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape, const result_type *x, const MKL_INT xstride)
vslCorrNewTaskX1D
bool operator==(const MKLBase< MKLPtr, Derived > &ptr1, const MKLBase< MKLPtr, Derived > &ptr2)
Comparison of equality of two MKLBase objects.
int edit_outliers_detection(const MKL_INT *nparams, const result_type *params, const result_type *w)
vslSSEditOutliersDetection
int edit_task(MKL_INT parameter, const result_type *par_addr)
vslSSEditTask
MKLCorrTask< ResultType > & operator=(const MKLCorrTask< ResultType > &other)
vslCorrCopyTask
int exponential(MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_EXPONENTIAL_ICDF)
vdRngExponential
int reset(MKL_INT mode, MKL_INT dims, const MKL_INT *xshape, const MKL_INT *yshape, const MKL_INT *zshape, const result_type *x, const MKL_INT *xstride)
vslConvNewTaskX
deleter_type & get_deleter()
MKLStream & operator=(const MKLStream &other)
vslCopyStream/vslCopySreamState
int edit_cp(const result_type *mean, const result_type *sum, const result_type *cp, const MKL_INT *cp_storage)
vslSSEditCP
int laplace(MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_LAPLACE_ICDF)
vdRngLaplace
MKLConvTask(const MKLConvTask< ResultType > &other)
vslConvCopyTask
bool operator!=(const MKLBase< MKLPtr, Derived > &ptr1, const MKLBase< MKLPtr, Derived > &ptr2)
Comparison of inequality of two MKLBase objects.
int cauchy(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_CAUCHY_ICDF)
vsRngCauchy