ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_mathFactoring.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
48
49!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50
52
53 use pm_kind, only: SK, IK
54
55 implicit none
56
57 character(*, SK), parameter :: MODULE_NAME = "@pm_mathFactoring"
58
59!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60
127 interface getFactoring
128
129 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130
131#if IK5_ENABLED
132 PURE module function getFactoring_IK5(posint) result(Factoring)
133#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
134 !DEC$ ATTRIBUTES DLLEXPORT :: getFactoring_IK5
135#endif
136 use pm_kind, only: IKG => IK5
137 integer(IKG), value :: posint
138 integer(IKG), allocatable :: Factoring(:)
139 end function
140#endif
141
142#if IK4_ENABLED
143 PURE module function getFactoring_IK4(posint) result(Factoring)
144#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
145 !DEC$ ATTRIBUTES DLLEXPORT :: getFactoring_IK4
146#endif
147 use pm_kind, only: IKG => IK4
148 integer(IKG), value :: posint
149 integer(IKG), allocatable :: Factoring(:)
150 end function
151#endif
152
153#if IK3_ENABLED
154 PURE module function getFactoring_IK3(posint) result(Factoring)
155#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
156 !DEC$ ATTRIBUTES DLLEXPORT :: getFactoring_IK3
157#endif
158 use pm_kind, only: IKG => IK3
159 integer(IKG), value :: posint
160 integer(IKG), allocatable :: Factoring(:)
161 end function
162#endif
163
164#if IK2_ENABLED
165 PURE module function getFactoring_IK2(posint) result(Factoring)
166#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
167 !DEC$ ATTRIBUTES DLLEXPORT :: getFactoring_IK2
168#endif
169 use pm_kind, only: IKG => IK2
170 integer(IKG), value :: posint
171 integer(IKG), allocatable :: Factoring(:)
172 end function
173#endif
174
175#if IK1_ENABLED
176 PURE module function getFactoring_IK1(posint) result(Factoring)
177#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
178 !DEC$ ATTRIBUTES DLLEXPORT :: getFactoring_IK1
179#endif
180 use pm_kind, only: IKG => IK1
181 integer(IKG), value :: posint
182 integer(IKG), allocatable :: Factoring(:)
183 end function
184#endif
185
186 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187
188 end interface
189
190!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
191
192end module pm_mathFactoring
Generate and return the factoring of the input positive integer.
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 computing the prime factors of integers.
character(*, SK), parameter MODULE_NAME