MCKL
Monte Carlo Kernel Library
beta_distribution.hpp
Go to the documentation of this file.
1 //============================================================================
2 // MCKL/include/mckl/random/beta_distribution.hpp
3 //----------------------------------------------------------------------------
4 // MCKL: Monte Carlo Kernel Library
5 //----------------------------------------------------------------------------
6 // Copyright (c) 2013-2018, Yan Zhou
7 // All rights reserved.
8 //
9 // Redistribution and use in source and binary forms, with or without
10 // modification, are permitted provided that the following conditions are met:
11 //
12 // Redistributions of source code must retain the above copyright notice,
13 // this list of conditions and the following disclaimer.
14 //
15 // Redistributions in binary form must reproduce the above copyright notice,
16 // this list of conditions and the following disclaimer in the documentation
17 // and/or other materials provided with the distribution.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS
20 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 // POSSIBILITY OF SUCH DAMAGE.
30 //============================================================================
31 
32 #ifndef MCKL_RANDOM_BETA_DISTRIBUTION_HPP
33 #define MCKL_RANDOM_BETA_DISTRIBUTION_HPP
34 
38 
39 namespace mckl {
40 
41 namespace internal {
42 
43 template <typename RealType>
44 inline bool beta_distribution_check_param(RealType alpha, RealType beta)
45 {
46  return alpha > 0 && beta > 0;
47 }
48 
59 }; // enum BetaDistributionAlgorithm
60 
61 MCKL_PUSH_CLANG_WARNING("-Wpadded")
62 template <typename RealType>
64 {
65  public:
66  BetaDistributionConstant(RealType alpha = 1, RealType beta = 1)
67  {
68  MCKL_PUSH_CLANG_WARNING("-Wfloat-equal")
69  MCKL_PUSH_INTEL_WARNING(1572) // floating-point comparison
70  const RealType K = static_cast<RealType>(0.852);
71  const RealType C = static_cast<RealType>(-0.956);
72  const RealType D = beta + K * alpha * alpha + C;
73  if (alpha == static_cast<RealType>(0.5) &&
74  beta == static_cast<RealType>(0.5)) {
75  algorithm_ = BetaDistributionAlgorithmAS;
76  } else if (alpha == 1 && beta == 1) {
77  algorithm_ = BetaDistributionAlgorithm11;
78  } else if (alpha == 1) {
79  algorithm_ = BetaDistributionAlgorithm1X;
80  } else if (beta == 1) {
81  algorithm_ = BetaDistributionAlgorithmX1;
82  } else if (alpha > 1 && beta > 1) {
83  algorithm_ = BetaDistributionAlgorithmC;
84  } else if (alpha < 1 && beta < 1 && D <= 0) {
85  algorithm_ = BetaDistributionAlgorithmJ;
86  } else if (alpha < 1 && beta < 1) {
87  algorithm_ = BetaDistributionAlgorithmA1;
88  } else if (alpha < 1 && beta > 1) {
89  algorithm_ = BetaDistributionAlgorithmA2;
90  } else if (alpha > 1 && beta < 1) {
91  algorithm_ = BetaDistributionAlgorithmA3;
92  } else {
93  algorithm_ = BetaDistributionAlgorithmC;
94  }
97 
98  a_ = b_ = t_ = p_ = 0;
99  switch (algorithm_) {
101  break;
103  break;
105  b_ = 1 / beta;
106  break;
108  a_ = 1 / alpha;
109  break;
111  a_ = alpha + beta;
112  b_ = std::min(alpha, beta);
113  if (b_ > 1) {
114  b_ = std::sqrt((2 * alpha * beta - a_) / (a_ - 2));
115  }
116  b_ = 1 / b_;
117  t_ = alpha + 1 / b_;
118  p_ = a_ * std::log(a_);
119  break;
121  a_ = 1 / alpha;
122  b_ = 1 / beta;
123  break;
125  a_ = 1 / alpha;
126  b_ = 1 / beta;
127  t_ = std::sqrt(alpha * (1 - alpha));
128  t_ /= t_ + std::sqrt(beta * (1 - beta));
129  p_ = beta * t_;
130  p_ /= p_ + alpha * (1 - t_);
131  break;
133  a_ = 1 / alpha;
134  b_ = 1 / beta;
135  t_ = 1 - alpha;
136  t_ /= t_ + beta;
137  p_ = beta * t_;
138  p_ /= p_ + alpha * std::pow(1 - t_, beta);
139  break;
141  a_ = 1 / beta;
142  b_ = 1 / alpha;
143  t_ = 1 - beta;
144  t_ /= t_ + alpha;
145  p_ = alpha * t_;
146  p_ /= p_ + beta * std::pow(1 - t_, alpha);
147  break;
148  }
149  }
150 
151  RealType a() const { return a_; }
152  RealType b() const { return b_; }
153  RealType t() const { return t_; }
154  RealType p() const { return p_; }
155  BetaDistributionAlgorithm algorithm() const { return algorithm_; }
156 
157  friend bool operator==(const BetaDistribution<RealType> &c1,
159  {
160  MCKL_PUSH_CLANG_WARNING("-Wfloat-equal")
161  MCKL_PUSH_INTEL_WARNING(1572) // floating-point comparison
162  if (c1.a_ != c2.a_) {
163  return false;
164  }
165  if (c1.b_ != c2.b_) {
166  return false;
167  }
168  if (c1.t_ != c2.t_) {
169  return false;
170  }
171  if (c1.p_ != c2.p_) {
172  return false;
173  }
174  if (c1.algorithm_ != c2.algorithm_) {
175  return false;
176  }
177  return true;
180  }
181 
182  private:
183  RealType a_;
184  RealType b_;
185  RealType t_;
186  RealType p_;
187  BetaDistributionAlgorithm algorithm_;
188 }; // class BetaDistributionConstant
190 
191 template <std::size_t, typename RealType, typename RNGType>
192 inline std::size_t beta_distribution_impl_as(RNGType &rng, std::size_t n,
193  RealType *r, RealType, RealType,
195 {
196  u01_oo_distribution(rng, n, r);
197  muladd(n, const_pi<RealType>(), r, -const_pi_by2<RealType>(), r);
198  sin(n, r, r);
199  muladd(n, static_cast<RealType>(0.5), r, static_cast<RealType>(0.5), r);
200 
201  return n;
202 }
203 
204 template <std::size_t, typename RealType, typename RNGType>
205 inline std::size_t beta_distribution_impl_11(RNGType &rng, std::size_t n,
206  RealType *r, RealType, RealType,
208 {
209  u01_oo_distribution(rng, n, r);
210 
211  return n;
212 }
213 
214 template <std::size_t, typename RealType, typename RNGType>
215 inline std::size_t beta_distribution_impl_1x(RNGType &rng, std::size_t n,
216  RealType *r, RealType, RealType,
217  const BetaDistributionConstant<RealType> &constant)
218 {
219  u01_oo_distribution(rng, n, r);
220  log(n, r, r);
221  mul(n, constant.b(), r, r);
222  exp(n, r, r);
223  sub(n, const_one<RealType>(), r, r);
224 
225  return n;
226 }
227 
228 template <std::size_t, typename RealType, typename RNGType>
229 inline std::size_t beta_distribution_impl_x1(RNGType &rng, std::size_t n,
230  RealType *r, RealType, RealType,
231  const BetaDistributionConstant<RealType> &constant)
232 {
233  u01_oo_distribution(rng, n, r);
234  log(n, r, r);
235  mul(n, constant.a(), r, r);
236  exp(n, r, r);
237 
238  return n;
239 }
240 
241 template <std::size_t K, typename RealType, typename RNGType>
242 inline std::size_t beta_distribution_impl_c(RNGType &rng, std::size_t n,
243  RealType *r, RealType alpha, RealType beta,
244  const BetaDistributionConstant<RealType> &constant)
245 {
246  const RealType a = constant.a();
247  const RealType b = constant.b();
248  const RealType t = constant.t();
249  const RealType p = constant.p();
250  const RealType ln_4 = 2 * const_ln_2<RealType>();
251  alignas(MCKL_ALIGNMENT) std::array<RealType, K * 5> s;
252  RealType *const u1 = s.data();
253  RealType *const u2 = s.data() + n;
254  RealType *const v = s.data() + n * 2;
255  RealType *const x = s.data() + n * 3;
256  RealType *const y = s.data() + n * 4;
257  u01_oo_distribution(rng, n * 2, s.data());
258  sub(n, const_one<RealType>(), u1, v);
259  div(n, u1, v, v);
260  log(n, v, v);
261  mul(n, b, v, v);
262  exp(n, v, x);
263  mul(n, alpha, x, x);
264  add(n, beta, x, y);
265  div(n, x, y, x);
266  sqr(n, u1, u1);
267  mul(n, u1, u2, u2);
268  log(n, u2, u2);
269  log(n, y, u1);
270  muladd(n, -a, u1, p, u1);
271  muladd(n, t, v, -ln_4, v);
272  add(n, v, u1, u1);
273 
274  std::size_t m = 0;
275  for (std::size_t i = 0; i != n; ++i) {
276  if (u1[i] > u2[i]) {
277  r[m++] = x[i];
278  }
279  }
280 
281  return m;
282 }
283 
284 template <std::size_t K, typename RealType, typename RNGType>
285 inline std::size_t beta_distribution_impl_j(RNGType &rng, std::size_t n,
286  RealType *r, RealType, RealType,
287  const BetaDistributionConstant<RealType> &constant)
288 {
289  alignas(MCKL_ALIGNMENT) std::array<RealType, K * 3> s;
290  const RealType a = constant.a();
291  const RealType b = constant.b();
292  RealType *const x = s.data();
293  RealType *const y = s.data() + n;
294  RealType *const u = s.data() + n * 2;
295  u01_oo_distribution(rng, n * 2, s.data());
296  pow(n, x, a, x);
297  pow(n, y, b, y);
298  add(n, x, y, u);
299  div(n, x, u, x);
300 
301  std::size_t m = 0;
302  for (std::size_t i = 0; i != n; ++i) {
303  if (u[i] < 1) {
304  r[m++] = x[i];
305  }
306  }
307 
308  return m;
309 }
310 
311 template <std::size_t, typename RealType, typename RNGType>
312 inline std::size_t beta_distribution_impl_a1(RNGType &, std::size_t,
313  RealType *, RealType, RealType, const BetaDistributionConstant<RealType> &)
314 {
315  return 0;
316 }
317 
318 template <std::size_t, typename RealType, typename RNGType>
319 inline std::size_t beta_distribution_impl_a2(RNGType &, std::size_t,
320  RealType *, RealType, RealType, const BetaDistributionConstant<RealType> &)
321 {
322  return 0;
323 }
324 
325 template <std::size_t, typename RealType, typename RNGType>
326 inline std::size_t beta_distribution_impl_a3(RNGType &, std::size_t,
327  RealType *, RealType, RealType, const BetaDistributionConstant<RealType> &)
328 {
329  return 0;
330 }
331 
332 template <std::size_t K, typename RealType, typename RNGType>
333 inline std::size_t beta_distribution_impl(RNGType &rng, std::size_t n,
334  RealType *r, RealType alpha, RealType beta,
335  const BetaDistributionConstant<RealType> &constant)
336 {
337  switch (constant.algorithm()) {
339  return beta_distribution_impl_as<K>(
340  rng, n, r, alpha, beta, constant);
342  return beta_distribution_impl_11<K>(
343  rng, n, r, alpha, beta, constant);
345  return beta_distribution_impl_1x<K>(
346  rng, n, r, alpha, beta, constant);
348  return beta_distribution_impl_x1<K>(
349  rng, n, r, alpha, beta, constant);
351  return beta_distribution_impl_c<K>(
352  rng, n, r, alpha, beta, constant);
354  return beta_distribution_impl_j<K>(
355  rng, n, r, alpha, beta, constant);
357  return beta_distribution_impl_a1<K>(
358  rng, n, r, alpha, beta, constant);
360  return beta_distribution_impl_a2<K>(
361  rng, n, r, alpha, beta, constant);
363  return beta_distribution_impl_a3<K>(
364  rng, n, r, alpha, beta, constant);
365  }
366  return 0;
367 }
368 
369 } // namespace internal
370 
371 template <typename RealType, typename RNGType>
372 inline void beta_distribution(
373  RNGType &rng, std::size_t n, RealType *r, RealType alpha, RealType beta)
374 {
375  const std::size_t k = BufferSize<RealType>::value;
376  const internal::BetaDistributionConstant<RealType> constant(alpha, beta);
377  while (n > k) {
378  std::size_t m = internal::beta_distribution_impl<k>(
379  rng, k, r, alpha, beta, constant);
380  if (m == 0) {
381  break;
382  }
383  n -= m;
384  r += m;
385  }
386  std::size_t m =
387  internal::beta_distribution_impl<k>(rng, n, r, alpha, beta, constant);
388  n -= m;
389  r += m;
390  if (n > 0) {
391  BetaDistribution<RealType> dist(alpha, beta);
392  for (std::size_t i = 0; i != n; ++i) {
393  r[i] = dist(rng);
394  }
395  }
396 }
397 
398 template <typename RealType, typename RNGType>
399 inline void beta_distribution(RNGType &rng, std::size_t n, RealType *r,
400  const typename BetaDistribution<RealType>::param_type &param)
401 {
402  beta_distribution(rng, n, r, param.alpha(), param.beta());
403 }
404 
407 template <typename RealType>
409 {
412  Beta, beta, RealType, result_type, alpha, 1, result_type, beta, 1)
413 
414  public:
415  result_type min() const { return 0; }
416 
417  result_type max() const { return 1; }
418 
419  void reset()
420  {
421  constant_ =
423  }
424 
425  private:
427 
428  bool is_equal(const distribution_type &other) const
429  {
430  return constant_ == other.constant_;
431  }
432 
433  template <typename CharT, typename Traits>
434  void ostream(std::basic_ostream<CharT, Traits> &) const
435  {
436  }
437 
438  template <typename CharT, typename Traits>
439  void istream(std::basic_istream<CharT, Traits> &)
440  {
441  reset();
442  }
443 
444  template <typename RNGType>
445  result_type generate(RNGType &rng, const param_type &param)
446  {
447  if (param == param_) {
448  return generate(rng, param_, constant_);
449  }
450 
452  param.alpha(), param.beta());
453 
454  return generate(rng, param, constant);
455  }
456 
457  template <typename RNGType>
458  result_type generate(RNGType &rng, const param_type &param,
460  {
461  result_type r = 0;
462  switch (constant.algorithm()) {
464  r = generate_as(rng, param, constant);
465  break;
467  r = generate_11(rng, param, constant);
468  break;
470  r = generate_1x(rng, param, constant);
471  break;
473  r = generate_x1(rng, param, constant);
474  break;
476  r = generate_c(rng, param, constant);
477  break;
479  r = generate_j(rng, param, constant);
480  break;
482  r = generate_a1(rng, param, constant);
483  break;
485  r = generate_a2(rng, param, constant);
486  break;
488  r = generate_a3(rng, param, constant);
489  break;
490  }
491 
492  return r;
493  }
494 
495  template <typename RNGType>
496  result_type generate_as(RNGType &rng, const param_type &,
498  {
500  result_type u = u01(rng);
501  u = std::sin(
502  -const_pi_by2<result_type>() + const_pi<result_type>() * u);
503 
504  return static_cast<result_type>(0.5) +
505  static_cast<result_type>(0.5) * u;
506  }
507 
508  template <typename RNGType>
509  result_type generate_11(RNGType &rng, const param_type &,
511  {
513 
514  return u01(rng);
515  }
516 
517  template <typename RNGType>
518  result_type generate_1x(RNGType &rng, const param_type &,
520  {
522 
523  return 1 - std::exp(constant.b() * std::log(u01(rng)));
524  }
525 
526  template <typename RNGType>
527  result_type generate_x1(RNGType &rng, const param_type &,
529  {
531 
532  return std::exp(constant.a() * std::log(u01(rng)));
533  }
534 
535  template <typename RNGType>
536  result_type generate_c(RNGType &rng, const param_type &param,
538  {
540  const result_type ln_4 = 2 * const_ln_2<result_type>();
541  result_type x = 0;
542  result_type y = 0;
543  result_type left = 0;
544  result_type right = 0;
545  do {
546  result_type u1 = u01(rng);
547  result_type u2 = u01(rng);
548  result_type v = constant.b() * std::log(u1 / (1 - u1));
549  x = param.alpha() * std::exp(v);
550  y = param.beta() + x;
551  left = (constant.p() - constant.a() * std::log(y)) +
552  (constant.t() * v - ln_4);
553  right = std::log(u1 * u1 * u2);
554  } while (left < right);
555 
556  return x / y;
557  }
558 
559  template <typename RNGType>
560  result_type generate_j(RNGType &rng, const param_type &,
562  {
564  result_type x = 0;
565  result_type y = 0;
566  do {
567  x = std::pow(u01(rng), constant.a());
568  y = std::pow(u01(rng), constant.b());
569  } while (x + y > 1);
570 
571  return x / (x + y);
572  }
573 
574  template <typename RNGType>
575  result_type generate_a1(RNGType &rng, const param_type &param,
577  {
579  while (true) {
580  result_type u = u01(rng);
581  result_type e = -std::log(u01(rng));
582  result_type x = 0;
583  result_type v = 0;
584  if (u < constant.p()) {
585  x = constant.t() * std::pow(u / constant.p(), constant.a());
586  v = (1 - param.beta()) *
587  std::log((1 - x) / (1 - constant.t()));
588  } else {
589  x = 1 -
590  (1 - constant.t()) *
591  std::pow((1 - u) / (1 - constant.p()), constant.b());
592  v = (1 - param.alpha()) * std::log(x / constant.t());
593  }
594  if (v < e) {
595  return x;
596  }
597  }
598  }
599 
600  template <typename RNGType>
601  result_type generate_a2(RNGType &rng, const param_type &param,
603  {
605  while (true) {
606  result_type u = u01(rng);
607  result_type e = -std::log(u01(rng));
608  result_type x = 0;
609  result_type v = 0;
610  if (u < constant.p()) {
611  x = constant.t() * std::pow(u / constant.p(), constant.a());
612  v = (1 - param.beta()) * std::log(1 - x);
613  } else {
614  x = 1 -
615  (1 - constant.t()) *
616  std::pow((1 - u) / (1 - constant.p()), constant.b());
617  v = (1 - param.alpha()) * std::log(x / constant.t());
618  }
619  if (v < e) {
620  return x;
621  }
622  }
623  }
624 
625  template <typename RNGType>
626  result_type generate_a3(RNGType &rng, const param_type &param,
628  {
630  while (true) {
631  result_type u = u01(rng);
632  result_type e = -std::log(u01(rng));
633  result_type x = 0;
634  result_type v = 0;
635  if (u < constant.p()) {
636  x = constant.t() * std::pow(u / constant.p(), constant.a());
637  v = (1 - param.alpha()) * std::log(1 - x);
638  } else {
639  x = 1 -
640  (1 - constant.t()) *
641  std::pow((1 - u) / (1 - constant.p()), constant.b());
642  v = (1 - param.beta()) * std::log(x / constant.t());
643  }
644  if (v < e) {
645  return 1 - x;
646  }
647  }
648  }
649 }; // class BetaDistribution
650 
652 
653 } // namespace mckl
654 
655 #endif // MCKL_RANDOM_BETA_DISTRIBUTION_HPP
#define MCKL_DEFINE_RANDOM_DISTRIBUTION_2( Name, name, T, T1, p1, v1, T2, p2, v2)
void pow(std::size_t n, const float *a, const float *b, float *y)
Definition: vmf.hpp:184
std::size_t beta_distribution_impl_c(RNGType &rng, std::size_t n, RealType *r, RealType alpha, RealType beta, const BetaDistributionConstant< RealType > &constant)
void mul(std::size_t n, const float *a, const float *b, float *y)
Definition: vmf.hpp:124
BetaDistributionAlgorithm algorithm() const
BetaDistributionConstant(RealType alpha=1, RealType beta=1)
std::size_t beta_distribution_impl_a3(RNGType &, std::size_t, RealType *, RealType, RealType, const BetaDistributionConstant< RealType > &)
#define MCKL_PUSH_CLANG_WARNING(warning)
Definition: compiler.h:63
result_type max() const
void sin(std::size_t n, const float *a, float *y)
Definition: vmf.hpp:236
void log(std::size_t n, const float *a, float *y)
Definition: vmf.hpp:226
std::size_t beta_distribution_impl_a1(RNGType &, std::size_t, RealType *, RealType, RealType, const BetaDistributionConstant< RealType > &)
void u01_oo_distribution(RNGType &rng, std::size_t n, RealType *r)
T muladd(T a, T b, T c)
Definition: vmf.hpp:673
#define MCKL_DEFINE_RANDOM_DISTRIBUTION_RAND(Name, T)
RealType u01(UIntType u)
Convert uniform unsigned integers to floating points within [0, 1].
Definition: u01.hpp:88
void beta_distribution(RNGType &rng, std::size_t n, RealType *r, RealType alpha, RealType beta)
std::basic_ostream< CharT, Traits > & ostream(std::basic_ostream< CharT, Traits > &os, const std::array< T, N > &ary)
Definition: iostream.hpp:46
void sub(std::size_t n, const float *a, const float *b, float *y)
Definition: vmf.hpp:121
std::size_t beta_distribution_impl_1x(RNGType &rng, std::size_t n, RealType *r, RealType, RealType, const BetaDistributionConstant< RealType > &constant)
Standard uniform distribution on (0, 1)
void sqr(std::size_t n, const float *a, float *y)
Definition: vmf.hpp:123
#define MCKL_PUSH_INTEL_WARNING(wid)
Definition: compiler.h:88
std::size_t beta_distribution_impl_11(RNGType &rng, std::size_t n, RealType *r, RealType, RealType, const BetaDistributionConstant< RealType > &)
std::size_t beta_distribution_impl_a2(RNGType &, std::size_t, RealType *, RealType, RealType, const BetaDistributionConstant< RealType > &)
bool beta_distribution_check_param(RealType alpha, RealType beta)
friend bool operator==(const BetaDistribution< RealType > &c1, const BetaDistributionConstant< RealType > &c2)
std::size_t beta_distribution_impl_j(RNGType &rng, std::size_t n, RealType *r, RealType, RealType, const BetaDistributionConstant< RealType > &constant)
void sqrt(std::size_t n, const float *a, float *y)
Definition: vmf.hpp:177
std::size_t beta_distribution_impl(RNGType &rng, std::size_t n, RealType *r, RealType alpha, RealType beta, const BetaDistributionConstant< RealType > &constant)
Definition: mcmc.hpp:40
void exp(std::size_t n, const float *a, float *y)
Definition: vmf.hpp:221
#define MCKL_POP_CLANG_WARNING
Definition: compiler.h:66
#define MCKL_ALIGNMENT
The default alignment for scalar type.
Definition: config.h:187
bool is_equal(const float &v1, const float &v2)
Definition: is_equal.hpp:41
#define MCKL_DEFINE_RANDOM_DISTRIBUTION_ASSERT_REAL_TYPE(Name)
std::size_t beta_distribution_impl_x1(RNGType &rng, std::size_t n, RealType *r, RealType, RealType, const BetaDistributionConstant< RealType > &constant)
std::basic_istream< CharT, Traits > & istream(std::basic_istream< CharT, Traits > &is, std::array< T, N > &ary)
Definition: iostream.hpp:66
std::size_t beta_distribution_impl_as(RNGType &rng, std::size_t n, RealType *r, RealType, RealType, const BetaDistributionConstant< RealType > &)
void div(std::size_t n, const float *a, const float *b, float *y)
Definition: vmf.hpp:175
#define MCKL_POP_INTEL_WARNING
Definition: compiler.h:89
void add(std::size_t n, const float *a, const float *b, float *y)
Definition: vmf.hpp:119