ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_mathSubAdd.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
64
65!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66
68
69 use pm_kind, only: IK, RK, SK
70
71 implicit none
72
73 character(*, SK), parameter :: MODULE_NAME = "@pm_mathSubAdd"
74
75!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76
141 interface operator(.subadd.)
142
143 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
145 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
146
147 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
148
149#if IK5_ENABLED
150 pure module function getSubAddUnary_IK5(val) result(binval)
151#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
152 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_IK5
153#endif
154 use pm_kind, only: IKG => IK5
155 integer(IKG), intent(in) :: val
156 integer(IKG) :: binval(2)
157 end function
158#endif
159
160#if IK4_ENABLED
161 pure module function getSubAddUnary_IK4(val) result(binval)
162#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
163 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_IK4
164#endif
165 use pm_kind, only: IKG => IK4
166 integer(IKG), intent(in) :: val
167 integer(IKG) :: binval(2)
168 end function
169#endif
170
171#if IK3_ENABLED
172 pure module function getSubAddUnary_IK3(val) result(binval)
173#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
174 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_IK3
175#endif
176 use pm_kind, only: IKG => IK3
177 integer(IKG), intent(in) :: val
178 integer(IKG) :: binval(2)
179 end function
180#endif
181
182#if IK2_ENABLED
183 pure module function getSubAddUnary_IK2(val) result(binval)
184#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
185 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_IK2
186#endif
187 use pm_kind, only: IKG => IK2
188 integer(IKG), intent(in) :: val
189 integer(IKG) :: binval(2)
190 end function
191#endif
192
193#if IK1_ENABLED
194 pure module function getSubAddUnary_IK1(val) result(binval)
195#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
196 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_IK1
197#endif
198 use pm_kind, only: IKG => IK1
199 integer(IKG), intent(in) :: val
200 integer(IKG) :: binval(2)
201 end function
202#endif
203
204 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
205
206#if CK5_ENABLED
207 pure module function getSubAddUnary_CK5(val) result(binval)
208#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
209 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_CK5
210#endif
211 use pm_kind, only: CKG => CK5
212 complex(CKG), intent(in) :: val
213 complex(CKG) :: binval(2)
214 end function
215#endif
216
217#if CK4_ENABLED
218 pure module function getSubAddUnary_CK4(val) result(binval)
219#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
220 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_CK4
221#endif
222 use pm_kind, only: CKG => CK4
223 complex(CKG), intent(in) :: val
224 complex(CKG) :: binval(2)
225 end function
226#endif
227
228#if CK3_ENABLED
229 pure module function getSubAddUnary_CK3(val) result(binval)
230#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
231 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_CK3
232#endif
233 use pm_kind, only: CKG => CK3
234 complex(CKG), intent(in) :: val
235 complex(CKG) :: binval(2)
236 end function
237#endif
238
239#if CK2_ENABLED
240 pure module function getSubAddUnary_CK2(val) result(binval)
241#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
242 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_CK2
243#endif
244 use pm_kind, only: CKG => CK2
245 complex(CKG), intent(in) :: val
246 complex(CKG) :: binval(2)
247 end function
248#endif
249
250#if CK1_ENABLED
251 pure module function getSubAddUnary_CK1(val) result(binval)
252#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
253 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_CK1
254#endif
255 use pm_kind, only: CKG => CK1
256 complex(CKG), intent(in) :: val
257 complex(CKG) :: binval(2)
258 end function
259#endif
260
261 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
262
263#if RK5_ENABLED
264 pure module function getSubAddUnary_RK5(val) result(binval)
265#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
266 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_RK5
267#endif
268 use pm_kind, only: RKG => RK5
269 real(RKG) , intent(in) :: val
270 real(RKG) :: binval(2)
271 end function
272#endif
273
274#if RK4_ENABLED
275 pure module function getSubAddUnary_RK4(val) result(binval)
276#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
277 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_RK4
278#endif
279 use pm_kind, only: RKG => RK4
280 real(RKG) , intent(in) :: val
281 real(RKG) :: binval(2)
282 end function
283#endif
284
285#if RK3_ENABLED
286 pure module function getSubAddUnary_RK3(val) result(binval)
287#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
288 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_RK3
289#endif
290 use pm_kind, only: RKG => RK3
291 real(RKG) , intent(in) :: val
292 real(RKG) :: binval(2)
293 end function
294#endif
295
296#if RK2_ENABLED
297 pure module function getSubAddUnary_RK2(val) result(binval)
298#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
299 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_RK2
300#endif
301 use pm_kind, only: RKG => RK2
302 real(RKG) , intent(in) :: val
303 real(RKG) :: binval(2)
304 end function
305#endif
306
307#if RK1_ENABLED
308 pure module function getSubAddUnary_RK1(val) result(binval)
309#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
310 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddUnary_RK1
311#endif
312 use pm_kind, only: RKG => RK1
313 real(RKG) , intent(in) :: val
314 real(RKG) :: binval(2)
315 end function
316#endif
317
318 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
319
320 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
321 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
323
324 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
325
326#if IK5_ENABLED
327 pure module function getSubAddBinary_IK5(ref, val) result(binval)
328#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
329 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_IK5
330#endif
331 use pm_kind, only: IKG => IK5
332 integer(IKG), intent(in) :: ref, val
333 integer(IKG) :: binval(2)
334 end function
335#endif
336
337#if IK4_ENABLED
338 pure module function getSubAddBinary_IK4(ref, val) result(binval)
339#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
340 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_IK4
341#endif
342 use pm_kind, only: IKG => IK4
343 integer(IKG), intent(in) :: ref, val
344 integer(IKG) :: binval(2)
345 end function
346#endif
347
348#if IK3_ENABLED
349 pure module function getSubAddBinary_IK3(ref, val) result(binval)
350#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
351 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_IK3
352#endif
353 use pm_kind, only: IKG => IK3
354 integer(IKG), intent(in) :: ref, val
355 integer(IKG) :: binval(2)
356 end function
357#endif
358
359#if IK2_ENABLED
360 pure module function getSubAddBinary_IK2(ref, val) result(binval)
361#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
362 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_IK2
363#endif
364 use pm_kind, only: IKG => IK2
365 integer(IKG), intent(in) :: ref, val
366 integer(IKG) :: binval(2)
367 end function
368#endif
369
370#if IK1_ENABLED
371 pure module function getSubAddBinary_IK1(ref, val) result(binval)
372#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
373 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_IK1
374#endif
375 use pm_kind, only: IKG => IK1
376 integer(IKG), intent(in) :: ref, val
377 integer(IKG) :: binval(2)
378 end function
379#endif
380
381 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
382
383#if CK5_ENABLED
384 pure module function getSubAddBinary_CK5(ref, val) result(binval)
385#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
386 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_CK5
387#endif
388 use pm_kind, only: CKG => CK5
389 complex(CKG), intent(in) :: ref, val
390 complex(CKG) :: binval(2)
391 end function
392#endif
393
394#if CK4_ENABLED
395 pure module function getSubAddBinary_CK4(ref, val) result(binval)
396#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
397 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_CK4
398#endif
399 use pm_kind, only: CKG => CK4
400 complex(CKG), intent(in) :: ref, val
401 complex(CKG) :: binval(2)
402 end function
403#endif
404
405#if CK3_ENABLED
406 pure module function getSubAddBinary_CK3(ref, val) result(binval)
407#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
408 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_CK3
409#endif
410 use pm_kind, only: CKG => CK3
411 complex(CKG), intent(in) :: ref, val
412 complex(CKG) :: binval(2)
413 end function
414#endif
415
416#if CK2_ENABLED
417 pure module function getSubAddBinary_CK2(ref, val) result(binval)
418#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
419 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_CK2
420#endif
421 use pm_kind, only: CKG => CK2
422 complex(CKG), intent(in) :: ref, val
423 complex(CKG) :: binval(2)
424 end function
425#endif
426
427#if CK1_ENABLED
428 pure module function getSubAddBinary_CK1(ref, val) result(binval)
429#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
430 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_CK1
431#endif
432 use pm_kind, only: CKG => CK1
433 complex(CKG), intent(in) :: ref, val
434 complex(CKG) :: binval(2)
435 end function
436#endif
437
438 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
439
440#if RK5_ENABLED
441 pure module function getSubAddBinary_RK5(ref, val) result(binval)
442#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
443 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_RK5
444#endif
445 use pm_kind, only: RKG => RK5
446 real(RKG) , intent(in) :: ref, val
447 real(RKG) :: binval(2)
448 end function
449#endif
450
451#if RK4_ENABLED
452 pure module function getSubAddBinary_RK4(ref, val) result(binval)
453#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
454 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_RK4
455#endif
456 use pm_kind, only: RKG => RK4
457 real(RKG) , intent(in) :: ref, val
458 real(RKG) :: binval(2)
459 end function
460#endif
461
462#if RK3_ENABLED
463 pure module function getSubAddBinary_RK3(ref, val) result(binval)
464#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
465 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_RK3
466#endif
467 use pm_kind, only: RKG => RK3
468 real(RKG) , intent(in) :: ref, val
469 real(RKG) :: binval(2)
470 end function
471#endif
472
473#if RK2_ENABLED
474 pure module function getSubAddBinary_RK2(ref, val) result(binval)
475#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
476 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_RK2
477#endif
478 use pm_kind, only: RKG => RK2
479 real(RKG) , intent(in) :: ref, val
480 real(RKG) :: binval(2)
481 end function
482#endif
483
484#if RK1_ENABLED
485 pure module function getSubAddBinary_RK1(ref, val) result(binval)
486#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
487 !DEC$ ATTRIBUTES DLLEXPORT :: getSubAddBinary_RK1
488#endif
489 use pm_kind, only: RKG => RK1
490 real(RKG) , intent(in) :: ref, val
491 real(RKG) :: binval(2)
492 end function
493#endif
494
495 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
496
497 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
498 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
499 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
500
501 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
502
503 end interface
504
505!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
506
507end module pm_mathSubAdd ! 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 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 RK2
Definition: pm_kind.F90:511
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
Definition: pm_kind.F90:543
integer, parameter CK1
Definition: pm_kind.F90:464
integer, parameter RK3
Definition: pm_kind.F90:500
integer, parameter CK5
Definition: pm_kind.F90:420
integer, parameter CK4
Definition: pm_kind.F90:431
integer, parameter IK2
Definition: pm_kind.F90:375
integer, parameter CK2
Definition: pm_kind.F90:453
integer, parameter CK3
Definition: pm_kind.F90:442
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 module contains procedures and generic interfaces for evaluating the mathematical operator acti...
character(*, SK), parameter MODULE_NAME