~ubuntu-branches/ubuntu/utopic/nwchem/utopic

« back to all changes in this revision

Viewing changes to src/lapack/single/clarfx.f

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Daniel Leidert, Andreas Tille, Michael Banck
  • Date: 2013-07-04 12:14:55 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20130704121455-5tvsx2qabor3nrui
Tags: 6.3-1
* New upstream release.
* Fixes anisotropic properties (Closes: #696361).
* New features include:
  + Multi-reference coupled cluster (MRCC) approaches
  + Hybrid DFT calculations with short-range HF 
  + New density-functionals including Minnesota (M08, M11) and HSE hybrid
    functionals
  + X-ray absorption spectroscopy (XAS) with TDDFT
  + Analytical gradients for the COSMO solvation model
  + Transition densities from TDDFT 
  + DFT+U and Electron-Transfer (ET) methods for plane wave calculations
  + Exploitation of space group symmetry in plane wave geometry optimizations
  + Local density of states (LDOS) collective variable added to Metadynamics
  + Various new XC functionals added for plane wave calculations, including
    hybrid and range-corrected ones
  + Electric field gradients with relativistic corrections 
  + Nudged Elastic Band optimization method
  + Updated basis sets and ECPs 

[ Daniel Leidert ]
* debian/watch: Fixed.

[ Andreas Tille ]
* debian/upstream: References

[ Michael Banck ]
* debian/upstream (Name): New field.
* debian/patches/02_makefile_flags.patch: Refreshed.
* debian/patches/06_statfs_kfreebsd.patch: Likewise.
* debian/patches/07_ga_target_force_linux.patch: Likewise.
* debian/patches/05_avoid_inline_assembler.patch: Removed, no longer needed.
* debian/patches/09_backported_6.1.1_fixes.patch: Likewise.
* debian/control (Build-Depends): Added gfortran-4.7 and gcc-4.7.
* debian/patches/10_force_gcc-4.7.patch: New patch, explicitly sets
  gfortran-4.7 and gcc-4.7, fixes test suite hang with gcc-4.8 (Closes:
  #701328, #713262).
* debian/testsuite: Added tests for COSMO analytical gradients and MRCC.
* debian/rules (MRCC_METHODS): New variable, required to enable MRCC methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
*> \brief \b CLARFX applies an elementary reflector to a general rectangular matrix, with loop unrolling when the reflector has order ≤ 10.
 
2
*
 
3
*  =========== DOCUMENTATION ===========
 
4
*
 
5
* Online html documentation available at 
 
6
*            http://www.netlib.org/lapack/explore-html/ 
 
7
*
 
8
*> \htmlonly
 
9
*> Download CLARFX + dependencies 
 
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarfx.f"> 
 
11
*> [TGZ]</a> 
 
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarfx.f"> 
 
13
*> [ZIP]</a> 
 
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarfx.f"> 
 
15
*> [TXT]</a>
 
16
*> \endhtmlonly 
 
17
*
 
18
*  Definition:
 
19
*  ===========
 
20
*
 
21
*       SUBROUTINE CLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
 
22
 
23
*       .. Scalar Arguments ..
 
24
*       CHARACTER          SIDE
 
25
*       INTEGER            LDC, M, N
 
26
*       COMPLEX            TAU
 
27
*       ..
 
28
*       .. Array Arguments ..
 
29
*       COMPLEX            C( LDC, * ), V( * ), WORK( * )
 
30
*       ..
 
31
*  
 
32
*
 
33
*> \par Purpose:
 
34
*  =============
 
35
*>
 
36
*> \verbatim
 
37
*>
 
38
*> CLARFX applies a complex elementary reflector H to a complex m by n
 
39
*> matrix C, from either the left or the right. H is represented in the
 
40
*> form
 
41
*>
 
42
*>       H = I - tau * v * v**H
 
43
*>
 
44
*> where tau is a complex scalar and v is a complex vector.
 
45
*>
 
46
*> If tau = 0, then H is taken to be the unit matrix
 
47
*>
 
48
*> This version uses inline code if H has order < 11.
 
49
*> \endverbatim
 
50
*
 
51
*  Arguments:
 
52
*  ==========
 
53
*
 
54
*> \param[in] SIDE
 
55
*> \verbatim
 
56
*>          SIDE is CHARACTER*1
 
57
*>          = 'L': form  H * C
 
58
*>          = 'R': form  C * H
 
59
*> \endverbatim
 
60
*>
 
61
*> \param[in] M
 
62
*> \verbatim
 
63
*>          M is INTEGER
 
64
*>          The number of rows of the matrix C.
 
65
*> \endverbatim
 
66
*>
 
67
*> \param[in] N
 
68
*> \verbatim
 
69
*>          N is INTEGER
 
70
*>          The number of columns of the matrix C.
 
71
*> \endverbatim
 
72
*>
 
73
*> \param[in] V
 
74
*> \verbatim
 
75
*>          V is COMPLEX array, dimension (M) if SIDE = 'L'
 
76
*>                                        or (N) if SIDE = 'R'
 
77
*>          The vector v in the representation of H.
 
78
*> \endverbatim
 
79
*>
 
80
*> \param[in] TAU
 
81
*> \verbatim
 
82
*>          TAU is COMPLEX
 
83
*>          The value tau in the representation of H.
 
84
*> \endverbatim
 
85
*>
 
86
*> \param[in,out] C
 
87
*> \verbatim
 
88
*>          C is COMPLEX array, dimension (LDC,N)
 
89
*>          On entry, the m by n matrix C.
 
90
*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',
 
91
*>          or C * H if SIDE = 'R'.
 
92
*> \endverbatim
 
93
*>
 
94
*> \param[in] LDC
 
95
*> \verbatim
 
96
*>          LDC is INTEGER
 
97
*>          The leading dimension of the array C. LDA >= max(1,M).
 
98
*> \endverbatim
 
99
*>
 
100
*> \param[out] WORK
 
101
*> \verbatim
 
102
*>          WORK is COMPLEX array, dimension (N) if SIDE = 'L'
 
103
*>                                            or (M) if SIDE = 'R'
 
104
*>          WORK is not referenced if H has order < 11.
 
105
*> \endverbatim
 
106
*
 
107
*  Authors:
 
108
*  ========
 
109
*
 
110
*> \author Univ. of Tennessee 
 
111
*> \author Univ. of California Berkeley 
 
112
*> \author Univ. of Colorado Denver 
 
113
*> \author NAG Ltd. 
 
114
*
 
115
*> \date September 2012
 
116
*
 
117
*> \ingroup complexOTHERauxiliary
 
118
*
 
119
*  =====================================================================
1
120
      SUBROUTINE CLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
2
 
C$Id: clarfx.f 19697 2010-10-29 16:57:34Z d3y133 $                          
3
121
*
4
 
*  -- LAPACK auxiliary routine (version 3.0) --
5
 
*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
6
 
*     Courant Institute, Argonne National Lab, and Rice University
7
 
*     September 30, 1994
 
122
*  -- LAPACK auxiliary routine (version 3.4.2) --
 
123
*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 
124
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
125
*     September 2012
8
126
*
9
127
*     .. Scalar Arguments ..
10
128
      CHARACTER          SIDE
15
133
      COMPLEX            C( LDC, * ), V( * ), WORK( * )
16
134
*     ..
17
135
*
18
 
*  Purpose
19
 
*  =======
20
 
*
21
 
*  CLARFX applies a complex elementary reflector H to a complex m by n
22
 
*  matrix C, from either the left or the right. H is represented in the
23
 
*  form
24
 
*
25
 
*        H = I - tau * v * v'
26
 
*
27
 
*  where tau is a complex scalar and v is a complex vector.
28
 
*
29
 
*  If tau = 0, then H is taken to be the unit matrix
30
 
*
31
 
*  This version uses inline code if H has order < 11.
32
 
*
33
 
*  Arguments
34
 
*  =========
35
 
*
36
 
*  SIDE    (input) CHARACTER*1
37
 
*          = 'L': form  H * C
38
 
*          = 'R': form  C * H
39
 
*
40
 
*  M       (input) INTEGER
41
 
*          The number of rows of the matrix C.
42
 
*
43
 
*  N       (input) INTEGER
44
 
*          The number of columns of the matrix C.
45
 
*
46
 
*  V       (input) COMPLEX array, dimension (M) if SIDE = 'L'
47
 
*                                        or (N) if SIDE = 'R'
48
 
*          The vector v in the representation of H.
49
 
*
50
 
*  TAU     (input) COMPLEX
51
 
*          The value tau in the representation of H.
52
 
*
53
 
*  C       (input/output) COMPLEX array, dimension (LDC,N)
54
 
*          On entry, the m by n matrix C.
55
 
*          On exit, C is overwritten by the matrix H * C if SIDE = 'L',
56
 
*          or C * H if SIDE = 'R'.
57
 
*
58
 
*  LDC     (input) INTEGER
59
 
*          The leading dimension of the array C. LDA >= max(1,M).
60
 
*
61
 
*  WORK    (workspace) COMPLEX array, dimension (N) if SIDE = 'L'
62
 
*                                            or (M) if SIDE = 'R'
63
 
*          WORK is not referenced if H has order < 11.
64
 
*
65
136
*  =====================================================================
66
137
*
67
138
*     .. Parameters ..
79
150
      EXTERNAL           LSAME
80
151
*     ..
81
152
*     .. External Subroutines ..
82
 
      EXTERNAL           CGEMV, CGERC
 
153
      EXTERNAL           CLARF
83
154
*     ..
84
155
*     .. Intrinsic Functions ..
85
156
      INTRINSIC          CONJG
97
168
*
98
169
*        Code for general M
99
170
*
100
 
*        w := C'*v
101
 
*
102
 
         CALL CGEMV( 'Conjugate transpose', M, N, ONE, C, LDC, V, 1,
103
 
     $               ZERO, WORK, 1 )
104
 
*
105
 
*        C := C - tau * v * w'
106
 
*
107
 
         CALL CGERC( M, N, -TAU, V, 1, WORK, 1, C, LDC )
 
171
         CALL CLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )
108
172
         GO TO 410
109
173
   10    CONTINUE
110
174
*
370
434
*
371
435
*        Code for general N
372
436
*
373
 
*        w := C * v
374
 
*
375
 
         CALL CGEMV( 'No transpose', M, N, ONE, C, LDC, V, 1, ZERO,
376
 
     $               WORK, 1 )
377
 
*
378
 
*        C := C - tau * w * v'
379
 
*
380
 
         CALL CGERC( M, N, -TAU, WORK, 1, V, 1, C, LDC )
 
437
         CALL CLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )
381
438
         GO TO 410
382
439
  210    CONTINUE
383
440
*