Octopus
pblas.F90
Go to the documentation of this file.
1!! Copyright (C) 2011 X. Andrade
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
21module pblas_oct_m
22 implicit none
23
24 private
25
26 public :: &
27 pblas_gemm, &
28 pblas_herk, &
29 pblas_trsm, &
31
32
47 interface pblas_gemm
48 subroutine pdgemm(transa, transb, m, n, k, alpha, &
49 a, ia, ja, desca, b, ib, jb, descb, &
50 beta, c, ic, jc, descc)
51 use, intrinsic :: iso_fortran_env
52 implicit none
53
54 character(len=1) :: transa, transb
55 integer :: m, n, k, ia, ja, ib, jb, ic, jc
56 real(real64) :: alpha, beta
57 real(real64) :: a, b, c
58 integer :: desca, descb, descc
59 end subroutine pdgemm
60
61 subroutine pzgemm(transa, transb, m, n, k, alpha, &
62 a, ia, ja, desca, b, ib, jb, descb, &
63 beta, c, ic, jc, descc)
64 use, intrinsic :: iso_fortran_env
65 implicit none
66
67 character(len=1) :: transa, transb
68 integer :: m, n, k, ia, ja, ib, jb, ic, jc
69 complex(real64) :: alpha, beta
70 complex(real64) :: a, b, c
71 integer :: desca, descb, descc
72 end subroutine pzgemm
73 end interface
74
89 interface pblas_herk
90 subroutine pdsyrk(uplo, trans, n, k, alpha, a, ia, ja, desca, beta, c, ic, jc, descc)
91 use, intrinsic :: iso_fortran_env
92 implicit none
93 character(1), intent(in) :: uplo
94 character(1), intent(in) :: trans
95 integer, intent(in) :: n
96 integer, intent(in) :: k
97 real(real64), intent(in) :: alpha
98 real(real64), intent(in) :: a
99 integer, intent(in) :: ia
100 integer, intent(in) :: ja
101 integer, intent(in) :: desca
102 real(real64), intent(in) :: beta
103 real(real64), intent(inout) :: c
104 integer, intent(in) :: ic
105 integer, intent(in) :: jc
106 integer, intent(in) :: descc
107 end subroutine pdsyrk
108
109 subroutine pzherk(uplo, trans, n, k, alpha, a, ia, ja, desca, beta, c, ic, jc, descc)
110 use, intrinsic :: iso_fortran_env
111 implicit none
112 character(1), intent(in) :: uplo
113 character(1), intent(in) :: trans
114 integer, intent(in) :: n
115 integer, intent(in) :: k
116 complex(real64), intent(in) :: alpha
117 complex(real64), intent(in) :: a
118 integer, intent(in) :: ia
119 integer, intent(in) :: ja
120 integer, intent(in) :: desca
121 complex(real64), intent(in) :: beta
122 complex(real64), intent(inout) :: c
123 integer, intent(in) :: ic
124 integer, intent(in) :: jc
125 integer, intent(in) :: descc
126 end subroutine pzherk
127
128 end interface pblas_herk
129
149 interface pblas_trsm
150 subroutine pdtrsm(side, uplo, transa, diag, m, n, alpha, a, ia, ja, desca, b, ib, jb, descb)
151 use, intrinsic :: iso_fortran_env
152 implicit none
153 character(1), intent(in) :: side
154 character(1), intent(in) :: uplo
155 character(1), intent(in) :: transa
156 character(1), intent(in) :: diag
157 integer, intent(in) :: m
158 integer, intent(in) :: n
159 real(real64), intent(in) :: alpha
160 real(real64), intent(in) :: a
161 integer, intent(in) :: ia
162 integer, intent(in) :: ja
163 integer, intent(in) :: desca
164 real(real64), intent(inout) :: b
165 integer, intent(in) :: ib
166 integer, intent(in) :: jb
167 integer, intent(in) :: descb
168 end subroutine pdtrsm
169
170 subroutine pztrsm(side, uplo, transa, diag, m, n, alpha, a, ia, ja, desca, b, ib, jb, descb)
171 use, intrinsic :: iso_fortran_env
172 implicit none
173 character(1), intent(in) :: side
174 character(1), intent(in) :: uplo
175 character(1), intent(in) :: transa
176 character(1), intent(in) :: diag
177 integer, intent(in) :: m
178 integer, intent(in) :: n
179 complex(real64), intent(in) :: alpha
180 complex(real64), intent(in) :: a
181 integer, intent(in) :: ia
182 integer, intent(in) :: ja
183 integer, intent(in) :: desca
184 complex(real64), intent(inout) :: b
185 integer, intent(in) :: ib
186 integer, intent(in) :: jb
187 integer, intent(in) :: descb
188 end subroutine pztrsm
189
190 end interface pblas_trsm
191
192 ! PDTRAN transposes a matrix
193 !
194 ! sub( C ) := beta*sub( C ) + alpha*op( sub( A ) )
195 !
196 ! where
197 !
198 ! sub( C ) denotes C(IC:IC+M-1,JC:JC+N-1),
199 !
200 ! sub( A ) denotes A(IA:IA+N-1,JA:JA+M-1), and, op( X ) = X**T.
201 !
202 ! Thus, op( sub( A ) ) denotes A(IA:IA+N-1,JA:JA+M-1)**T.
203 !
204 ! Beta is a scalar, sub( C ) is an m by n submatrix, and sub( A ) is an
205 ! n by m submatrix.
206 interface pblas_tran
207 subroutine pdtran(M, N, ALPHA, A, IA, JA, DESCA, BETA, C, IC, JC, DESCC)
208 use, intrinsic :: iso_fortran_env
209 implicit none
210 integer :: M, N, IA, JA, DESCA, IC, JC, DESCC
211 real(real64) :: ALPHA, A, BETA, C
212 end subroutine
213
214 ! conjugated transpose
215 subroutine pztranc(M, N, ALPHA, A, IA, JA, DESCA, BETA, C, IC, JC, DESCC)
216 use, intrinsic :: iso_fortran_env
217 implicit none
218 integer :: M, N, IA, JA, DESCA, IC, JC, DESCC
219 complex(real64) :: ALPHA, A, BETA, C
220 end subroutine
221 end interface pblas_tran
222
223end module pblas_oct_m
224
225!! Local Variables:
226!! mode: f90
227!! coding: utf-8
228!! End:
Performs any one of the following combined matrix computations:
Definition: pblas.F90:140
Performs one of the symmetric rank k operations.
Definition: pblas.F90:182
Solves one of the matrix equations.
Definition: pblas.F90:242