32 #ifndef VSMC_UTILITY_MKL_HPP 33 #define VSMC_UTILITY_MKL_HPP 45 #if VSMC_NO_RUNTIME_ASSERT 53 std::string msg(
"**");
56 msg +=
"; MKL function: ";
58 msg +=
"; Error code: ";
69 template <
typename MKLPtr,
typename Derived>
79 void operator()(MKLPtr ptr) { status_ = Derived::release(ptr); }
81 int status()
const {
return status_; }
94 int release() {
return Derived::release(ptr_.get()); }
98 if (ptr != ptr_.get())
107 const deleter_type &
get_deleter()
const {
return ptr_.get_deleter(); }
109 explicit operator bool()
const {
return bool(ptr_); }
115 std::unique_ptr<element_type, deleter_type> ptr_;
120 template <
typename MKLPtr,
typename Derived>
124 return ptr1.
get() == ptr2.
get();
129 template <
typename MKLPtr,
typename Derived>
133 return ptr1.
get() == ptr2.
get();
138 template <
typename MKLPtr,
typename Derived>
151 MKLStream(MKL_INT brng, MKL_UINT seed) { reset(brng, seed); }
156 reset(brng, n, params);
163 ::VSLStreamStatePtr ptr =
nullptr;
165 "MKLStream::MKLStream",
"::vslCopyStream");
166 this->reset_ptr(ptr);
172 if (
this != &other) {
173 if (this->
get() ==
nullptr) {
174 ::VSLStreamStatePtr ptr =
nullptr;
176 "MKLStream::operator=",
"::vslCopyStream");
177 this->reset_ptr(ptr);
180 ::vslCopyStreamState(this->
get(), other.
get()),
181 "MKLStream::operator=",
"::vslCopyStreamState");
192 int reset(MKL_INT brng, MKL_UINT seed)
194 ::VSLStreamStatePtr ptr =
nullptr;
195 int status = ::vslNewStream(&ptr, brng, seed);
197 status,
"MKLStream::reset",
"::vslNewStream");
198 this->reset_ptr(ptr);
204 int reset(MKL_INT brng, MKL_INT n,
unsigned *params)
206 ::VSLStreamStatePtr ptr =
nullptr;
207 int status = ::vslNewStreamEx(&ptr, brng, n, params);
209 status,
"MKLStream::reset",
"::vslNewStreamEx");
210 this->reset_ptr(ptr);
221 int status = ::vslDeleteStream(&ptr);
223 status,
"MKLStream::release",
"::vslDeleteStream");
229 int save_f(
const std::string &fname)
const 231 int status = ::vslSaveStreamF(this->
get(), fname.c_str());
233 status,
"MKLStream::save_f",
"::vslSaveStreamF");
241 ::VSLStreamStatePtr ptr =
nullptr;
242 int status = ::vslSaveStreamF(&ptr, fname.c_str());
244 status,
"MKLStream::load_f",
"::vslSaveStreamF");
245 this->reset_ptr(ptr);
253 int status = ::vslSaveStreamM(this->
get(), memptr);
255 status,
"MKLStream::save_m",
"::vslSaveStreamM");
263 ::VSLStreamStatePtr ptr =
nullptr;
264 int status = ::vslLoadStreamM(&ptr, memptr);
266 status,
"MKLStream::load_m",
"::vslLoadStreamM");
267 this->reset_ptr(ptr);
273 int get_size()
const { return ::vslGetStreamSize(this->
get()); }
278 int status = ::vslLeapfrogStream(this->
get(), k, nstreams);
280 status,
"MKLStream::leapfrog",
"::vslLeapfrogStream");
288 int status = ::vslSkipAheadStream(this->
get(), nskip);
290 status,
"MKLStream::skip_ahead",
"::vslSkipAheadStream");
296 int get_brng()
const { return ::vslGetStreamStateBrng(this->
get()); }
303 MKL_INT brng, ::VSLBRngProperties &properties)
305 int status = ::vslGetBrngProperties(brng, &properties);
307 "::vslGetBrngProperties");
313 int uniform(MKL_INT n,
float *r,
float a,
float b,
314 MKL_INT method = VSL_RNG_METHOD_UNIFORM_STD)
316 int status = ::vsRngUniform(method, this->
get(), n, r, a, b);
318 status,
"MKLStream::uniform",
"::vsRngUniform");
324 int uniform(MKL_INT n,
double *r,
double a,
double b,
325 MKL_INT method = VSL_RNG_METHOD_UNIFORM_STD)
327 int status = ::vdRngUniform(method, this->
get(), n, r, a, b);
329 status,
"MKLStream::uniform",
"::vdRngUniform");
335 int gaussian(MKL_INT n,
float *r,
float a,
float sigma,
336 MKL_INT method = VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
338 int status = ::vsRngGaussian(method, this->
get(), n, r, a, sigma);
340 status,
"MKLStream::gaussian",
"::vsRngGaussian");
346 int gaussian(MKL_INT n,
double *r,
double a,
double sigma,
347 MKL_INT method = VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
349 int status = ::vdRngGaussian(method, this->
get(), n, r, a, sigma);
351 status,
"MKLStream::gaussian",
"::vdRngGaussian");
357 int gaussian_mv(MKL_INT n,
float *r, MKL_INT dimen, MKL_INT mstorage,
358 const float *a,
const float *t,
359 MKL_INT method = VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
361 int status = ::vsRngGaussianMV(
362 method, this->
get(), n, r, dimen, mstorage, a, t);
364 status,
"MKLStream::gaussian_mv",
"::vsRngGaussianMV");
370 int gaussian_mv(MKL_INT n,
double *r, MKL_INT dimen, MKL_INT mstorage,
371 const double *a,
const double *t,
372 MKL_INT method = VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
374 int status = ::vdRngGaussianMV(
375 method, this->
get(), n, r, dimen, mstorage, a, t);
377 status,
"MKLStream::gaussian_mv",
"::vdRngGaussianMV");
384 MKL_INT method = VSL_RNG_METHOD_EXPONENTIAL_ICDF)
386 int status = ::vsRngExponential(method, this->
get(), n, r, a, beta);
388 status,
"MKLStream::exponential",
"::vsRngExponential");
395 MKL_INT method = VSL_RNG_METHOD_EXPONENTIAL_ICDF)
397 int status = ::vdRngExponential(method, this->
get(), n, r, a, beta);
399 status,
"MKLStream::exponential",
"::vdRngExponential");
405 int laplace(MKL_INT n,
float *r,
float a,
float beta,
406 MKL_INT method = VSL_RNG_METHOD_LAPLACE_ICDF)
408 int status = ::vsRngLaplace(method, this->
get(), n, r, a, beta);
410 status,
"MKLStream::laplace",
"::vsRngLaplace");
416 int laplace(MKL_INT n,
double *r,
double a,
double beta,
417 MKL_INT method = VSL_RNG_METHOD_LAPLACE_ICDF)
419 int status = ::vdRngLaplace(method, this->
get(), n, r, a, beta);
421 status,
"MKLStream::laplace",
"::vdRngLaplace");
427 int weibull(MKL_INT n,
float *r,
float alpha,
float a,
float beta,
428 MKL_INT method = VSL_RNG_METHOD_WEIBULL_ICDF)
430 int status = ::vsRngWeibull(method, this->
get(), n, r, alpha, a, beta);
432 status,
"MKLStream::weibull",
"::vsRngWeibull");
438 int weibull(MKL_INT n,
double *r,
double alpha,
double a,
double beta,
439 MKL_INT method = VSL_RNG_METHOD_WEIBULL_ICDF)
441 int status = ::vdRngWeibull(method, this->
get(), n, r, alpha, a, beta);
443 status,
"MKLStream::weibull",
"::vdRngWeibull");
449 int cauchy(MKL_INT n,
float *r,
float a,
float beta,
450 MKL_INT method = VSL_RNG_METHOD_CAUCHY_ICDF)
452 int status = ::vsRngCauchy(method, this->
get(), n, r, a, beta);
454 status,
"MKLStream::cauchy",
"::vsRngCauchy");
460 int cauchy(MKL_INT n,
double *r,
double a,
double beta,
461 MKL_INT method = VSL_RNG_METHOD_CAUCHY_ICDF)
463 int status = ::vdRngCauchy(method, this->
get(), n, r, a, beta);
465 status,
"MKLStream::cauchy",
"::vdRngCauchy");
471 int rayleigh(MKL_INT n,
float *r,
float a,
float beta,
472 MKL_INT method = VSL_RNG_METHOD_RAYLEIGH_ICDF)
474 int status = ::vsRngRayleigh(method, this->
get(), n, r, a, beta);
476 status,
"MKLStream::rayleigh",
"::vsRngRayleigh");
482 int rayleigh(MKL_INT n,
double *r,
double a,
double beta,
483 MKL_INT method = VSL_RNG_METHOD_RAYLEIGH_ICDF)
485 int status = ::vdRngRayleigh(method, this->
get(), n, r, a, beta);
487 status,
"MKLStream::rayleigh",
"::vdRngRayleigh");
493 int lognormal(MKL_INT n,
float *r,
float a,
float sigma,
float b,
494 float beta, MKL_INT method = VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
497 ::vsRngLognormal(method, this->
get(), n, r, a, sigma, b, beta);
499 status,
"MKLStream::lognormal",
"::vsRngLognormal");
505 int lognormal(MKL_INT n,
double *r,
double a,
double sigma,
double b,
506 double beta, MKL_INT method = VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
509 ::vdRngLognormal(method, this->
get(), n, r, a, sigma, b, beta);
511 status,
"MKLStream::lognormal",
"::vdRngLognormal");
517 int gumbel(MKL_INT n,
float *r,
float a,
float beta,
518 MKL_INT method = VSL_RNG_METHOD_GUMBEL_ICDF)
520 int status = ::vsRngGumbel(method, this->
get(), n, r, a, beta);
522 status,
"MKLStream::gumbel",
"::vsRngGumbel");
528 int gumbel(MKL_INT n,
double *r,
double a,
double beta,
529 MKL_INT method = VSL_RNG_METHOD_GUMBEL_ICDF)
531 int status = ::vdRngGumbel(method, this->
get(), n, r, a, beta);
533 status,
"MKLStream::gumbel",
"::vdRngGumbel");
539 int gamma(MKL_INT n,
float *r,
float alpha,
float a,
float beta,
540 MKL_INT method = VSL_RNG_METHOD_GAMMA_GNORM)
542 int status = ::vsRngGamma(method, this->
get(), n, r, alpha, a, beta);
549 int gamma(MKL_INT n,
double *r,
double alpha,
double a,
double beta,
550 MKL_INT method = VSL_RNG_METHOD_GAMMA_GNORM)
552 int status = ::vdRngGamma(method, this->
get(), n, r, alpha, a, beta);
559 int beta(MKL_INT n,
float *r,
float p,
float q,
float a,
float beta,
560 MKL_INT method = VSL_RNG_METHOD_BETA_CJA)
562 int status = ::vsRngBeta(method, this->
get(), n, r, p, q, a, beta);
569 int beta(MKL_INT n,
double *r,
double p,
double q,
double a,
double beta,
570 MKL_INT method = VSL_RNG_METHOD_BETA_CJA)
572 int status = ::vdRngBeta(method, this->
get(), n, r, p, q, a, beta);
580 MKL_INT method = VSL_RNG_METHOD_UNIFORM_STD)
582 int status = ::viRngUniform(method, this->
get(), n, r, a, b);
584 status,
"MKLStream::uniform",
"::viRngUniform");
591 MKL_INT method = VSL_RNG_METHOD_UNIFORMBITS_STD)
593 int status = ::viRngUniformBits(method, this->
get(), n, r);
595 status,
"MKLStream::uniform_bits",
"::viRngUniformBits");
602 MKL_INT method = VSL_RNG_METHOD_UNIFORMBITS32_STD)
604 int status = ::viRngUniformBits32(method, this->
get(), n, r);
606 status,
"MKLStream::uniform_bits32",
"::viRngUniformBits32");
613 MKL_INT method = VSL_RNG_METHOD_UNIFORMBITS64_STD)
615 int status = ::viRngUniformBits64(method, this->
get(), n, r);
617 status,
"MKLStream::uniform_bits64",
"::viRngUniformBits64");
624 MKL_INT method = VSL_RNG_METHOD_BERNOULLI_ICDF)
626 int status = ::viRngBernoulli(method, this->
get(), n, r, p);
628 status,
"MKLStream::bernoulli",
"::viRngBernoulli");
635 MKL_INT method = VSL_RNG_METHOD_GEOMETRIC_ICDF)
637 int status = ::viRngGeometric(method, this->
get(), n, r, p);
639 status,
"MKLStream::geometric",
"::viRngGeometric");
645 int binomial(MKL_INT n,
int *r,
int ntrial,
double p,
646 MKL_INT method = VSL_RNG_METHOD_BINOMIAL_BTPE)
648 int status = ::viRngBinomial(method, this->
get(), n, r, ntrial, p);
650 status,
"MKLStream::binomial",
"::viRngBinomial");
657 MKL_INT method = VSL_RNG_METHOD_HYPERGEOMETRIC_H2PE)
659 int status = ::viRngHypergeometric(method, this->
get(), n, r, l, s, m);
661 status,
"MKLStream::hypergeometric",
"::viRngHypergeometric");
668 MKL_INT method = VSL_RNG_METHOD_POISSON_PTPE)
670 int status = ::viRngPoisson(method, this->
get(), n, r, lambda);
672 status,
"MKLStream::poisson",
"::viRngPoisson");
679 MKL_INT method = VSL_RNG_METHOD_POISSONV_POISNORM)
681 int status = ::viRngPoissonV(method, this->
get(), n, r, lambda);
683 status,
"MKLStream::poisson_v",
"::viRngPoissonV");
690 MKL_INT method = VSL_RNG_METHOD_NEGBINOMIAL_NBAR)
692 int status = ::viRngNegbinomial(method, this->
get(), n, r, a, p);
694 status,
"MKLStream::neg_binomial",
"::viRngNegbinomial");
702 template <
typename RealType =
double>
706 "**MKLSSTask** USED WITH RealType OTHER THAN float or double");
712 MKLSSTask(
const MKL_INT *p,
const MKL_INT *n,
const MKL_INT *xstorage,
715 reset(p, n, xstorage, x, w, indices);
719 int reset(
const MKL_INT *p,
const MKL_INT *n,
const MKL_INT *xstorage,
722 return reset_dispatch(p, n, xstorage, x, w, indices);
731 int status = ::vslSSDeleteTask(&ptr);
733 status,
"MKLSSTask::release",
"::vslSSDeleteTask");
741 return edit_task_dispatch(parameter, par_addr);
745 int edit_task(MKL_INT parameter,
const MKL_INT *par_addr)
747 return edit_task_dispatch(parameter, par_addr);
755 return edit_moments_dispatch(mean, r2m, r3m, r4m, c2m, c3m, c4m);
763 return edit_moments_dispatch(sum, r2s, r3s, r4s, c2s, c3s, c4s);
768 const MKL_INT *cov_storage,
const result_type *cor,
769 const MKL_INT *cor_storage)
771 return edit_cov_cor_dispatch(mean, cov, cov_storage, cor, cor_storage);
778 return edit_cp_dispatch(mean, sum, cp, cp_storage);
783 const result_type *cov,
const MKL_INT *cov_storage,
784 const result_type *cor,
const MKL_INT *cor_storage,
785 const result_type *p_cov,
const MKL_INT *p_cov_storage,
786 const result_type *p_cor,
const MKL_INT *p_cor_storage)
const 788 return edit_partial_cov_cor_dispatch(p_idx_array, cov, cov_storage,
789 cor, cor_storage, p_cov, p_cov_storage, p_cor, p_cor_storage);
795 const result_type *order_stats,
const MKL_INT *order_stats_storage)
797 return edit_quantiles_dispatch(quant_order_n, quant_order, quant,
798 order_stats, order_stats_storage);
806 return edit_stream_quantiles_dispatch(
807 quant_order_n, quant_order, quants, nparams, params);
813 const MKL_INT *req_grp_indices,
const result_type *grp_means,
816 return edit_pooled_covariance_dispatch(grp_indices, pld_mean, pld_cov,
817 req_grp_indices, grp_means, grp_cov);
825 return edit_robust_covariance_dispatch(
826 rcov_storage, nparams, params, rmean, rcov);
833 return edit_outliers_detection_dispatch(nparams, params, w);
838 const MKL_INT *init_estimates_n,
const result_type *init_estimates,
840 const MKL_INT *simul_missing_vals_n,
841 const result_type *simul_missing_vals,
const MKL_INT *estimates_n,
844 return edit_missing_values_dispatch(nparams, params, init_estimates_n,
845 init_estimates, prior_n, prior, simul_missing_vals_n,
846 simul_missing_vals, estimates_n, estimates);
851 const MKL_INT *cor_storage,
const result_type *pcor,
852 const MKL_INT *pcor_storage)
854 return edit_cor_parameterization_dispatch(
855 cor, cor_storage, pcor, pcor_storage);
859 int compute(
unsigned MKL_INT64 estimates, MKL_INT method)
861 return compute_dispatch(
862 estimates, method, static_cast<result_type *>(
nullptr));
866 int reset_dispatch(
const MKL_INT *p,
const MKL_INT *n,
867 const MKL_INT *xstorage,
const float *x,
const float *w,
868 const MKL_INT *indices)
871 int status = ::vslsSSNewTask(&ptr, p, n, xstorage, x, w, indices);
873 status,
"MKLSSTask::reset",
"::vslsSSNewTask");
874 this->reset_ptr(ptr);
879 int reset_dispatch(
const MKL_INT *p,
const MKL_INT *n,
880 const MKL_INT *xstorage,
const double *x,
const double *w,
881 const MKL_INT *indices)
884 int status = ::vsldSSNewTask(&ptr, p, n, xstorage, x, w, indices);
886 status,
"MKLSSTask::reset",
"::vsldSSNewTask");
887 this->reset_ptr(ptr);
892 int edit_task_dispatch(MKL_INT parameter,
const float *par_addr)
894 int status = ::vslsSSEditTask(this->
get(), parameter, par_addr);
896 status,
"MKLSSTask::edit_task",
"::vslsSSEditTask");
901 int edit_task_dispatch(MKL_INT parameter,
const double *par_addr)
903 int status = ::vsldSSEditTask(this->
get(), parameter, par_addr);
905 status,
"MKLSSTask::edit_task",
"::vsldSSEditTask");
910 int edit_task_dispatch(MKL_INT parameter,
const MKL_INT *par_addr)
912 int status = ::vsliSSEditTask(this->
get(), parameter, par_addr);
914 status,
"MKLSSTask::edit_task",
"::vsliSSEditTask");
919 int edit_moments_dispatch(
const float *mean,
const float *r2m,
920 const float *r3m,
const float *r4m,
const float *c2m,
const float *c3m,
923 int status = ::vslsSSEditMoments(
924 this->
get(), mean, r2m, r3m, r4m, c2m, c3m, c4m);
926 status,
"MKLSSTask::edit_moments",
"::vslsSSEditMoments");
931 int edit_moments_dispatch(
const double *mean,
const double *r2m,
932 const double *r3m,
const double *r4m,
const double *c2m,
933 const double *c3m,
const double *c4m)
935 int status = ::vsldSSEditMoments(
936 this->
get(), mean, r2m, r3m, r4m, c2m, c3m, c4m);
938 status,
"MKLSSTask::edit_moments",
"::vsldSSEditMoments");
943 int edit_sums_dispatch(
const float *sum,
const float *r2s,
944 const float *r3s,
const float *r4s,
const float *c2s,
const float *c3s,
948 ::vslsSSEditSums(this->
get(), sum, r2s, r3s, r4s, c2s, c3s, c4s);
950 status,
"MKLSSTask::edit_sums",
"::vslsSSEditSums");
955 int edit_sums_dispatch(
const double *sum,
const double *r2s,
956 const double *r3s,
const double *r4s,
const double *c2s,
957 const double *c3s,
const double *c4s)
960 ::vsldSSEditSums(this->
get(), sum, r2s, r3s, r4s, c2s, c3s, c4s);
962 status,
"MKLSSTask::edit_sums",
"::vsldSSEditSums");
967 int edit_cov_cor_dispatch(
const float *mean,
const float *cov,
968 const MKL_INT *cov_storage,
const float *cor,
969 const MKL_INT *cor_storage)
971 int status = ::vslsSSEditCovCor(
972 this->
get(), mean, cov, cov_storage, cor, cor_storage);
974 status,
"MKLSSTask::edit_cov_cor",
"::vslsSSEditCovCor");
979 int edit_cov_cor_dispatch(
const double *mean,
const double *cov,
980 const MKL_INT *cov_storage,
const double *cor,
981 const MKL_INT *cor_storage)
983 int status = ::vsldSSEditCovCor(
984 this->
get(), mean, cov, cov_storage, cor, cor_storage);
986 status,
"MKLSSTask::edit_cov_cor",
"::vsldSSEditCovCor");
991 int edit_cp_dispatch(
const float *mean,
const float *sum,
const float *cp,
992 const MKL_INT *cp_storage)
994 int status = ::vslsSSEditCP(this->
get(), mean, sum, cp, cp_storage);
996 status,
"MKLSSTask::edit_cp",
"::vslsSSEditCP");
1001 int edit_cp_dispatch(
const double *mean,
const double *sum,
1002 const double *cp,
const MKL_INT *cp_storage)
1004 int status = ::vsldSSEditCP(this->
get(), mean, sum, cp, cp_storage);
1006 status,
"MKLSSTask::edit_cp",
"::vsldSSEditCP");
1011 int edit_partial_cov_cor_dispatch(
const MKL_INT *p_idx_array,
1012 const float *cov,
const MKL_INT *cov_storage,
const float *cor,
1013 const MKL_INT *cor_storage,
const float *p_cov,
1014 const MKL_INT *p_cov_storage,
const float *p_cor,
1015 const MKL_INT *p_cor_storage)
const 1017 int status = ::vslsSSEditPartialCovCor(this->
get(), p_idx_array, cov,
1018 cov_storage, cor, cor_storage, p_cov, p_cov_storage, p_cor,
1021 "::vslsSSEditPartialCovCor");
1026 int edit_partial_cov_cor_dispatch(
const MKL_INT *p_idx_array,
1027 const double *cov,
const MKL_INT *cov_storage,
const double *cor,
1028 const MKL_INT *cor_storage,
const double *p_cov,
1029 const MKL_INT *p_cov_storage,
const double *p_cor,
1030 const MKL_INT *p_cor_storage)
const 1032 int status = ::vsldSSEditPartialCovCor(this->
get(), p_idx_array, cov,
1033 cov_storage, cor, cor_storage, p_cov, p_cov_storage, p_cor,
1036 "::vsldSSEditPartialCovCor");
1041 int edit_quantiles_dispatch(
const MKL_INT *quant_order_n,
1042 const float *quant_order,
const float *quant,
const float *order_stats,
1043 const MKL_INT *order_stats_storage)
1045 int status = ::vslsSSEditQuantiles(this->
get(), quant_order_n,
1046 quant_order, quant, order_stats, order_stats_storage);
1048 status,
"MKLSSTask::edit_quantiles",
"::vslsSSEditQuantiles");
1053 int edit_quantiles_dispatch(
const MKL_INT *quant_order_n,
1054 const double *quant_order,
const double *quant,
1055 const double *order_stats,
const MKL_INT *order_stats_storage)
1057 int status = ::vsldSSEditQuantiles(this->
get(), quant_order_n,
1058 quant_order, quant, order_stats, order_stats_storage);
1060 status,
"MKLSSTask::edit_quantiles",
"::vsldSSEditQuantiles");
1065 int edit_stream_quantiles_dispatch(
const MKL_INT *quant_order_n,
1066 const float *quant_order,
const float *quants,
const MKL_INT *nparams,
1067 const float *params)
1069 int status = ::vslsSSEditStreamQuantiles(
1070 this->
get(), quant_order_n, quant_order, quants, nparams, params);
1072 "::vslsSSEditStreamQuantiles");
1077 int edit_stream_quantiles_dispatch(
const MKL_INT *quant_order_n,
1078 const double *quant_order,
const double *quants,
1079 const MKL_INT *nparams,
const double *params)
1081 int status = ::vsldSSEditStreamQuantiles(
1082 this->
get(), quant_order_n, quant_order, quants, nparams, params);
1084 "::vsldSSEditStreamQuantiles");
1089 int edit_pooled_covariance_dispatch(
const MKL_INT *grp_indices,
1090 const float *pld_mean,
const float *pld_cov,
1091 const MKL_INT *req_grp_indices,
const float *grp_means,
1092 const float *grp_cov)
1094 int status = ::vslsSSEditPooledCovariance(this->
get(), grp_indices,
1095 pld_mean, pld_cov, req_grp_indices, grp_means, grp_cov);
1097 "::vslsSSEditPooledCovariance");
1102 int edit_pooled_covariance_dispatch(
const MKL_INT *grp_indices,
1103 const double *pld_mean,
const double *pld_cov,
1104 const MKL_INT *req_grp_indices,
const double *grp_means,
1105 const double *grp_cov)
1107 int status = ::vsldSSEditPooledCovariance(this->
get(), grp_indices,
1108 pld_mean, pld_cov, req_grp_indices, grp_means, grp_cov);
1110 "::vsldSSEditPooledCovariance");
1115 int edit_robust_covariance_dispatch(
const MKL_INT *rcov_storage,
1116 const MKL_INT *nparams,
const float *params,
const float *rmean,
1119 int status = ::vslsSSEditRobustCovariance(
1120 this->
get(), rcov_storage, nparams, params, rmean, rcov);
1122 "::vslsSSEditRobustCovariance");
1127 int edit_robust_covariance_dispatch(
const MKL_INT *rcov_storage,
1128 const MKL_INT *nparams,
const double *params,
const double *rmean,
1131 int status = ::vsldSSEditRobustCovariance(
1132 this->
get(), rcov_storage, nparams, params, rmean, rcov);
1134 "::vsldSSEditRobustCovariance");
1139 int edit_outliers_detection_dispatch(
1140 const MKL_INT *nparams,
const float *params,
const float *w)
1143 ::vslsSSEditOutliersDetection(this->
get(), nparams, params, w);
1145 "::vslsSSEditOutliersDetection");
1150 int edit_outliers_detection_dispatch(
1151 const MKL_INT *nparams,
const double *params,
const double *w)
1154 ::vsldSSEditOutliersDetection(this->
get(), nparams, params, w);
1156 "::vsldSSEditOutliersDetection");
1161 int edit_missing_values_dispatch(
const MKL_INT *nparams,
1162 const float *params,
const MKL_INT *init_estimates_n,
1163 const float *init_estimates,
const MKL_INT *prior_n,
1164 const float *prior,
const MKL_INT *simul_missing_vals_n,
1165 const float *simul_missing_vals,
const MKL_INT *estimates_n,
1166 const float *estimates)
1168 int status = ::vslsSSEditMissingValues(this->
get(), nparams, params,
1169 init_estimates_n, init_estimates, prior_n, prior,
1170 simul_missing_vals_n, simul_missing_vals, estimates_n, estimates);
1172 "::vslsSSEditMissingValues");
1177 int edit_missing_values_dispatch(
const MKL_INT *nparams,
1178 const double *params,
const MKL_INT *init_estimates_n,
1179 const double *init_estimates,
const MKL_INT *prior_n,
1180 const double *prior,
const MKL_INT *simul_missing_vals_n,
1181 const double *simul_missing_vals,
const MKL_INT *estimates_n,
1182 const double *estimates)
1184 int status = ::vsldSSEditMissingValues(this->
get(), nparams, params,
1185 init_estimates_n, init_estimates, prior_n, prior,
1186 simul_missing_vals_n, simul_missing_vals, estimates_n, estimates);
1188 "::vsldSSEditMissingValues");
1193 int edit_cor_parameterization_dispatch(
const float *cor,
1194 const MKL_INT *cor_storage,
const float *pcor,
1195 const MKL_INT *pcor_storage)
1197 int status = ::vslsSSEditCorParameterization(
1198 this->
get(), cor, cor_storage, pcor, pcor_storage);
1200 "MKLSSTask::edit_cor_parameterization",
1201 "::vslsSSEditCorParameterization");
1206 int edit_cor_parameterization_dispatch(
const double *cor,
1207 const MKL_INT *cor_storage,
const double *pcor,
1208 const MKL_INT *pcor_storage)
1210 int status = ::vsldSSEditCorParameterization(
1211 this->
get(), cor, cor_storage, pcor, pcor_storage);
1213 "MKLSSTask::edit_cor_parameterization",
1214 "::vsldSSEditCorParameterization");
1219 int compute_dispatch(
1220 unsigned MKL_INT64 estimates, MKL_INT method,
const float *)
1222 int status = ::vslsSSCompute(this->
get(), estimates, method);
1224 status,
"MKLSSTask::compute",
"::vslsSSCompute");
1229 int compute_dispatch(
1230 unsigned MKL_INT64 estimates, MKL_INT method,
const double *)
1232 int status = ::vsldSSCompute(this->
get(), estimates, method);
1234 status,
"MKLSSTask::compute",
"::vsldSSCompute");
1242 template <
typename ResultType =
double>
1246 MKL_Complex16>::value,
1247 "**MKLConvTask** USED WITH ResultType OTHER THAN float, double, " 1248 "MKL_Complex8 OR MKL_Complex16");
1255 const MKL_INT *yshape,
const MKL_INT *zshape)
1257 reset(mode, dims, xshape, yshape, zshape);
1262 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1264 reset(mode, xshape, yshape, zshape);
1269 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1270 const MKL_INT *xstride)
1272 reset(mode, dims, xshape, yshape, zshape, x, xstride);
1276 MKLConvTask(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1279 reset(mode, xshape, yshape, zshape, x, xstride);
1285 ::VSLConvTaskPtr ptr =
nullptr;
1287 "MKLConvTask::MKLConvTask",
"::vslConvCopyTask");
1288 this->reset_ptr(ptr);
1294 if (
this != &other) {
1295 ::VSLConvTaskPtr ptr =
nullptr;
1297 "MKLConvTask::operator=",
"::vslConvCopyTask");
1298 this->reset_ptr(ptr);
1313 int status = ::vslConvDeleteTask(&ptr);
1315 status,
"MKLConvTask::release",
"::vslConvDeleteTask");
1321 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1322 const MKL_INT *yshape,
const MKL_INT *zshape)
1324 return reset_dispatch(mode, dims, xshape, yshape, zshape);
1329 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1331 return reset_dispatch(mode, xshape, yshape, zshape);
1335 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1336 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1337 const MKL_INT *xstride)
1339 return reset_dispatch(mode, dims, xshape, yshape, zshape, x, xstride);
1343 int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1346 return reset_dispatch(mode, xshape, yshape, zshape, x, xstride);
1350 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1351 const MKL_INT *yshape,
const MKL_INT *zshape,
float *)
1353 ::VSLConvTaskPtr ptr;
1355 ::vslsConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1357 status,
"MKLConvTask::reset",
"::vslsConvNewTask");
1358 this->reset_ptr(ptr);
1363 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1364 const MKL_INT *yshape,
const MKL_INT *zshape,
double *)
1366 ::VSLConvTaskPtr ptr;
1368 ::vsldConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1370 status,
"MKLConvTask::reset",
"::vsldConvNewTask");
1371 this->reset_ptr(ptr);
1376 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1377 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex8 *)
1379 ::VSLConvTaskPtr ptr;
1381 ::vslcConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1383 status,
"MKLConvTask::reset",
"::vslcConvNewTask");
1384 this->reset_ptr(ptr);
1389 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1390 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex16 *)
1392 ::VSLConvTaskPtr ptr;
1394 ::vslzConvNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1396 status,
"MKLConvTask::reset",
"::vslzConvNewTask");
1397 this->reset_ptr(ptr);
1402 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1403 const MKL_INT yshape,
const MKL_INT zshape,
float *)
1405 ::VSLConvTaskPtr ptr;
1406 int status = ::vslsConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1408 status,
"MKLConvTask::reset",
"::vslsConvNewTask1D");
1409 this->reset_ptr(ptr);
1414 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1415 const MKL_INT yshape,
const MKL_INT zshape,
double *)
1417 ::VSLConvTaskPtr ptr;
1418 int status = ::vsldConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1420 status,
"MKLConvTask::reset",
"::vsldConvNewTask1D");
1421 this->reset_ptr(ptr);
1426 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1427 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex8 *)
1429 ::VSLConvTaskPtr ptr;
1430 int status = ::vslcConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1432 status,
"MKLConvTask::reset",
"::vslcConvNewTask1D");
1433 this->reset_ptr(ptr);
1438 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1439 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex16 *)
1441 ::VSLConvTaskPtr ptr;
1442 int status = ::vslzConvNewTask1D(&ptr, mode, xshape, yshape, zshape);
1444 status,
"MKLConvTask::reset",
"::vslzConvNewTask1D");
1445 this->reset_ptr(ptr);
1450 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1451 const MKL_INT *yshape,
const MKL_INT *zshape,
const float *x,
1452 const MKL_INT *xstride)
1454 ::VSLConvTaskPtr ptr;
1455 int status = ::vslsConvNewTaskX(
1456 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1458 status,
"MKLConvTask::reset",
"::vslsConvNewTaskX");
1459 this->reset_ptr(ptr);
1464 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1465 const MKL_INT *yshape,
const MKL_INT *zshape,
const double *x,
1466 const MKL_INT *xstride)
1468 ::VSLConvTaskPtr ptr;
1469 int status = ::vsldConvNewTaskX(
1470 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1472 status,
"MKLConvTask::reset",
"::vsldConvNewTaskX");
1473 this->reset_ptr(ptr);
1478 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1479 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex8 *x,
1480 const MKL_INT *xstride)
1482 ::VSLConvTaskPtr ptr;
1483 int status = ::vslcConvNewTaskX(
1484 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1486 status,
"MKLConvTask::reset",
"::vslcConvNewTaskX");
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 MKL_Complex16 *x,
1494 const MKL_INT *xstride)
1496 ::VSLConvTaskPtr ptr;
1497 int status = ::vslzConvNewTaskX(
1498 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1500 status,
"MKLConvTask::reset",
"::vslzConvNewTaskX");
1501 this->reset_ptr(ptr);
1506 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1507 const MKL_INT yshape,
const MKL_INT zshape,
const float *x,
1508 const MKL_INT xstride)
1510 ::VSLConvTaskPtr ptr;
1511 int status = ::vslsConvNewTaskX1D(
1512 &ptr, mode, xshape, yshape, zshape, x, xstride);
1514 status,
"MKLConvTask::reset",
"::vslsConvNewTaskX1D");
1515 this->reset_ptr(ptr);
1520 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1521 const MKL_INT yshape,
const MKL_INT zshape,
const double *x,
1522 const MKL_INT xstride)
1524 ::VSLConvTaskPtr ptr;
1525 int status = ::vsldConvNewTaskX1D(
1526 &ptr, mode, xshape, yshape, zshape, x, xstride);
1528 status,
"MKLConvTask::reset",
"::vsldConvNewTaskX1D");
1529 this->reset_ptr(ptr);
1534 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1535 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex8 *x,
1536 const MKL_INT xstride)
1538 ::VSLConvTaskPtr ptr;
1539 int status = ::vslcConvNewTaskX1D(
1540 &ptr, mode, xshape, yshape, zshape, x, xstride);
1542 status,
"MKLConvTask::reset",
"::vslcConvNewTaskX1D");
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 MKL_Complex16 *x,
1550 const MKL_INT xstride)
1552 ::VSLConvTaskPtr ptr;
1553 int status = ::vslzConvNewTaskX1D(
1554 &ptr, mode, xshape, yshape, zshape, x, xstride);
1556 status,
"MKLConvTask::reset",
"::vslzConvNewTaskX1D");
1557 this->reset_ptr(ptr);
1565 template <
typename ResultType =
double>
1569 MKL_Complex16>::value,
1570 "**MKLCorrTask** USED WITH ResultType OTHER THAN float, double, " 1571 "MKL_Complex8 OR MKL_Complex16");
1578 const MKL_INT *yshape,
const MKL_INT *zshape)
1580 reset(mode, dims, xshape, yshape, zshape);
1585 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1587 reset(mode, xshape, yshape, zshape);
1592 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1593 const MKL_INT *xstride)
1595 reset(mode, dims, xshape, yshape, zshape, x, xstride);
1599 MKLCorrTask(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1602 reset(mode, xshape, yshape, zshape, x, xstride);
1608 ::VSLCorrTaskPtr ptr =
nullptr;
1610 "MKLCorrTask::MKLCorrTask",
"::vslCorrCopyTask");
1611 this->reset_ptr(ptr);
1617 if (
this != &other) {
1618 ::VSLCorrTaskPtr ptr =
nullptr;
1620 "MKLCorrTask::operator=",
"::vslCorrCopyTask");
1621 this->reset_ptr(ptr);
1636 int status = ::vslCorrDeleteTask(&ptr);
1638 status,
"MKLCorrTask::release",
"::vslCorrDeleteTask");
1644 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1645 const MKL_INT *yshape,
const MKL_INT *zshape)
1647 return reset_dispatch(mode, dims, xshape, yshape, zshape);
1652 MKL_INT mode,
const MKL_INT xshape, MKL_INT yshape, MKL_INT zshape)
1654 return reset_dispatch(mode, xshape, yshape, zshape);
1658 int reset(MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1659 const MKL_INT *yshape,
const MKL_INT *zshape,
const result_type *x,
1660 const MKL_INT *xstride)
1662 return reset_dispatch(mode, dims, xshape, yshape, zshape, x, xstride);
1666 int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape,
1669 return reset_dispatch(mode, xshape, yshape, zshape, x, xstride);
1673 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1674 const MKL_INT *yshape,
const MKL_INT *zshape,
float *)
1676 ::VSLCorrTaskPtr ptr;
1678 ::vslsCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1680 status,
"MKLCorrTask::reset",
"::vslsCorrNewTask");
1681 this->reset_ptr(ptr);
1686 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1687 const MKL_INT *yshape,
const MKL_INT *zshape,
double *)
1689 ::VSLCorrTaskPtr ptr;
1691 ::vsldCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1693 status,
"MKLCorrTask::reset",
"::vsldCorrNewTask");
1694 this->reset_ptr(ptr);
1699 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1700 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex8 *)
1702 ::VSLCorrTaskPtr ptr;
1704 ::vslcCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1706 status,
"MKLCorrTask::reset",
"::vslcCorrNewTask");
1707 this->reset_ptr(ptr);
1712 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1713 const MKL_INT *yshape,
const MKL_INT *zshape, MKL_Complex16 *)
1715 ::VSLCorrTaskPtr ptr;
1717 ::vslzCorrNewTask(&ptr, mode, dims, xshape, yshape, zshape);
1719 status,
"MKLCorrTask::reset",
"::vslzCorrNewTask");
1720 this->reset_ptr(ptr);
1725 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1726 const MKL_INT yshape,
const MKL_INT zshape,
float *)
1728 ::VSLCorrTaskPtr ptr;
1729 int status = ::vslsCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1731 status,
"MKLCorrTask::reset",
"::vslsCorrNewTask1D");
1732 this->reset_ptr(ptr);
1737 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1738 const MKL_INT yshape,
const MKL_INT zshape,
double *)
1740 ::VSLCorrTaskPtr ptr;
1741 int status = ::vsldCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1743 status,
"MKLCorrTask::reset",
"::vsldCorrNewTask1D");
1744 this->reset_ptr(ptr);
1749 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1750 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex8 *)
1752 ::VSLCorrTaskPtr ptr;
1753 int status = ::vslcCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1755 status,
"MKLCorrTask::reset",
"::vslcCorrNewTask1D");
1756 this->reset_ptr(ptr);
1761 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1762 const MKL_INT yshape,
const MKL_INT zshape, MKL_Complex16 *)
1764 ::VSLCorrTaskPtr ptr;
1765 int status = ::vslzCorrNewTask1D(&ptr, mode, xshape, yshape, zshape);
1767 status,
"MKLCorrTask::reset",
"::vslzCorrNewTask1D");
1768 this->reset_ptr(ptr);
1773 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1774 const MKL_INT *yshape,
const MKL_INT *zshape,
const float *x,
1775 const MKL_INT *xstride)
1777 ::VSLCorrTaskPtr ptr;
1778 int status = ::vslsCorrNewTaskX(
1779 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1781 status,
"MKLCorrTask::reset",
"::vslsCorrNewTaskX");
1782 this->reset_ptr(ptr);
1787 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1788 const MKL_INT *yshape,
const MKL_INT *zshape,
const double *x,
1789 const MKL_INT *xstride)
1791 ::VSLCorrTaskPtr ptr;
1792 int status = ::vsldCorrNewTaskX(
1793 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1795 status,
"MKLCorrTask::reset",
"::vsldCorrNewTaskX");
1796 this->reset_ptr(ptr);
1801 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1802 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex8 *x,
1803 const MKL_INT *xstride)
1805 ::VSLCorrTaskPtr ptr;
1806 int status = ::vslcCorrNewTaskX(
1807 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1809 status,
"MKLCorrTask::reset",
"::vslcCorrNewTaskX");
1810 this->reset_ptr(ptr);
1815 int reset_dispatch(
const MKL_INT mode, MKL_INT dims,
const MKL_INT *xshape,
1816 const MKL_INT *yshape,
const MKL_INT *zshape,
const MKL_Complex16 *x,
1817 const MKL_INT *xstride)
1819 ::VSLCorrTaskPtr ptr;
1820 int status = ::vslzCorrNewTaskX(
1821 &ptr, mode, dims, xshape, yshape, zshape, x, xstride);
1823 status,
"MKLCorrTask::reset",
"::vslzCorrNewTaskX");
1824 this->reset_ptr(ptr);
1829 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1830 const MKL_INT yshape,
const MKL_INT zshape,
const float *x,
1831 const MKL_INT xstride)
1833 ::VSLCorrTaskPtr ptr;
1834 int status = ::vslsCorrNewTaskX1D(
1835 &ptr, mode, xshape, yshape, zshape, x, xstride);
1837 status,
"MKLCorrTask::reset",
"::vslsCorrNewTaskX1D");
1838 this->reset_ptr(ptr);
1843 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1844 const MKL_INT yshape,
const MKL_INT zshape,
const double *x,
1845 const MKL_INT xstride)
1847 ::VSLCorrTaskPtr ptr;
1848 int status = ::vsldCorrNewTaskX1D(
1849 &ptr, mode, xshape, yshape, zshape, x, xstride);
1851 status,
"MKLCorrTask::reset",
"::vsldCorrNewTaskX1D");
1852 this->reset_ptr(ptr);
1857 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1858 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex8 *x,
1859 const MKL_INT xstride)
1861 ::VSLCorrTaskPtr ptr;
1862 int status = ::vslcCorrNewTaskX1D(
1863 &ptr, mode, xshape, yshape, zshape, x, xstride);
1865 status,
"MKLCorrTask::reset",
"::vslcCorrNewTaskX1D");
1866 this->reset_ptr(ptr);
1871 int reset_dispatch(
const MKL_INT mode,
const MKL_INT xshape,
1872 const MKL_INT yshape,
const MKL_INT zshape,
const MKL_Complex16 *x,
1873 const MKL_INT xstride)
1875 ::VSLCorrTaskPtr ptr;
1876 int status = ::vslzCorrNewTaskX1D(
1877 &ptr, mode, xshape, yshape, zshape, x, xstride);
1879 status,
"MKLCorrTask::reset",
"::vslzCorrNewTaskX1D");
1880 this->reset_ptr(ptr);
1888 template <
typename RealType =
double>
1892 "**MKLDFTask** USED WITH RealType OTHER THAN float OR double");
1900 reset(nx, x, xhint, ny, y, yhint);
1908 int status = ::dfDeleteTask(&ptr);
1910 status,
"MKLDFTask::release",
"::dfDeleteTask");
1918 return reset_dispatch(nx, x, xhint, ny, y, yhint);
1922 int reset_dispatch(MKL_INT nx,
const float *x, MKL_INT xhint, MKL_INT ny,
1923 const float *y, MKL_INT yhint)
1926 int status = ::dfsNewTask1D(&ptr, nx, x, xhint, ny, y, yhint);
1928 status,
"MKLDFTask::reset",
"::dfsNewTask1D");
1929 this->reset_ptr(ptr);
1934 int reset_dispatch(MKL_INT nx,
const double *x, MKL_INT xhint, MKL_INT ny,
1935 const double *y, MKL_INT yhint)
1938 int status = ::dfdNewTask1D(&ptr, nx, x, xhint, ny, y, yhint);
1940 status,
"MKLDFTask::reset",
"::dfdNewTask1D");
1941 this->reset_ptr(ptr);
1949 #endif // VSMC_UTILITY_MKL_HPP int gumbel(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_GUMBEL_ICDF)
vsRngGumbel
static int get_num_reg_brngs()
vslGetNumRegBrngs
MKLStream(MKL_INT brng, MKL_INT n, unsigned *params)
vslNewStreamEx
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(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 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 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
typename std::remove_pointer< ::VSLStreamStatePtr >::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 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 rayleigh(MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_RAYLEIGH_ICDF)
vdRngRayleigh
int compute(unsigned MKL_INT64 estimates, MKL_INT method)
vslSSCompute
int reset(MKL_INT mode, MKL_INT xshape, MKL_INT yshape, MKL_INT zshape, const result_type *x, const MKL_INT xstride)
vslConvNewTaskX1D
int edit_task(MKL_INT parameter, const MKL_INT *par_addr)
vsliSSEditTask
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
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
::VSLStreamStatePtr pointer
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
MKLDFTask(MKL_INT nx, const result_type *x, MKL_INT xhint, MKL_INT ny, const result_type *y, MKL_INT yhint)
#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
int hypergeometric(MKL_INT n, int *r, int l, int s, int m, MKL_INT method=VSL_RNG_METHOD_HYPERGEOMETRIC_H2PE)
viRngHypergeometric
static int release(::DFTaskPtr ptr)
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
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
static int release(::VSLSSTaskPtr ptr)
vslSSDeleteTask
bool operator!=(const SingleParticle< T > &sp1, const SingleParticle< T > &sp2)
int poisson(MKL_INT n, int *r, double lambda, MKL_INT method=VSL_RNG_METHOD_POISSON_PTPE)
viRngPoisson
int edit_cp(const result_type *mean, const result_type *sum, const result_type *cp, const MKL_INT *cp_storage)
vslSSEditCP
std::string itos(UIntType i, std::true_type)
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 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
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
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 save_m(char *memptr) const
vslSaveStreamM
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
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
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 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
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
bool operator==(const SingleParticle< T > &sp1, const SingleParticle< T > &sp2)
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
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
int edit_outliers_detection(const MKL_INT *nparams, const result_type *params, const result_type *w)
vslSSEditOutliersDetection
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 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_task(MKL_INT parameter, const result_type *par_addr)
vslSSEditTask
static int release(::VSLConvTaskPtr ptr)
vslConvDeleteTask
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_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 reset(MKL_INT nx, const result_type *x, MKL_INT xhint, MKL_INT ny, const result_type *y, MKL_INT yhint)
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
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
int edit_cor_parameterization(const result_type *cor, const MKL_INT *cor_storage, const result_type *pcor, const MKL_INT *pcor_storage)
vslSSEditCorParameterization
deleter_type & get_deleter()
MKLStream & operator=(const MKLStream &other)
vslCopyStream/vslCopySreamState
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
int cauchy(MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_CAUCHY_ICDF)
vsRngCauchy