ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_complexAbs.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
34
35!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36
38
39 use pm_kind, only: LK, SK
40 implicit none
41
42 character(*,SK), parameter :: MODULE_NAME = "@pm_complexAbs"
43
44!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45
86 interface abs
87
88 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89
90#if CK5_ENABLED
91 pure elemental module function abs_CK5(val) result(absval)
92#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
93 !DEC$ ATTRIBUTES DLLEXPORT :: abs_CK5
94#endif
95 use pm_kind, only: CKG => CK5
96 complex(CKG), intent(in) :: val
97 complex(CKG) :: absval
98 end function
99#endif
100
101#if CK4_ENABLED
102 pure elemental module function abs_CK4(val) result(absval)
103#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
104 !DEC$ ATTRIBUTES DLLEXPORT :: abs_CK4
105#endif
106 use pm_kind, only: CKG => CK4
107 complex(CKG), intent(in) :: val
108 complex(CKG) :: absval
109 end function
110#endif
111
112#if CK3_ENABLED
113 pure elemental module function abs_CK3(val) result(absval)
114#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
115 !DEC$ ATTRIBUTES DLLEXPORT :: abs_CK3
116#endif
117 use pm_kind, only: CKG => CK3
118 complex(CKG), intent(in) :: val
119 complex(CKG) :: absval
120 end function
121#endif
122
123#if CK2_ENABLED
124 pure elemental module function abs_CK2(val) result(absval)
125#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
126 !DEC$ ATTRIBUTES DLLEXPORT :: abs_CK2
127#endif
128 use pm_kind, only: CKG => CK2
129 complex(CKG), intent(in) :: val
130 complex(CKG) :: absval
131 end function
132#endif
133
134#if CK1_ENABLED
135 pure elemental module function abs_CK1(val) result(absval)
136#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
137 !DEC$ ATTRIBUTES DLLEXPORT :: abs_CK1
138#endif
139 use pm_kind, only: CKG => CK1
140 complex(CKG), intent(in) :: val
141 complex(CKG) :: absval
142 end function
143#endif
144
145 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
146
147 end interface
148
149!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150
151end module pm_complexAbs ! LCOV_EXCL_LINE
Generate and return the component-wise absolute value of (both real and imaginary parts of) the input...
This module contains procedures and generic interfaces for performing element-wise comparison of the ...
character(*, SK), parameter MODULE_NAME
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter CK1
Definition: pm_kind.F90:464
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CK5
Definition: pm_kind.F90:420
integer, parameter CK4
Definition: pm_kind.F90:431
integer, parameter CK2
Definition: pm_kind.F90:453
integer, parameter CK3
Definition: pm_kind.F90:442
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