Line data Source code
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 :
17 : !> \brief This file contains the implementations of the tests of module [pm_matrixMulAdd](@ref pm_matrixMulAdd).
18 : !>
19 : !> \fintest
20 : !>
21 : !> \author
22 : !> \FatemehBagheri, 12:27 AM Tuesday, February 22, 2022, Dallas, TX
23 :
24 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 :
26 : submodule (test_pm_matrixMulAdd) routines
27 :
28 : use pm_io, only: display_type
29 : use pm_mathCompare, only: isClose
30 : use pm_matrixCopy, only: rdpack
31 : use pm_matrixCopy, only: getMatCopy
32 : use pm_matrixCopy, only: setMatCopy
33 : use pm_arrayChoice, only: getChoice
34 : use pm_arrayResize, only: setResized
35 : use pm_arrayRebill, only: setRebilled
36 : use pm_distUnif, only: getUnifRand, setUnifRand
37 :
38 : implicit none
39 :
40 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 :
42 : contains
43 :
44 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 :
46 : #define setMatMulAdd_ENABLED 1
47 :
48 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 :
50 : #define IK_ENABLED 1
51 :
52 : #if IK5_ENABLED
53 1 : module procedure test_setMatMulAdd_IK5
54 : use pm_kind, only: IKC => IK5
55 : #include "test_pm_matrixMulAdd@routines.inc.F90"
56 : end procedure
57 : #endif
58 :
59 : #if IK4_ENABLED
60 1 : module procedure test_setMatMulAdd_IK4
61 : use pm_kind, only: IKC => IK4
62 : #include "test_pm_matrixMulAdd@routines.inc.F90"
63 : end procedure
64 : #endif
65 :
66 : #if IK3_ENABLED
67 1 : module procedure test_setMatMulAdd_IK3
68 : use pm_kind, only: IKC => IK3
69 : #include "test_pm_matrixMulAdd@routines.inc.F90"
70 : end procedure
71 : #endif
72 :
73 : #if IK2_ENABLED
74 1 : module procedure test_setMatMulAdd_IK2
75 : use pm_kind, only: IKC => IK2
76 : #include "test_pm_matrixMulAdd@routines.inc.F90"
77 : end procedure
78 : #endif
79 :
80 : #if IK1_ENABLED
81 1 : module procedure test_setMatMulAdd_IK1
82 : use pm_kind, only: IKC => IK1
83 : #include "test_pm_matrixMulAdd@routines.inc.F90"
84 : end procedure
85 : #endif
86 :
87 : #undef IK_ENABLED
88 :
89 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90 :
91 : #define CK_ENABLED 1
92 :
93 : #if CK5_ENABLED
94 : module procedure test_setMatMulAdd_CK5
95 : use pm_kind, only: CKC => CK5
96 : #include "test_pm_matrixMulAdd@routines.inc.F90"
97 : end procedure
98 : #endif
99 :
100 : #if CK4_ENABLED
101 1 : module procedure test_setMatMulAdd_CK4
102 : use pm_kind, only: CKC => CK4
103 : #include "test_pm_matrixMulAdd@routines.inc.F90"
104 : end procedure
105 : #endif
106 :
107 : #if CK3_ENABLED
108 1 : module procedure test_setMatMulAdd_CK3
109 : use pm_kind, only: CKC => CK3
110 : #include "test_pm_matrixMulAdd@routines.inc.F90"
111 : end procedure
112 : #endif
113 :
114 : #if CK2_ENABLED
115 1 : module procedure test_setMatMulAdd_CK2
116 : use pm_kind, only: CKC => CK2
117 : #include "test_pm_matrixMulAdd@routines.inc.F90"
118 : end procedure
119 : #endif
120 :
121 : #if CK1_ENABLED
122 1 : module procedure test_setMatMulAdd_CK1
123 : use pm_kind, only: CKC => CK1
124 : #include "test_pm_matrixMulAdd@routines.inc.F90"
125 : end procedure
126 : #endif
127 :
128 : #undef CK_ENABLED
129 :
130 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
131 :
132 : #define RK_ENABLED 1
133 :
134 : #if RK5_ENABLED
135 : module procedure test_setMatMulAdd_RK5
136 : use pm_kind, only: RKC => RK5
137 : #include "test_pm_matrixMulAdd@routines.inc.F90"
138 : end procedure
139 : #endif
140 :
141 : #if RK4_ENABLED
142 1 : module procedure test_setMatMulAdd_RK4
143 : use pm_kind, only: RKC => RK4
144 : #include "test_pm_matrixMulAdd@routines.inc.F90"
145 : end procedure
146 : #endif
147 :
148 : #if RK3_ENABLED
149 1 : module procedure test_setMatMulAdd_RK3
150 : use pm_kind, only: RKC => RK3
151 : #include "test_pm_matrixMulAdd@routines.inc.F90"
152 : end procedure
153 : #endif
154 :
155 : #if RK2_ENABLED
156 1 : module procedure test_setMatMulAdd_RK2
157 : use pm_kind, only: RKC => RK2
158 : #include "test_pm_matrixMulAdd@routines.inc.F90"
159 : end procedure
160 : #endif
161 :
162 : #if RK1_ENABLED
163 1 : module procedure test_setMatMulAdd_RK1
164 : use pm_kind, only: RKC => RK1
165 : #include "test_pm_matrixMulAdd@routines.inc.F90"
166 : end procedure
167 : #endif
168 :
169 : #undef RK_ENABLED
170 :
171 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
172 :
173 : #undef setMatMulAdd_ENABLED
174 :
175 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
176 :
177 : end submodule routines ! LCOV_EXCL_LINE
|