qrupdate-ng
1.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
qrupdate_blas.f90
Go to the documentation of this file.
1
! Copyright (C) 2026 Martin Köhler <koehlerm(AT)mpi-magdeburg.mpg.de>
2
!
3
! This file is part of qrupdate-ng.
4
!
5
! qrupdate is free software; you can redistribute it and/or modify
6
! it under the terms of the GNU General Public License as published by
7
! the Free Software Foundation; either version 3 of the License, or
8
! (at your option) any later version.
9
!
10
! This program is distributed in the hope that it will be useful,
11
! but WITHOUT ANY WARRANTY; without even the implied warranty of
12
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
! GNU General Public License for more details.
14
!
15
! You should have received a copy of the GNU General Public License
16
! along with this software; see the file COPYING. If not, see
17
! <http://www.gnu.org/licenses/>.
18
!
19
20
!
21
! This module contains the (c/z)dot(u/c) replacements to obtain a
22
! Fortran (gfortran/flang) ABI invariant implementation.
23
! Furthermore, I provides the interface to LAPACK's xerbla.
24
!
25
module
qrupdate_blas
26
use
iso_fortran_env
27
implicit none
28
29
interface
30
subroutine
qrupdate_cdotc
(ret,n,cx,incx,cy,incy)
31
use
iso_fortran_env
32
integer
,
intent(in)
:: incx, incy, n
33
complex(real32)
,
intent(in)
:: cx(*),cy(*)
34
complex(real32)
,
intent(out)
:: ret
35
end subroutine
qrupdate_cdotc
36
end interface
37
38
interface
39
subroutine
qrupdate_cdotu
(ret,n,cx,incx,cy,incy)
40
use
iso_fortran_env
41
integer
,
intent(in)
:: incx, incy, n
42
complex(real32)
,
intent(in)
:: cx(*),cy(*)
43
complex(real32)
,
intent(out)
:: ret
44
end subroutine
qrupdate_cdotu
45
end interface
46
47
interface
48
subroutine
qrupdate_zdotc
(ret,n,cx,incx,cy,incy)
49
use
iso_fortran_env
50
integer
,
intent(in)
:: incx, incy, n
51
complex(real64)
,
intent(in)
:: cx(*),cy(*)
52
complex(real64)
,
intent(out)
:: ret
53
end subroutine
qrupdate_zdotc
54
end interface
55
56
interface
57
subroutine
qrupdate_zdotu
(ret,n,cx,incx,cy,incy)
58
use
iso_fortran_env
59
integer
,
intent(in)
:: incx, incy, n
60
complex(real64)
,
intent(in)
:: cx(*),cy(*)
61
complex(real64)
,
intent(out)
:: ret
62
end subroutine
qrupdate_zdotu
63
end interface
64
65
interface
66
subroutine
xerbla
( srname, info )
67
character*(*)
,
intent(in)
:: srname
68
integer
,
intent(in)
:: info
69
end subroutine
70
end interface
71
72
contains
73
74
function
lsame
( ca, cb )
75
character
,
intent(in)
:: ca, cb
76
logical
::
lsame
77
integer
:: inta, intb, zcode
78
79
lsame
= ca == cb
80
if
(
lsame
)
return
81
82
zcode = ichar(
'Z'
)
83
inta = ichar( ca )
84
intb = ichar( cb )
85
86
if
( zcode == 90 .or. zcode == 122 )
then
87
! ASCII
88
if
( inta >= 97 .and. inta <= 122 ) inta = inta - 32
89
if
( intb >= 97 .and. intb <= 122 ) intb = intb - 32
90
else
if
( zcode == 233 .or. zcode == 169 )
then
91
! EBCDIC
92
if
( ( inta >= 129 .and. inta <= 137 ) .or. &
93
( inta >= 145 .and. inta <= 153 ) .or. &
94
( inta >= 162 .and. inta <= 169 ) ) inta = inta + 64
95
if
( ( intb >= 129 .and. intb <= 137 ) .or. &
96
( intb >= 145 .and. intb <= 153 ) .or. &
97
( intb >= 162 .and. intb <= 169 ) ) intb = intb + 64
98
else
if
( zcode == 218 .or. zcode == 250 )
then
99
! ASCII on Prime machines
100
if
( inta >= 225 .and. inta <= 250 ) inta = inta - 32
101
if
( intb >= 225 .and. intb <= 250 ) intb = intb - 32
102
end if
103
104
lsame
= inta == intb
105
end function
lsame
106
107
end module
qrupdate_blas
qrupdate_blas::qrupdate_cdotc
Definition
qrupdate_blas.f90:30
qrupdate_blas::qrupdate_cdotu
Definition
qrupdate_blas.f90:39
qrupdate_blas::qrupdate_zdotc
Definition
qrupdate_blas.f90:48
qrupdate_blas::qrupdate_zdotu
Definition
qrupdate_blas.f90:57
qrupdate_blas::xerbla
Definition
qrupdate_blas.f90:66
qrupdate_blas
Definition
qrupdate_blas.f90:25
qrupdate_blas::lsame
logical function lsame(ca, cb)
Definition
qrupdate_blas.f90:75
src
qrupdate_blas.f90
Generated by
1.17.0