~ubuntu-branches/ubuntu/vivid/atlas/vivid

« back to all changes in this revision

Viewing changes to interfaces/lapack/F77/src/dlarfb.f

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2013-06-11 15:58:16 UTC
  • mfrom: (1.1.3 upstream)
  • mto: (2.2.21 experimental)
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20130611155816-b72z8f621tuhbzn0
Tags: upstream-3.10.1
Import upstream version 3.10.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
 
2
     $                   T, LDT, C, LDC, WORK, LDWORK )
 
3
      IMPLICIT NONE
 
4
*
 
5
*  -- LAPACK auxiliary routine (version 3.2) --
 
6
*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 
7
*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 
8
*     November 2006
 
9
*     Modified by R. Clint Whaley for inclusion in ATLAS Dec 2009.
 
10
*
 
11
*     .. Scalar Arguments ..
 
12
      CHARACTER          DIRECT, SIDE, STOREV, TRANS
 
13
      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
 
14
*     ..
 
15
*     .. Array Arguments ..
 
16
      DOUBLE PRECISION C( LDC, * ), T( LDT, * ), V( LDV, * ),
 
17
     $        WORK( LDWORK, * )
 
18
*     ..
 
19
*
 
20
*  Purpose
 
21
*  =======
 
22
*
 
23
*  DLARFB applies a real block reflector H or its transpose H' to a
 
24
*  real m by n matrix C, from either the left or the right.
 
25
*
 
26
*  Arguments
 
27
*  =========
 
28
*
 
29
*  SIDE    (input) CHARACTER*1
 
30
*          = 'L': apply H or H**T from the Left
 
31
*          = 'R': apply H or H**T from the Right
 
32
*
 
33
*  TRANS   (input) CHARACTER*1
 
34
*          = 'N': apply H (No transpose)
 
35
*          = 'T': apply H**T (Transpose)
 
36
*
 
37
*  DIRECT  (input) CHARACTER*1
 
38
*          Indicates how H is formed from a product of elementary
 
39
*          reflectors
 
40
*          = 'F': H = H(1) H(2) . . . H(k) (Forward)
 
41
*          = 'B': H = H(k) . . . H(2) H(1) (Backward)
 
42
*
 
43
*  STOREV  (input) CHARACTER*1
 
44
*          Indicates how the vectors which define the elementary
 
45
*          reflectors are stored:
 
46
*          = 'C': Columnwise
 
47
*          = 'R': Rowwise
 
48
*
 
49
*  M       (input) INTEGER
 
50
*          The number of rows of the matrix C.
 
51
*
 
52
*  N       (input) INTEGER
 
53
*          The number of columns of the matrix C.
 
54
*
 
55
*  K       (input) INTEGER
 
56
*          The order of the matrix T (= the number of elementary
 
57
*          reflectors whose product defines the block reflector).
 
58
*
 
59
*  V       (input) DOUBLE PRECISION array, dimension
 
60
*                                (LDV,K) if STOREV = 'C'
 
61
*                                (LDV,M) if STOREV = 'R' and SIDE = 'L'
 
62
*                                (LDV,N) if STOREV = 'R' and SIDE = 'R'
 
63
*          The matrix V. See further details.
 
64
*
 
65
*  LDV     (input) INTEGER
 
66
*          The leading dimension of the array V.
 
67
*          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
 
68
*          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
 
69
*          if STOREV = 'R', LDV >= K.
 
70
*
 
71
*  T       (input) DOUBLE PRECISION array, dimension (LDT,K)
 
72
*          The triangular k by k matrix T in the representation of the
 
73
*          block reflector.
 
74
*
 
75
*  LDT     (input) INTEGER
 
76
*          The leading dimension of the array T. LDT >= K.
 
77
*
 
78
*  C       (input/output) DOUBLE PRECISION array, dimension (LDC,N)
 
79
*          On entry, the m by n matrix C.
 
80
*          On exit, C is overwritten by H*C or H'*C or C*H or C*H'.
 
81
*
 
82
*  LDC     (input) INTEGER
 
83
*          The leading dimension of the array C. LDC >= max(1,M).
 
84
*
 
85
*  WORK    (workspace) DOUBLE PRECISION array, dimension (LDWORK,K)
 
86
*
 
87
*  LDWORK  (input) INTEGER
 
88
*          The leading dimension of the array WORK.
 
89
*          If SIDE = 'L', LDWORK >= max(1,N);
 
90
*          if SIDE = 'R', LDWORK >= max(1,M).
 
91
*
 
92
*  =====================================================================
 
93
*
 
94
*     .. Parameters ..
 
95
      INTEGER ATLASROWMAJOR, ATLASCOLMAJOR
 
96
      PARAMETER (ATLASROWMAJOR=101, ATLASCOLMAJOR=102)
 
97
      INTEGER ATLASNOTRANS, ATLASTRANS, ATLASCONJTRANS
 
98
      PARAMETER (ATLASNOTRANS=111, ATLASTRANS=112, ATLASCONJTRANS=113)
 
99
      INTEGER ATLASUPPER, ATLASLOWER
 
100
      PARAMETER (ATLASUPPER=121, ATLASLOWER=122)
 
101
      INTEGER ATLASNONUNIT, ATLASUNIT
 
102
      PARAMETER (ATLASNONUNIT=131, ATLASUNIT=132)
 
103
      INTEGER ATLASLEFT, ATLASRIGHT
 
104
      PARAMETER (ATLASLEFT=141, ATLASRIGHT=142)
 
105
*     .. Local variables ..
 
106
      INTEGER ISIDE, ITRANS, IDIRECT, ISTORE
 
107
*     ..
 
108
*     .. Executable Statements ..
 
109
*
 
110
*     Quick return if possible
 
111
*
 
112
      IF( M.LE.0 .OR. N.LE.0 )
 
113
     $   RETURN
 
114
      IF (SIDE.EQ.'R' .OR. SIDE.EQ.'r') THEN
 
115
         ISIDE = ATLASRIGHT
 
116
      ELSE
 
117
         ISIDE = ATLASLEFT
 
118
      ENDIF
 
119
      IF (TRANS.EQ.'N' .OR. TRANS.EQ.'n') THEN
 
120
         ITRANS = ATLASNOTRANS
 
121
      ELSE
 
122
         ITRANS = ATLASTRANS
 
123
      ENDIF
 
124
      IF (DIRECT.EQ.'F' .OR. DIRECT.EQ.'f') THEN
 
125
         IDIRECT = 1
 
126
      ELSE
 
127
         IDIRECT = 2
 
128
      ENDIF
 
129
      IF (STOREV.EQ.'R' .OR. STOREV.EQ.'r') THEN
 
130
         ISTORE = 1
 
131
      ELSE
 
132
         ISTORE = 2
 
133
      ENDIF
 
134
*
 
135
      CALL ATL_F77WRAP_DLARFB(ISIDE, ITRANS, IDIRECT, ISTORE, M, N, K,
 
136
     $                        V, LDV, T, LDT, C, LDC, WORK, LDWORK)
 
137
*
 
138
*
 
139
      RETURN
 
140
*
 
141
*     End of DLARFB
 
142
*
 
143
      END