test_prepare_matrix.F90 4.14 KB
Newer Older
Andreas Marek's avatar
Andreas Marek committed
1
2
3
4
5
!    This file is part of ELPA.
!
!    The ELPA library was originally created by the ELPA consortium,
!    consisting of the following organizations:
!
6
7
!    - Max Planck Computing and Data Facility (MPCDF), formerly known as
!      Rechenzentrum Garching der Max-Planck-Gesellschaft (RZG),
Andreas Marek's avatar
Andreas Marek committed
8
9
10
11
12
13
14
15
16
17
18
19
!    - Bergische Universität Wuppertal, Lehrstuhl für angewandte
!      Informatik,
!    - Technische Universität München, Lehrstuhl für Informatik mit
!      Schwerpunkt Wissenschaftliches Rechnen ,
!    - Fritz-Haber-Institut, Berlin, Abt. Theorie,
!    - Max-Plack-Institut für Mathematik in den Naturwissenschaften,
!      Leipzig, Abt. Komplexe Strukutren in Biologie und Kognition,
!      and
!    - IBM Deutschland GmbH
!
!
!    More information can be found here:
20
!    http://elpa.mpcdf.mpg.de/
Andreas Marek's avatar
Andreas Marek committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
!
!    ELPA is free software: you can redistribute it and/or modify
!    it under the terms of the version 3 of the license of the
!    GNU Lesser General Public License as published by the Free
!    Software Foundation.
!
!    ELPA is distributed in the hope that it will be useful,
!    but WITHOUT ANY WARRANTY; without even the implied warranty of
!    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!    GNU Lesser General Public License for more details.
!
!    You should have received a copy of the GNU Lesser General Public License
!    along with ELPA.  If not, see <http://www.gnu.org/licenses/>
!
!    ELPA reflects a substantial effort on the part of the original
!    ELPA consortium, and we ask you to respect the spirit of the
!    license that we chose: i.e., please contribute any changes you
!    may have back to the original ELPA library distribution, and keep
!    any derivatives of ELPA under the same license that we chose for
!    the original distribution, the GNU Lesser General Public License.
!
42
! Author: A. Marek, MPCDF
43
44
#include "config-f90.h"

45
module test_prepare_matrix
Andreas Marek's avatar
Andreas Marek committed
46

47
48
49
  interface prepare_matrix_random
    module procedure prepare_matrix_random_complex_double
    module procedure prepare_matrix_random_real_double
50
#ifdef WANT_SINGLE_PRECISION_REAL
51
    module procedure prepare_matrix_random_real_single
52
#endif
53
#ifdef WANT_SINGLE_PRECISION_COMPLEX
54
    module procedure prepare_matrix_random_complex_single
55
56
57
#endif
   end interface

58

59
60
61
62
  interface prepare_matrix_toeplitz
    module procedure prepare_matrix_toeplitz_complex_double
    module procedure prepare_matrix_toeplitz_real_double
    module procedure prepare_matrix_toeplitz_mixed_complex_complex_double
63
#ifdef WANT_SINGLE_PRECISION_REAL
64
    module procedure prepare_matrix_toeplitz_real_single
65
66
#endif
#ifdef WANT_SINGLE_PRECISION_COMPLEX
67
68
    module procedure prepare_matrix_toeplitz_complex_single
    module procedure prepare_matrix_toeplitz_mixed_complex_complex_single
69
70
71
#endif
   end interface

Andreas Marek's avatar
Andreas Marek committed
72
73
74
75
76
77
78
79
80
81
82
83
84
  interface prepare_matrix_frank
    module procedure prepare_matrix_frank_complex_double
    module procedure prepare_matrix_frank_real_double
#ifdef WANT_SINGLE_PRECISION_REAL
    module procedure prepare_matrix_frank_real_single
#endif
#ifdef WANT_SINGLE_PRECISION_COMPLEX
    module procedure prepare_matrix_frank_complex_single
#endif
   end interface



85
86
   private prows, pcols, map_global_array_index_to_local_index

Andreas Marek's avatar
Andreas Marek committed
87
88
  contains

89
90
#include "../../src/general/prow_pcol.F90"
#include "../../src/general/map_global_to_local.F90"
91

Andreas Marek's avatar
Andreas Marek committed
92
93
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
94
#include "../../src/general/precision_macros.h"
95
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
96
97
#undef DOUBLE_PRECISION
#undef COMPLEXCASE
Andreas Marek's avatar
Andreas Marek committed
98

99
100
101
102

#ifdef WANT_SINGLE_PRECISION_COMPLEX


Andreas Marek's avatar
Andreas Marek committed
103
104
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
105
#include "../../src/general/precision_macros.h"
106
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
107
108
#undef SINGLE_PRECISION
#undef COMPLEXCASE
109
110
#endif /* WANT_SINGLE_PRECISION_COMPLEX */

Andreas Marek's avatar
Andreas Marek committed
111

Andreas Marek's avatar
Andreas Marek committed
112
113
#define REALCASE 1
#define DOUBLE_PRECISION 1
114
#include "../../src/general/precision_macros.h"
115
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
116
117
#undef DOUBLE_PRECISION
#undef REALCASE
118

119
120
121
#ifdef WANT_SINGLE_PRECISION_REAL


Andreas Marek's avatar
Andreas Marek committed
122
123
#define REALCASE 1
#define SINGLE_PRECISION 1
124
#include "../../src/general/precision_macros.h"
125
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
126
127
#undef SINGLE_PRECISION
#undef REALCASE
Andreas Marek's avatar
Andreas Marek committed
128

129
130
131
#endif /* WANT_SINGLE_PRECISION_REAL */


Andreas Marek's avatar
Andreas Marek committed
132
end module