ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_distBern.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
36
37!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38
40
41 use pm_kind, only: SK, IK, LK
42
43 implicit none
44
45 character(*, SK), parameter :: MODULE_NAME = SK_"@pm_distBern"
46
47!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48
83 end type
84
85!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
86
160 interface isHead
161
162 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163
164 impure module function isHeadDD() result(rand)
165#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
166 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadDD
167#endif
168 logical(LK) :: rand
169 end function
170
171 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
172
173 impure module function isHeadDS(size) result(rand)
174#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
175 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadDS
176#endif
177 integer(IK) , intent(in) :: size
178 logical(LK) :: rand(size)
179 end function
180
181 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
182
183#if RK5_ENABLED
184 impure elemental module function isHeadPD_RK5(p) result(rand)
185#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
186 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPD_RK5
187#endif
188 use pm_kind, only: RKG => RK5
189 real(RKG) , intent(in) :: p
190 logical(LK) :: rand
191 end function
192#endif
193
194#if RK4_ENABLED
195 impure elemental module function isHeadPD_RK4(p) result(rand)
196#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
197 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPD_RK4
198#endif
199 use pm_kind, only: RKG => RK4
200 real(RKG) , intent(in) :: p
201 logical(LK) :: rand
202 end function
203#endif
204
205#if RK3_ENABLED
206 impure elemental module function isHeadPD_RK3(p) result(rand)
207#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
208 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPD_RK3
209#endif
210 use pm_kind, only: RKG => RK3
211 real(RKG) , intent(in) :: p
212 logical(LK) :: rand
213 end function
214#endif
215
216#if RK2_ENABLED
217 impure elemental module function isHeadPD_RK2(p) result(rand)
218#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
219 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPD_RK2
220#endif
221 use pm_kind, only: RKG => RK2
222 real(RKG) , intent(in) :: p
223 logical(LK) :: rand
224 end function
225#endif
226
227#if RK1_ENABLED
228 impure elemental module function isHeadPD_RK1(p) result(rand)
229#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
230 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPD_RK1
231#endif
232 use pm_kind, only: RKG => RK1
233 real(RKG) , intent(in) :: p
234 logical(LK) :: rand
235 end function
236#endif
237
238 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239
240#if RK5_ENABLED
241 impure module function isHeadPS_RK5(p, size) result(rand)
242#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
243 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPS_RK5
244#endif
245 use pm_kind, only: RKG => RK5
246 real(RKG) , intent(in) :: p
247 integer(IK) , intent(in) :: size
248 logical(LK) :: rand(size)
249 end function
250#endif
251
252#if RK4_ENABLED
253 impure module function isHeadPS_RK4(p, size) result(rand)
254#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
255 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPS_RK4
256#endif
257 use pm_kind, only: RKG => RK4
258 real(RKG) , intent(in) :: p
259 integer(IK) , intent(in) :: size
260 logical(LK) :: rand(size)
261 end function
262#endif
263
264#if RK3_ENABLED
265 impure module function isHeadPS_RK3(p, size) result(rand)
266#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
267 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPS_RK3
268#endif
269 use pm_kind, only: RKG => RK3
270 real(RKG) , intent(in) :: p
271 integer(IK) , intent(in) :: size
272 logical(LK) :: rand(size)
273 end function
274#endif
275
276#if RK2_ENABLED
277 impure module function isHeadPS_RK2(p, size) result(rand)
278#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
279 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPS_RK2
280#endif
281 use pm_kind, only: RKG => RK2
282 real(RKG) , intent(in) :: p
283 integer(IK) , intent(in) :: size
284 logical(LK) :: rand(size)
285 end function
286#endif
287
288#if RK1_ENABLED
289 impure module function isHeadPS_RK1(p, size) result(rand)
290#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
291 !DEC$ ATTRIBUTES DLLEXPORT :: isHeadPS_RK1
292#endif
293 use pm_kind, only: RKG => RK1
294 real(RKG) , intent(in) :: p
295 integer(IK) , intent(in) :: size
296 logical(LK) :: rand(size)
297 end function
298#endif
299
300 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
301
302 end interface
303
304!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
305
357 interface getBernRand
358
359 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
360
361#if RK5_ENABLED
362 impure elemental module function getBernRandPD_RK5(p) result(rand)
363#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
364 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPD_RK5
365#endif
366 use pm_kind, only: RKG => RK5
367 real(RKG) , intent(in) :: p
368 integer(IK) :: rand
369 end function
370#endif
371
372#if RK4_ENABLED
373 impure elemental module function getBernRandPD_RK4(p) result(rand)
374#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
375 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPD_RK4
376#endif
377 use pm_kind, only: RKG => RK4
378 real(RKG) , intent(in) :: p
379 integer(IK) :: rand
380 end function
381#endif
382
383#if RK3_ENABLED
384 impure elemental module function getBernRandPD_RK3(p) result(rand)
385#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
386 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPD_RK3
387#endif
388 use pm_kind, only: RKG => RK3
389 real(RKG) , intent(in) :: p
390 integer(IK) :: rand
391 end function
392#endif
393
394#if RK2_ENABLED
395 impure elemental module function getBernRandPD_RK2(p) result(rand)
396#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
397 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPD_RK2
398#endif
399 use pm_kind, only: RKG => RK2
400 real(RKG) , intent(in) :: p
401 integer(IK) :: rand
402 end function
403#endif
404
405#if RK1_ENABLED
406 impure elemental module function getBernRandPD_RK1(p) result(rand)
407#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
408 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPD_RK1
409#endif
410 use pm_kind, only: RKG => RK1
411 real(RKG) , intent(in) :: p
412 integer(IK) :: rand
413 end function
414#endif
415
416 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
417
418#if RK5_ENABLED
419 impure module function getBernRandPS_RK5(p, size) result(rand)
420#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
421 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPS_RK5
422#endif
423 use pm_kind, only: RKG => RK5
424 real(RKG) , intent(in) :: p
425 integer(IK) , intent(in) :: size
426 integer(IK) :: rand(size)
427 end function
428#endif
429
430#if RK4_ENABLED
431 impure module function getBernRandPS_RK4(p, size) result(rand)
432#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
433 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPS_RK4
434#endif
435 use pm_kind, only: RKG => RK4
436 real(RKG) , intent(in) :: p
437 integer(IK) , intent(in) :: size
438 integer(IK) :: rand(size)
439 end function
440#endif
441
442#if RK3_ENABLED
443 impure module function getBernRandPS_RK3(p, size) result(rand)
444#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
445 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPS_RK3
446#endif
447 use pm_kind, only: RKG => RK3
448 real(RKG) , intent(in) :: p
449 integer(IK) , intent(in) :: size
450 integer(IK) :: rand(size)
451 end function
452#endif
453
454#if RK2_ENABLED
455 impure module function getBernRandPS_RK2(p, size) result(rand)
456#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
457 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPS_RK2
458#endif
459 use pm_kind, only: RKG => RK2
460 real(RKG) , intent(in) :: p
461 integer(IK) , intent(in) :: size
462 integer(IK) :: rand(size)
463 end function
464#endif
465
466#if RK1_ENABLED
467 impure module function getBernRandPS_RK1(p, size) result(rand)
468#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
469 !DEC$ ATTRIBUTES DLLEXPORT :: getBernRandPS_RK1
470#endif
471 use pm_kind, only: RKG => RK1
472 real(RKG) , intent(in) :: p
473 integer(IK) , intent(in) :: size
474 integer(IK) :: rand(size)
475 end function
476#endif
477
478 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
479
480 end interface
481
482!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
483
554 interface setBernRand
555
556 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
557 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
558 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
559
560 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
561
562#if IK5_ENABLED && RK5_ENABLED
563 PURE elemental module subroutine setBernRandRUP_IK5_RK5(rand, urand, p)
564#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
565 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK5_RK5
566#endif
567 use pm_kind, only: IKG => IK5, RKG => RK5
568 integer(IKG), intent(out) :: rand
569 real(RKG) , intent(in) :: urand, p
570 end subroutine
571#endif
572
573#if IK5_ENABLED && RK4_ENABLED
574 PURE elemental module subroutine setBernRandRUP_IK5_RK4(rand, urand, p)
575#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
576 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK5_RK4
577#endif
578 use pm_kind, only: IKG => IK5, RKG => RK4
579 integer(IKG), intent(out) :: rand
580 real(RKG) , intent(in) :: urand, p
581 end subroutine
582#endif
583
584#if IK5_ENABLED && RK3_ENABLED
585 PURE elemental module subroutine setBernRandRUP_IK5_RK3(rand, urand, p)
586#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
587 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK5_RK3
588#endif
589 use pm_kind, only: IKG => IK5, RKG => RK3
590 integer(IKG), intent(out) :: rand
591 real(RKG) , intent(in) :: urand, p
592 end subroutine
593#endif
594
595#if IK5_ENABLED && RK2_ENABLED
596 PURE elemental module subroutine setBernRandRUP_IK5_RK2(rand, urand, p)
597#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
598 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK5_RK2
599#endif
600 use pm_kind, only: IKG => IK5, RKG => RK2
601 integer(IKG), intent(out) :: rand
602 real(RKG) , intent(in) :: urand, p
603 end subroutine
604#endif
605
606#if IK5_ENABLED && RK1_ENABLED
607 PURE elemental module subroutine setBernRandRUP_IK5_RK1(rand, urand, p)
608#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
609 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK5_RK1
610#endif
611 use pm_kind, only: IKG => IK5, RKG => RK1
612 integer(IKG), intent(out) :: rand
613 real(RKG) , intent(in) :: urand, p
614 end subroutine
615#endif
616
617 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
618
619#if IK4_ENABLED && RK5_ENABLED
620 PURE elemental module subroutine setBernRandRUP_IK4_RK5(rand, urand, p)
621#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
622 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK4_RK5
623#endif
624 use pm_kind, only: IKG => IK4, RKG => RK5
625 integer(IKG), intent(out) :: rand
626 real(RKG) , intent(in) :: urand, p
627 end subroutine
628#endif
629
630#if IK4_ENABLED && RK4_ENABLED
631 PURE elemental module subroutine setBernRandRUP_IK4_RK4(rand, urand, p)
632#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
633 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK4_RK4
634#endif
635 use pm_kind, only: IKG => IK4, RKG => RK4
636 integer(IKG), intent(out) :: rand
637 real(RKG) , intent(in) :: urand, p
638 end subroutine
639#endif
640
641#if IK4_ENABLED && RK3_ENABLED
642 PURE elemental module subroutine setBernRandRUP_IK4_RK3(rand, urand, p)
643#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
644 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK4_RK3
645#endif
646 use pm_kind, only: IKG => IK4, RKG => RK3
647 integer(IKG), intent(out) :: rand
648 real(RKG) , intent(in) :: urand, p
649 end subroutine
650#endif
651
652#if IK4_ENABLED && RK2_ENABLED
653 PURE elemental module subroutine setBernRandRUP_IK4_RK2(rand, urand, p)
654#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
655 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK4_RK2
656#endif
657 use pm_kind, only: IKG => IK4, RKG => RK2
658 integer(IKG), intent(out) :: rand
659 real(RKG) , intent(in) :: urand, p
660 end subroutine
661#endif
662
663#if IK4_ENABLED && RK1_ENABLED
664 PURE elemental module subroutine setBernRandRUP_IK4_RK1(rand, urand, p)
665#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
666 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK4_RK1
667#endif
668 use pm_kind, only: IKG => IK4, RKG => RK1
669 integer(IKG), intent(out) :: rand
670 real(RKG) , intent(in) :: urand, p
671 end subroutine
672#endif
673
674 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
675
676#if IK3_ENABLED && RK5_ENABLED
677 PURE elemental module subroutine setBernRandRUP_IK3_RK5(rand, urand, p)
678#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
679 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK3_RK5
680#endif
681 use pm_kind, only: IKG => IK3, RKG => RK5
682 integer(IKG), intent(out) :: rand
683 real(RKG) , intent(in) :: urand, p
684 end subroutine
685#endif
686
687#if IK3_ENABLED && RK4_ENABLED
688 PURE elemental module subroutine setBernRandRUP_IK3_RK4(rand, urand, p)
689#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
690 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK3_RK4
691#endif
692 use pm_kind, only: IKG => IK3, RKG => RK4
693 integer(IKG), intent(out) :: rand
694 real(RKG) , intent(in) :: urand, p
695 end subroutine
696#endif
697
698#if IK3_ENABLED && RK3_ENABLED
699 PURE elemental module subroutine setBernRandRUP_IK3_RK3(rand, urand, p)
700#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
701 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK3_RK3
702#endif
703 use pm_kind, only: IKG => IK3, RKG => RK3
704 integer(IKG), intent(out) :: rand
705 real(RKG) , intent(in) :: urand, p
706 end subroutine
707#endif
708
709#if IK3_ENABLED && RK2_ENABLED
710 PURE elemental module subroutine setBernRandRUP_IK3_RK2(rand, urand, p)
711#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
712 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK3_RK2
713#endif
714 use pm_kind, only: IKG => IK3, RKG => RK2
715 integer(IKG), intent(out) :: rand
716 real(RKG) , intent(in) :: urand, p
717 end subroutine
718#endif
719
720#if IK3_ENABLED && RK1_ENABLED
721 PURE elemental module subroutine setBernRandRUP_IK3_RK1(rand, urand, p)
722#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
723 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK3_RK1
724#endif
725 use pm_kind, only: IKG => IK3, RKG => RK1
726 integer(IKG), intent(out) :: rand
727 real(RKG) , intent(in) :: urand, p
728 end subroutine
729#endif
730
731 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
732
733#if IK2_ENABLED && RK5_ENABLED
734 PURE elemental module subroutine setBernRandRUP_IK2_RK5(rand, urand, p)
735#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
736 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK2_RK5
737#endif
738 use pm_kind, only: IKG => IK2, RKG => RK5
739 integer(IKG), intent(out) :: rand
740 real(RKG) , intent(in) :: urand, p
741 end subroutine
742#endif
743
744#if IK2_ENABLED && RK4_ENABLED
745 PURE elemental module subroutine setBernRandRUP_IK2_RK4(rand, urand, p)
746#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
747 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK2_RK4
748#endif
749 use pm_kind, only: IKG => IK2, RKG => RK4
750 integer(IKG), intent(out) :: rand
751 real(RKG) , intent(in) :: urand, p
752 end subroutine
753#endif
754
755#if IK2_ENABLED && RK3_ENABLED
756 PURE elemental module subroutine setBernRandRUP_IK2_RK3(rand, urand, p)
757#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
758 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK2_RK3
759#endif
760 use pm_kind, only: IKG => IK2, RKG => RK3
761 integer(IKG), intent(out) :: rand
762 real(RKG) , intent(in) :: urand, p
763 end subroutine
764#endif
765
766#if IK2_ENABLED && RK2_ENABLED
767 PURE elemental module subroutine setBernRandRUP_IK2_RK2(rand, urand, p)
768#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
769 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK2_RK2
770#endif
771 use pm_kind, only: IKG => IK2, RKG => RK2
772 integer(IKG), intent(out) :: rand
773 real(RKG) , intent(in) :: urand, p
774 end subroutine
775#endif
776
777#if IK2_ENABLED && RK1_ENABLED
778 PURE elemental module subroutine setBernRandRUP_IK2_RK1(rand, urand, p)
779#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
780 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK2_RK1
781#endif
782 use pm_kind, only: IKG => IK2, RKG => RK1
783 integer(IKG), intent(out) :: rand
784 real(RKG) , intent(in) :: urand, p
785 end subroutine
786#endif
787
788 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
789
790#if IK1_ENABLED && RK5_ENABLED
791 PURE elemental module subroutine setBernRandRUP_IK1_RK5(rand, urand, p)
792#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
793 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK1_RK5
794#endif
795 use pm_kind, only: IKG => IK1, RKG => RK5
796 integer(IKG), intent(out) :: rand
797 real(RKG) , intent(in) :: urand, p
798 end subroutine
799#endif
800
801#if IK1_ENABLED && RK4_ENABLED
802 PURE elemental module subroutine setBernRandRUP_IK1_RK4(rand, urand, p)
803#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
804 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK1_RK4
805#endif
806 use pm_kind, only: IKG => IK1, RKG => RK4
807 integer(IKG), intent(out) :: rand
808 real(RKG) , intent(in) :: urand, p
809 end subroutine
810#endif
811
812#if IK1_ENABLED && RK3_ENABLED
813 PURE elemental module subroutine setBernRandRUP_IK1_RK3(rand, urand, p)
814#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
815 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK1_RK3
816#endif
817 use pm_kind, only: IKG => IK1, RKG => RK3
818 integer(IKG), intent(out) :: rand
819 real(RKG) , intent(in) :: urand, p
820 end subroutine
821#endif
822
823#if IK1_ENABLED && RK2_ENABLED
824 PURE elemental module subroutine setBernRandRUP_IK1_RK2(rand, urand, p)
825#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
826 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK1_RK2
827#endif
828 use pm_kind, only: IKG => IK1, RKG => RK2
829 integer(IKG), intent(out) :: rand
830 real(RKG) , intent(in) :: urand, p
831 end subroutine
832#endif
833
834#if IK1_ENABLED && RK1_ENABLED
835 PURE elemental module subroutine setBernRandRUP_IK1_RK1(rand, urand, p)
836#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
837 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_IK1_RK1
838#endif
839 use pm_kind, only: IKG => IK1, RKG => RK1
840 integer(IKG), intent(out) :: rand
841 real(RKG) , intent(in) :: urand, p
842 end subroutine
843#endif
844
845 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
846
847 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
848 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
849 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
850
851 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
852
853#if LK5_ENABLED && RK5_ENABLED
854 PURE elemental module subroutine setBernRandRUP_LK5_RK5(rand, urand, p)
855#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
856 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK5_RK5
857#endif
858 use pm_kind, only: LKG => LK5, RKG => RK5
859 logical(LKG), intent(out) :: rand
860 real(RKG) , intent(in) :: urand, p
861 end subroutine
862#endif
863
864#if LK5_ENABLED && RK4_ENABLED
865 PURE elemental module subroutine setBernRandRUP_LK5_RK4(rand, urand, p)
866#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
867 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK5_RK4
868#endif
869 use pm_kind, only: LKG => LK5, RKG => RK4
870 logical(LKG), intent(out) :: rand
871 real(RKG) , intent(in) :: urand, p
872 end subroutine
873#endif
874
875#if LK5_ENABLED && RK3_ENABLED
876 PURE elemental module subroutine setBernRandRUP_LK5_RK3(rand, urand, p)
877#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
878 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK5_RK3
879#endif
880 use pm_kind, only: LKG => LK5, RKG => RK3
881 logical(LKG), intent(out) :: rand
882 real(RKG) , intent(in) :: urand, p
883 end subroutine
884#endif
885
886#if LK5_ENABLED && RK2_ENABLED
887 PURE elemental module subroutine setBernRandRUP_LK5_RK2(rand, urand, p)
888#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
889 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK5_RK2
890#endif
891 use pm_kind, only: LKG => LK5, RKG => RK2
892 logical(LKG), intent(out) :: rand
893 real(RKG) , intent(in) :: urand, p
894 end subroutine
895#endif
896
897#if LK5_ENABLED && RK1_ENABLED
898 PURE elemental module subroutine setBernRandRUP_LK5_RK1(rand, urand, p)
899#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
900 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK5_RK1
901#endif
902 use pm_kind, only: LKG => LK5, RKG => RK1
903 logical(LKG), intent(out) :: rand
904 real(RKG) , intent(in) :: urand, p
905 end subroutine
906#endif
907
908 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
909
910#if LK4_ENABLED && RK5_ENABLED
911 PURE elemental module subroutine setBernRandRUP_LK4_RK5(rand, urand, p)
912#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
913 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK4_RK5
914#endif
915 use pm_kind, only: LKG => LK4, RKG => RK5
916 logical(LKG), intent(out) :: rand
917 real(RKG) , intent(in) :: urand, p
918 end subroutine
919#endif
920
921#if LK4_ENABLED && RK4_ENABLED
922 PURE elemental module subroutine setBernRandRUP_LK4_RK4(rand, urand, p)
923#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
924 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK4_RK4
925#endif
926 use pm_kind, only: LKG => LK4, RKG => RK4
927 logical(LKG), intent(out) :: rand
928 real(RKG) , intent(in) :: urand, p
929 end subroutine
930#endif
931
932#if LK4_ENABLED && RK3_ENABLED
933 PURE elemental module subroutine setBernRandRUP_LK4_RK3(rand, urand, p)
934#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
935 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK4_RK3
936#endif
937 use pm_kind, only: LKG => LK4, RKG => RK3
938 logical(LKG), intent(out) :: rand
939 real(RKG) , intent(in) :: urand, p
940 end subroutine
941#endif
942
943#if LK4_ENABLED && RK2_ENABLED
944 PURE elemental module subroutine setBernRandRUP_LK4_RK2(rand, urand, p)
945#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
946 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK4_RK2
947#endif
948 use pm_kind, only: LKG => LK4, RKG => RK2
949 logical(LKG), intent(out) :: rand
950 real(RKG) , intent(in) :: urand, p
951 end subroutine
952#endif
953
954#if LK4_ENABLED && RK1_ENABLED
955 PURE elemental module subroutine setBernRandRUP_LK4_RK1(rand, urand, p)
956#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
957 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK4_RK1
958#endif
959 use pm_kind, only: LKG => LK4, RKG => RK1
960 logical(LKG), intent(out) :: rand
961 real(RKG) , intent(in) :: urand, p
962 end subroutine
963#endif
964
965 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
966
967#if LK3_ENABLED && RK5_ENABLED
968 PURE elemental module subroutine setBernRandRUP_LK3_RK5(rand, urand, p)
969#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
970 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK3_RK5
971#endif
972 use pm_kind, only: LKG => LK3, RKG => RK5
973 logical(LKG), intent(out) :: rand
974 real(RKG) , intent(in) :: urand, p
975 end subroutine
976#endif
977
978#if LK3_ENABLED && RK4_ENABLED
979 PURE elemental module subroutine setBernRandRUP_LK3_RK4(rand, urand, p)
980#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
981 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK3_RK4
982#endif
983 use pm_kind, only: LKG => LK3, RKG => RK4
984 logical(LKG), intent(out) :: rand
985 real(RKG) , intent(in) :: urand, p
986 end subroutine
987#endif
988
989#if LK3_ENABLED && RK3_ENABLED
990 PURE elemental module subroutine setBernRandRUP_LK3_RK3(rand, urand, p)
991#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
992 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK3_RK3
993#endif
994 use pm_kind, only: LKG => LK3, RKG => RK3
995 logical(LKG), intent(out) :: rand
996 real(RKG) , intent(in) :: urand, p
997 end subroutine
998#endif
999
1000#if LK3_ENABLED && RK2_ENABLED
1001 PURE elemental module subroutine setBernRandRUP_LK3_RK2(rand, urand, p)
1002#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1003 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK3_RK2
1004#endif
1005 use pm_kind, only: LKG => LK3, RKG => RK2
1006 logical(LKG), intent(out) :: rand
1007 real(RKG) , intent(in) :: urand, p
1008 end subroutine
1009#endif
1010
1011#if LK3_ENABLED && RK1_ENABLED
1012 PURE elemental module subroutine setBernRandRUP_LK3_RK1(rand, urand, p)
1013#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1014 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK3_RK1
1015#endif
1016 use pm_kind, only: LKG => LK3, RKG => RK1
1017 logical(LKG), intent(out) :: rand
1018 real(RKG) , intent(in) :: urand, p
1019 end subroutine
1020#endif
1021
1022 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1023
1024#if LK2_ENABLED && RK5_ENABLED
1025 PURE elemental module subroutine setBernRandRUP_LK2_RK5(rand, urand, p)
1026#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1027 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK2_RK5
1028#endif
1029 use pm_kind, only: LKG => LK2, RKG => RK5
1030 logical(LKG), intent(out) :: rand
1031 real(RKG) , intent(in) :: urand, p
1032 end subroutine
1033#endif
1034
1035#if LK2_ENABLED && RK4_ENABLED
1036 PURE elemental module subroutine setBernRandRUP_LK2_RK4(rand, urand, p)
1037#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1038 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK2_RK4
1039#endif
1040 use pm_kind, only: LKG => LK2, RKG => RK4
1041 logical(LKG), intent(out) :: rand
1042 real(RKG) , intent(in) :: urand, p
1043 end subroutine
1044#endif
1045
1046#if LK2_ENABLED && RK3_ENABLED
1047 PURE elemental module subroutine setBernRandRUP_LK2_RK3(rand, urand, p)
1048#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1049 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK2_RK3
1050#endif
1051 use pm_kind, only: LKG => LK2, RKG => RK3
1052 logical(LKG), intent(out) :: rand
1053 real(RKG) , intent(in) :: urand, p
1054 end subroutine
1055#endif
1056
1057#if LK2_ENABLED && RK2_ENABLED
1058 PURE elemental module subroutine setBernRandRUP_LK2_RK2(rand, urand, p)
1059#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1060 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK2_RK2
1061#endif
1062 use pm_kind, only: LKG => LK2, RKG => RK2
1063 logical(LKG), intent(out) :: rand
1064 real(RKG) , intent(in) :: urand, p
1065 end subroutine
1066#endif
1067
1068#if LK2_ENABLED && RK1_ENABLED
1069 PURE elemental module subroutine setBernRandRUP_LK2_RK1(rand, urand, p)
1070#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1071 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK2_RK1
1072#endif
1073 use pm_kind, only: LKG => LK2, RKG => RK1
1074 logical(LKG), intent(out) :: rand
1075 real(RKG) , intent(in) :: urand, p
1076 end subroutine
1077#endif
1078
1079 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1080
1081#if LK1_ENABLED && RK5_ENABLED
1082 PURE elemental module subroutine setBernRandRUP_LK1_RK5(rand, urand, p)
1083#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1084 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK1_RK5
1085#endif
1086 use pm_kind, only: LKG => LK1, RKG => RK5
1087 logical(LKG), intent(out) :: rand
1088 real(RKG) , intent(in) :: urand, p
1089 end subroutine
1090#endif
1091
1092#if LK1_ENABLED && RK4_ENABLED
1093 PURE elemental module subroutine setBernRandRUP_LK1_RK4(rand, urand, p)
1094#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1095 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK1_RK4
1096#endif
1097 use pm_kind, only: LKG => LK1, RKG => RK4
1098 logical(LKG), intent(out) :: rand
1099 real(RKG) , intent(in) :: urand, p
1100 end subroutine
1101#endif
1102
1103#if LK1_ENABLED && RK3_ENABLED
1104 PURE elemental module subroutine setBernRandRUP_LK1_RK3(rand, urand, p)
1105#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1106 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK1_RK3
1107#endif
1108 use pm_kind, only: LKG => LK1, RKG => RK3
1109 logical(LKG), intent(out) :: rand
1110 real(RKG) , intent(in) :: urand, p
1111 end subroutine
1112#endif
1113
1114#if LK1_ENABLED && RK2_ENABLED
1115 PURE elemental module subroutine setBernRandRUP_LK1_RK2(rand, urand, p)
1116#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1117 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK1_RK2
1118#endif
1119 use pm_kind, only: LKG => LK1, RKG => RK2
1120 logical(LKG), intent(out) :: rand
1121 real(RKG) , intent(in) :: urand, p
1122 end subroutine
1123#endif
1124
1125#if LK1_ENABLED && RK1_ENABLED
1126 PURE elemental module subroutine setBernRandRUP_LK1_RK1(rand, urand, p)
1127#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1128 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_LK1_RK1
1129#endif
1130 use pm_kind, only: LKG => LK1, RKG => RK1
1131 logical(LKG), intent(out) :: rand
1132 real(RKG) , intent(in) :: urand, p
1133 end subroutine
1134#endif
1135
1136 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1137
1138 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1139 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1140 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1141
1142 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1143
1144#if RK5_ENABLED
1145 PURE elemental module subroutine setBernRandRUP_RK5_RK5(rand, urand, p)
1146#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1147 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_RK5_RK5
1148#endif
1149 use pm_kind, only: RKG => RK5
1150 real(RKG) , intent(out) :: rand
1151 real(RKG) , intent(in) :: urand, p
1152 end subroutine
1153#endif
1154
1155#if RK4_ENABLED
1156 PURE elemental module subroutine setBernRandRUP_RK4_RK4(rand, urand, p)
1157#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1158 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_RK4_RK4
1159#endif
1160 use pm_kind, only: RKG => RK4
1161 real(RKG) , intent(out) :: rand
1162 real(RKG) , intent(in) :: urand, p
1163 end subroutine
1164#endif
1165
1166#if RK3_ENABLED
1167 PURE elemental module subroutine setBernRandRUP_RK3_RK3(rand, urand, p)
1168#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1169 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_RK3_RK3
1170#endif
1171 use pm_kind, only: RKG => RK3
1172 real(RKG) , intent(out) :: rand
1173 real(RKG) , intent(in) :: urand, p
1174 end subroutine
1175#endif
1176
1177#if RK2_ENABLED
1178 PURE elemental module subroutine setBernRandRUP_RK2_RK2(rand, urand, p)
1179#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1180 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_RK2_RK2
1181#endif
1182 use pm_kind, only: RKG => RK2
1183 real(RKG) , intent(out) :: rand
1184 real(RKG) , intent(in) :: urand, p
1185 end subroutine
1186#endif
1187
1188#if RK1_ENABLED
1189 PURE elemental module subroutine setBernRandRUP_RK1_RK1(rand, urand, p)
1190#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
1191 !DEC$ ATTRIBUTES DLLEXPORT :: setBernRandRUP_RK1_RK1
1192#endif
1193 use pm_kind, only: RKG => RK1
1194 real(RKG) , intent(out) :: rand
1195 real(RKG) , intent(in) :: urand, p
1196 end subroutine
1197#endif
1198
1199 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1200
1201 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1202 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1203 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1204
1205 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1206
1207 end interface
1208
1209!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1210
1211end module pm_distBern
Generate and return a scalar or array of rank 1 of length size or the same rank and size as p of Bern...
Generate and return a scalar (or a vector of length size or an array of the same shape as the input p...
Return a scalar or array of arbitrary rank of Bernoulli-distributed random values (0 or 1),...
This module contains classes and procedures for generating Bernoulli-distributed random numbers.
Definition: pm_distBern.F90:39
character(*, SK), parameter MODULE_NAME
Definition: pm_distBern.F90:45
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK1
Definition: pm_kind.F90:412
integer, parameter IK3
Definition: pm_kind.F90:368
integer, parameter RK5
Definition: pm_kind.F90:478
integer, parameter RK4
Definition: pm_kind.F90:489
integer, parameter IK1
Definition: pm_kind.F90:382
integer, parameter LK5
Definition: pm_kind.F90:392
integer, parameter RK2
Definition: pm_kind.F90:511
integer, parameter RK3
Definition: pm_kind.F90:500
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter LK2
Definition: pm_kind.F90:407
integer, parameter LK4
Definition: pm_kind.F90:397
integer, parameter LK3
Definition: pm_kind.F90:402
integer, parameter IK2
Definition: pm_kind.F90:375
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter IK4
Definition: pm_kind.F90:361
integer, parameter IK5
Definition: pm_kind.F90:354
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RK1
Definition: pm_kind.F90:522
This is the derived type for signifying distributions that are of type Bernoulli as defined in the de...
Definition: pm_distBern.F90:82