ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_logicalCompare.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
28
29!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30
32
33 use pm_kind, only: SK, IK
34 implicit none
35
36 character(*, SK), parameter :: MODULE_NAME = "@pm_logicalCompare"
37
38!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39
81 interface operator(<)
82
83 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84
85#if LK5_ENABLED
86 pure elemental module function isless_LK5(lhs, rhs) result(compares)
87#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
88 !DEC$ ATTRIBUTES DLLEXPORT :: isless_LK5
89#endif
90 use pm_kind, only: LKG => LK5
91 logical(LKG) , intent(in) :: lhs, rhs
92 logical(LKG) :: compares
93 end function
94#endif
95
96#if LK4_ENABLED
97 pure elemental module function isless_LK4(lhs, rhs) result(compares)
98#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
99 !DEC$ ATTRIBUTES DLLEXPORT :: isless_LK4
100#endif
101 use pm_kind, only: LKG => LK4
102 logical(LKG) , intent(in) :: lhs, rhs
103 logical(LKG) :: compares
104 end function
105#endif
106
107#if LK3_ENABLED
108 pure elemental module function isless_LK3(lhs, rhs) result(compares)
109#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
110 !DEC$ ATTRIBUTES DLLEXPORT :: isless_LK3
111#endif
112 use pm_kind, only: LKG => LK3
113 logical(LKG) , intent(in) :: lhs, rhs
114 logical(LKG) :: compares
115 end function
116#endif
117
118#if LK2_ENABLED
119 pure elemental module function isless_LK2(lhs, rhs) result(compares)
120#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
121 !DEC$ ATTRIBUTES DLLEXPORT :: isless_LK2
122#endif
123 use pm_kind, only: LKG => LK2
124 logical(LKG) , intent(in) :: lhs, rhs
125 logical(LKG) :: compares
126 end function
127#endif
128
129#if LK1_ENABLED
130 pure elemental module function isless_LK1(lhs, rhs) result(compares)
131#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
132 !DEC$ ATTRIBUTES DLLEXPORT :: isless_LK1
133#endif
134 use pm_kind, only: LKG => LK1
135 logical(LKG) , intent(in) :: lhs, rhs
136 logical(LKG) :: compares
137 end function
138#endif
139
140 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
141
142 end interface
143
144!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
145
187 interface operator(<=)
188
189 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190
191#if LK5_ENABLED
192 pure elemental module function isleq_LK5(lhs, rhs) result(compares)
193#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
194 !DEC$ ATTRIBUTES DLLEXPORT :: isleq_LK5
195#endif
196 use pm_kind, only: LKG => LK5
197 logical(LKG) , intent(in) :: lhs, rhs
198 logical(LKG) :: compares
199 end function
200#endif
201
202#if LK4_ENABLED
203 pure elemental module function isleq_LK4(lhs, rhs) result(compares)
204#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
205 !DEC$ ATTRIBUTES DLLEXPORT :: isleq_LK4
206#endif
207 use pm_kind, only: LKG => LK4
208 logical(LKG) , intent(in) :: lhs, rhs
209 logical(LKG) :: compares
210 end function
211#endif
212
213#if LK3_ENABLED
214 pure elemental module function isleq_LK3(lhs, rhs) result(compares)
215#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
216 !DEC$ ATTRIBUTES DLLEXPORT :: isleq_LK3
217#endif
218 use pm_kind, only: LKG => LK3
219 logical(LKG) , intent(in) :: lhs, rhs
220 logical(LKG) :: compares
221 end function
222#endif
223
224#if LK2_ENABLED
225 pure elemental module function isleq_LK2(lhs, rhs) result(compares)
226#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
227 !DEC$ ATTRIBUTES DLLEXPORT :: isleq_LK2
228#endif
229 use pm_kind, only: LKG => LK2
230 logical(LKG) , intent(in) :: lhs, rhs
231 logical(LKG) :: compares
232 end function
233#endif
234
235#if LK1_ENABLED
236 pure elemental module function isleq_LK1(lhs, rhs) result(compares)
237#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
238 !DEC$ ATTRIBUTES DLLEXPORT :: isleq_LK1
239#endif
240 use pm_kind, only: LKG => LK1
241 logical(LKG) , intent(in) :: lhs, rhs
242 logical(LKG) :: compares
243 end function
244#endif
245
246 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
247
248 end interface
249
250!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
251
293 interface operator(==)
294
295 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
296
297#if LK5_ENABLED
298 pure elemental module function iseq_LK5(lhs, rhs) result(compares)
299#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
300 !DEC$ ATTRIBUTES DLLEXPORT :: iseq_LK5
301#endif
302 use pm_kind, only: LKG => LK5
303 logical(LKG) , intent(in) :: lhs, rhs
304 logical(LKG) :: compares
305 end function
306#endif
307
308#if LK4_ENABLED
309 pure elemental module function iseq_LK4(lhs, rhs) result(compares)
310#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
311 !DEC$ ATTRIBUTES DLLEXPORT :: iseq_LK4
312#endif
313 use pm_kind, only: LKG => LK4
314 logical(LKG) , intent(in) :: lhs, rhs
315 logical(LKG) :: compares
316 end function
317#endif
318
319#if LK3_ENABLED
320 pure elemental module function iseq_LK3(lhs, rhs) result(compares)
321#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
322 !DEC$ ATTRIBUTES DLLEXPORT :: iseq_LK3
323#endif
324 use pm_kind, only: LKG => LK3
325 logical(LKG) , intent(in) :: lhs, rhs
326 logical(LKG) :: compares
327 end function
328#endif
329
330#if LK2_ENABLED
331 pure elemental module function iseq_LK2(lhs, rhs) result(compares)
332#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
333 !DEC$ ATTRIBUTES DLLEXPORT :: iseq_LK2
334#endif
335 use pm_kind, only: LKG => LK2
336 logical(LKG) , intent(in) :: lhs, rhs
337 logical(LKG) :: compares
338 end function
339#endif
340
341#if LK1_ENABLED
342 pure elemental module function iseq_LK1(lhs, rhs) result(compares)
343#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
344 !DEC$ ATTRIBUTES DLLEXPORT :: iseq_LK1
345#endif
346 use pm_kind, only: LKG => LK1
347 logical(LKG) , intent(in) :: lhs, rhs
348 logical(LKG) :: compares
349 end function
350#endif
351
352 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
353
354 end interface
355
356!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
357
399 interface operator(/=)
400
401 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
402
403#if LK5_ENABLED
404 pure elemental module function isneq_LK5(lhs, rhs) result(compares)
405#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
406 !DEC$ ATTRIBUTES DLLEXPORT :: isneq_LK5
407#endif
408 use pm_kind, only: LKG => LK5
409 logical(LKG) , intent(in) :: lhs, rhs
410 logical(LKG) :: compares
411 end function
412#endif
413
414#if LK4_ENABLED
415 pure elemental module function isneq_LK4(lhs, rhs) result(compares)
416#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
417 !DEC$ ATTRIBUTES DLLEXPORT :: isneq_LK4
418#endif
419 use pm_kind, only: LKG => LK4
420 logical(LKG) , intent(in) :: lhs, rhs
421 logical(LKG) :: compares
422 end function
423#endif
424
425#if LK3_ENABLED
426 pure elemental module function isneq_LK3(lhs, rhs) result(compares)
427#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
428 !DEC$ ATTRIBUTES DLLEXPORT :: isneq_LK3
429#endif
430 use pm_kind, only: LKG => LK3
431 logical(LKG) , intent(in) :: lhs, rhs
432 logical(LKG) :: compares
433 end function
434#endif
435
436#if LK2_ENABLED
437 pure elemental module function isneq_LK2(lhs, rhs) result(compares)
438#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
439 !DEC$ ATTRIBUTES DLLEXPORT :: isneq_LK2
440#endif
441 use pm_kind, only: LKG => LK2
442 logical(LKG) , intent(in) :: lhs, rhs
443 logical(LKG) :: compares
444 end function
445#endif
446
447#if LK1_ENABLED
448 pure elemental module function isneq_LK1(lhs, rhs) result(compares)
449#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
450 !DEC$ ATTRIBUTES DLLEXPORT :: isneq_LK1
451#endif
452 use pm_kind, only: LKG => LK1
453 logical(LKG) , intent(in) :: lhs, rhs
454 logical(LKG) :: compares
455 end function
456#endif
457
458 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
459
460 end interface
461
462!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
463
505 interface operator(>=)
506
507 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
508
509#if LK5_ENABLED
510 pure elemental module function ismeq_LK5(lhs, rhs) result(compares)
511#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
512 !DEC$ ATTRIBUTES DLLEXPORT :: ismeq_LK5
513#endif
514 use pm_kind, only: LKG => LK5
515 logical(LKG) , intent(in) :: lhs, rhs
516 logical(LKG) :: compares
517 end function
518#endif
519
520#if LK4_ENABLED
521 pure elemental module function ismeq_LK4(lhs, rhs) result(compares)
522#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
523 !DEC$ ATTRIBUTES DLLEXPORT :: ismeq_LK4
524#endif
525 use pm_kind, only: LKG => LK4
526 logical(LKG) , intent(in) :: lhs, rhs
527 logical(LKG) :: compares
528 end function
529#endif
530
531#if LK3_ENABLED
532 pure elemental module function ismeq_LK3(lhs, rhs) result(compares)
533#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
534 !DEC$ ATTRIBUTES DLLEXPORT :: ismeq_LK3
535#endif
536 use pm_kind, only: LKG => LK3
537 logical(LKG) , intent(in) :: lhs, rhs
538 logical(LKG) :: compares
539 end function
540#endif
541
542#if LK2_ENABLED
543 pure elemental module function ismeq_LK2(lhs, rhs) result(compares)
544#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
545 !DEC$ ATTRIBUTES DLLEXPORT :: ismeq_LK2
546#endif
547 use pm_kind, only: LKG => LK2
548 logical(LKG) , intent(in) :: lhs, rhs
549 logical(LKG) :: compares
550 end function
551#endif
552
553#if LK1_ENABLED
554 pure elemental module function ismeq_LK1(lhs, rhs) result(compares)
555#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
556 !DEC$ ATTRIBUTES DLLEXPORT :: ismeq_LK1
557#endif
558 use pm_kind, only: LKG => LK1
559 logical(LKG) , intent(in) :: lhs, rhs
560 logical(LKG) :: compares
561 end function
562#endif
563
564 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
565
566 end interface
567
568!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
569
611 interface operator(>)
612
613 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
614
615#if LK5_ENABLED
616 pure elemental module function ismore_LK5(lhs, rhs) result(compares)
617#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
618 !DEC$ ATTRIBUTES DLLEXPORT :: ismore_LK5
619#endif
620 use pm_kind, only: LKG => LK5
621 logical(LKG) , intent(in) :: lhs, rhs
622 logical(LKG) :: compares
623 end function
624#endif
625
626#if LK4_ENABLED
627 pure elemental module function ismore_LK4(lhs, rhs) result(compares)
628#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
629 !DEC$ ATTRIBUTES DLLEXPORT :: ismore_LK4
630#endif
631 use pm_kind, only: LKG => LK4
632 logical(LKG) , intent(in) :: lhs, rhs
633 logical(LKG) :: compares
634 end function
635#endif
636
637#if LK3_ENABLED
638 pure elemental module function ismore_LK3(lhs, rhs) result(compares)
639#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
640 !DEC$ ATTRIBUTES DLLEXPORT :: ismore_LK3
641#endif
642 use pm_kind, only: LKG => LK3
643 logical(LKG) , intent(in) :: lhs, rhs
644 logical(LKG) :: compares
645 end function
646#endif
647
648#if LK2_ENABLED
649 pure elemental module function ismore_LK2(lhs, rhs) result(compares)
650#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
651 !DEC$ ATTRIBUTES DLLEXPORT :: ismore_LK2
652#endif
653 use pm_kind, only: LKG => LK2
654 logical(LKG) , intent(in) :: lhs, rhs
655 logical(LKG) :: compares
656 end function
657#endif
658
659#if LK1_ENABLED
660 pure elemental module function ismore_LK1(lhs, rhs) result(compares)
661#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
662 !DEC$ ATTRIBUTES DLLEXPORT :: ismore_LK1
663#endif
664 use pm_kind, only: LKG => LK1
665 logical(LKG) , intent(in) :: lhs, rhs
666 logical(LKG) :: compares
667 end function
668#endif
669
670 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
671
672 end interface
673
674!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
675
676end module pm_logicalCompare ! LCOV_EXCL_LINE
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 LK5
Definition: pm_kind.F90:392
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 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 SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
This module contains procedures and generic interfaces for performing a variety of logical comparison...
character(*, SK), parameter MODULE_NAME