test_prepare_matrix.F90 3.75 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

  interface prepare_matrix
48
49
50
51
    module procedure prepare_matrix_complex_double
    module procedure prepare_matrix_real_double
#ifdef WANT_SINGLE_PRECISION_REAL
    module procedure prepare_matrix_real_single
52
#endif
53
54
55
56
57
#ifdef WANT_SINGLE_PRECISION_COMPLEX
    module procedure prepare_matrix_complex_single
#endif
   end interface

58
59
60
61

  interface prepare_toeplitz_matrix
    module procedure prepare_toeplitz_matrix_complex_double
    module procedure prepare_toeplitz_matrix_real_double
62
    module procedure prepare_toeplitz_matrix_mixed_complex_complex_double
63
64
65
66
67
#ifdef WANT_SINGLE_PRECISION_REAL
    module procedure prepare_toeplitz_matrix_real_single
#endif
#ifdef WANT_SINGLE_PRECISION_COMPLEX
    module procedure prepare_toeplitz_matrix_complex_single
68
    module procedure prepare_toeplitz_matrix_mixed_complex_complex_single
69
70
71
72
73
#endif
   end interface

   private prows, pcols, map_global_array_index_to_local_index

Andreas Marek's avatar
Andreas Marek committed
74
75
  contains

76
77
#include "../../src/general/prow_pcol.F90"
#include "../../src/general/map_global_to_local.F90"
78

Andreas Marek's avatar
Andreas Marek committed
79
80
#define COMPLEXCASE 1
#define DOUBLE_PRECISION 1
81
#include "../../src/general/precision_macros.h"
82
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
83
84
#undef DOUBLE_PRECISION
#undef COMPLEXCASE
Andreas Marek's avatar
Andreas Marek committed
85

86
87
88
89

#ifdef WANT_SINGLE_PRECISION_COMPLEX


Andreas Marek's avatar
Andreas Marek committed
90
91
#define COMPLEXCASE 1
#define SINGLE_PRECISION 1
92
#include "../../src/general/precision_macros.h"
93
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
94
95
#undef SINGLE_PRECISION
#undef COMPLEXCASE
96
97
#endif /* WANT_SINGLE_PRECISION_COMPLEX */

Andreas Marek's avatar
Andreas Marek committed
98

Andreas Marek's avatar
Andreas Marek committed
99
100
#define REALCASE 1
#define DOUBLE_PRECISION 1
101
#include "../../src/general/precision_macros.h"
102
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
103
104
#undef DOUBLE_PRECISION
#undef REALCASE
105

106
107
108
#ifdef WANT_SINGLE_PRECISION_REAL


Andreas Marek's avatar
Andreas Marek committed
109
110
#define REALCASE 1
#define SINGLE_PRECISION 1
111
#include "../../src/general/precision_macros.h"
112
#include "test_prepare_matrix_template.F90"
Andreas Marek's avatar
Andreas Marek committed
113
114
#undef SINGLE_PRECISION
#undef REALCASE
Andreas Marek's avatar
Andreas Marek committed
115

116
117
118
#endif /* WANT_SINGLE_PRECISION_REAL */


Andreas Marek's avatar
Andreas Marek committed
119
end module