ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_mathUnsigned.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
62
63!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64
66
67 use pm_kind, only: SK, IK
68
69 implicit none
70
71 character(*, SK), parameter :: MODULE_NAME = "@pm_mathUnsigned"
72
73!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74
129 interface operator(.uadd.)
130
131 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
132
133#if IK5_ENABLED
134 PURE elemental module function uadd_IK5(a, b) result(sum)
135#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
136 !DEC$ ATTRIBUTES DLLEXPORT :: uadd_IK5
137#endif
138 use pm_kind, only: IKG => IK5
139 integer(IKG), intent(in) :: a, b
140 integer(IKG) :: sum
141 end function
142#endif
143
144#if IK4_ENABLED
145 PURE elemental module function uadd_IK4(a, b) result(sum)
146#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
147 !DEC$ ATTRIBUTES DLLEXPORT :: uadd_IK4
148#endif
149 use pm_kind, only: IKG => IK4
150 integer(IKG), intent(in) :: a, b
151 integer(IKG) :: sum
152 end function
153#endif
154
155#if IK3_ENABLED
156 PURE elemental module function uadd_IK3(a, b) result(sum)
157#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
158 !DEC$ ATTRIBUTES DLLEXPORT :: uadd_IK3
159#endif
160 use pm_kind, only: IKG => IK3
161 integer(IKG), intent(in) :: a, b
162 integer(IKG) :: sum
163 end function
164#endif
165
166#if IK2_ENABLED
167 PURE elemental module function uadd_IK2(a, b) result(sum)
168#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
169 !DEC$ ATTRIBUTES DLLEXPORT :: uadd_IK2
170#endif
171 use pm_kind, only: IKG => IK2
172 integer(IKG), intent(in) :: a, b
173 integer(IKG) :: sum
174 end function
175#endif
176
177#if IK1_ENABLED
178 PURE elemental module function uadd_IK1(a, b) result(sum)
179#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
180 !DEC$ ATTRIBUTES DLLEXPORT :: uadd_IK1
181#endif
182 use pm_kind, only: IKG => IK1
183 integer(IKG), intent(in) :: a, b
184 integer(IKG) :: sum
185 end function
186#endif
187
188 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
189
190 end interface
191
192!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
193
194end module pm_mathUnsigned
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter IK3
Definition: pm_kind.F90:368
integer, parameter IK1
Definition: pm_kind.F90:382
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
This module contains procedures and generic interfaces for various operations with positive integers ...
character(*, SK), parameter MODULE_NAME